# MANUAL SUBMISSION Hypertext Transfer Protocol GET /CAPTCHA/CAPTCHA.aspx?SecurityToken=8C75EEB0D4964AE99A9786283BAE95BA HTTP/1.1\r\n Request Method: GET Request URI: /CAPTCHA/CAPTCHA.aspx?SecurityToken=8C75EEB0D4964AE99A9786283BAE95BA Request Version: HTTP/1.1 Accept: */*\r\n Referer: http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=107828070\r\n Accept-Language: en-us\r\n Accept-Encoding: gzip, deflate\r\n User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n Host: security.myspace.com\r\n Connection: Keep-Alive\r\n Cookie: NGUserID=a28255d-528-1162008931-2; AUTOSONGPLAY=0; MYSPACE=myspace; DERDB=ZG9tYWluPW1ldHJvY2FzdCZ0bGQ9bmV0JnNtb2tlcj0wJnNleHByZWY9MSZ1dHlwZT0yJnJlbGlnaW9uaWQ9MCZyZWdpb249JnBvc3RhbGNvZGU9Mzg2OCZtYXJpdGFsc3RhdHVzPU0maW5jb21laWQ9MCZoZ \r\n Hypertext Transfer Protocol POST /index.cfm?fuseaction=invite.addFriendsProcess&Mytoken=D40C5480-735E-4478-87F5593FAE9DF7CB7111271 HTTP/1.1\r\n Request Method: POST Request URI: /index.cfm?fuseaction=invite.addFriendsProcess&Mytoken=D40C5480-735E-4478-87F5593FAE9DF7CB7111271 Request Version: HTTP/1.1 Accept: */*\r\n Referer: http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=107828070\r\n Accept-Language: en-us\r\n Content-Type: application/x-www-form-urlencoded\r\n Accept-Encoding: gzip, deflate\r\n User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)\r\n Host: collect.myspace.com\r\n Content-Length: 255\r\n Connection: Keep-Alive\r\n Cache-Control: no-cache\r\n Cookie: NGUserID=a28255d-528-1162008931-2; AUTOSONGPLAY=0; MYSPACE=myspace; DERDB=ZG9tYWluPW1ldHJvY2FzdCZ0bGQ9bmV0JnNtb2tlcj0wJnNleHByZWY9MSZ1dHlwZT0yJnJlbGlnaW9uaWQ9MCZyZWdpb249JnBvc3RhbGNvZGU9Mzg2OCZtYXJpdGFsc3RhdHVzPU0maW5jb21laWQ9MCZoZ \r\n Line-based text data: application/x-www-form-urlencoded hashcode=MIGLBgorBgEEAYI3WAOkoH0wewYKKwYBBAGCN1gDAaBtMGsCAwIAAQICZgMCAgDABAiDFtagrDKBJQQQAZ1eoDG30LD3hChb1lyNxwRAYC67osSYAgTw2Azeh2qaiI5qT%2BxhhFRaGMIEnmUNMa1p8cLj%2BS6AZrPW4znnqoecL5fvN3NKkpPP1tB%2BpmtKeg%3D%3D&friendID=107828070&CAPTCHAR # SCRIPT SUBMISSION Hypertext Transfer Protocol GET /CAPTCHA/CAPTCHA.aspx?SecurityToken=3E4F1A84164B4DE2BFEAE763760BEB32 HTTP/1.0\r\n Request Method: GET Request URI: /CAPTCHA/CAPTCHA.aspx?SecurityToken=3E4F1A84164B4DE2BFEAE763760BEB32 Request Version: HTTP/1.0 Host: security.myspace.com\r\n User-Agent: lwp-trivial/1.41\r\n \r\n Hypertext Transfer Protocol POST /index.cfm?fuseaction=invite.addFriendsProcess&Mytoken=88136E67-DA9F-4FE6-8EDD5377C3F58AE64165334 HTTP/1.1\r\n Request Method: POST Request URI: /index.cfm?fuseaction=invite.addFriendsProcess&Mytoken=88136E67-DA9F-4FE6-8EDD5377C3F58AE64165334 Request Version: HTTP/1.1 TE: deflate,gzip;q=0.3\r\n Connection: TE, close\r\n Accept-Encoding: identity\r\n Host: collect.myspace.com\r\n Referer: http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=107828070\r\n User-Agent: WWW-Mechanize/1.20\r\n Content-Length: 252\r\n Content-Type: application/x-www-form-urlencoded\r\n Cookie: RBLOCKCNT=0; MSCOUNTRY=US; MYUSERINFO=MIICNQYKKwYBBAGCN1gDpKCCAiUwggIhBgorBgEEAYI3WAMBoIICETCCAg0CAwIAAQICZgMCAgDABAjKZZBb1AJRUQQQ8EidfzgzBaBIkZHhONOPTASCAeDK%2FEVeQ7RG3t82VDMjQgt2nbAcCzmmiiWt29m1wAbDqivIfN11tHVnuaKRxqC64bkVjyCjlNb Cookie2: $Version="1"\r\n \r\n Line-based text data: application/x-www-form-urlencoded hashcode=MIGLBgorBgEEAYI3WAOkoH0wewYKKwYBBAGCN1gDAaBtMGsCAwIAAQICZgMCAgDABAgrsahZrvKehgQQanqggVj6eLMO24gaJrq1GwRAF9MwbHHto2HBUAIoZiA3MM9ZQe97Ag6ob3uGi4N8DHmbFDfVs%2FfBCw3FhriQfFRqAZz99e0mDfmqtvjzJG9ejA%3D%3D&friendID=107828070&CAPTCHARespo #### use WWW::Mechanize; use HTTP::Cookies; my $url = 'http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=107828070'; my $mech = WWW::Mechanize->new(); $mech->cookie_jar( {} ); # login code ... $mech->get($url); # retrieve CAPTCHA image code ... # enter $text code ... $mech->submit_form( form_name => 'addFriend', fields => { CAPTCHAResponse => $text } );