Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set idpassword to "supersecrets"
- set emaildomain to "domain.edu"
- tell application "Microsoft Outlook.app"
- set appleidmessages to (get every «class msg » in «class cMFo» "AppleVerify")
- repeat with messageid in appleidmessages
- set messagecontent to (get «class ctnt» of messageid)
- set parsedverifyurl to do shell script "echo " & (quoted form of messagecontent) & " | grep 'https://id.apple.com/cgi-bin/verify.cgi'"
- set parsedverifyurl to ((characters 10 thru -1 of parsedverifyurl) as string)
- set parsedverifyurl to ((characters 1 thru -67 of parsedverifyurl) as string)
- set appleid to do shell script "echo " & (quoted form of messagecontent) & " | grep '" & emaildomain & "'"
- set appleid to ((characters 1 thru 22 of appleid) as string)
- tell application "Safari"
- open location parsedverifyurl
- activate
- delay 5
- do JavaScript "document.getElementsByName('appleId')[0].value='" & appleid & "'" in document 1
- do JavaScript "document.getElementsByName('accountPassword')[0].value='" & idpassword & "'" in document 1
- do JavaScript "document.forms['form1'].submit()" in document 1
- delay 5
- set verifyresults to do shell script "echo " & quoted form of (get source of document 1) & " | grep '" & emaildomain & "'"
- set verifyresults to ((characters -37 thru -1 of verifyresults) as string)
- if verifyresults is not equal to "is now associated with your Apple ID." then
- error number -128
- end if
- close document 1
- end tell
- move messageid to «class cMFo» "AppleVerifyDone"
- end repeat
- end tell
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement