Advertisement
T0m

Untitled

T0m
Apr 18th, 2012
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. require LWP::UserAgent;
  2. my $ua = LWP::UserAgent->new;
  3. $ua->timeout(10);
  4. $ua->env_proxy;
  5. push @{ $ua->requests_redirectable }, 'POST';
  6. #email;wachtwoord;voorachternaam;telefoonnummer;adres;nummer;postcode;plaats
  7. open(FILE,"<gebruikers.txt");
  8.  
  9. while($line = <FILE>)
  10. {
  11. $ua->agent(useragent());
  12. @gebruikers = ();
  13. @gebruikers = split(/;/,$line);
  14. $rs = $ua->get("https://www.just-eat.be/member/signup");
  15. if($rs->is_success)
  16. {
  17. $c = $rs->content;
  18. if($c =~ /<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="(.*)" \/>/)
  19. {
  20. $viewstate = $1;
  21. }
  22. if($c =~ /<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="(.*)" \/>/)
  23. {
  24. $eventvalidation = $1;
  25. }
  26. }
  27. print "@gebruikers";
  28. $rss = $ua->post("https://www.just-eat.be/member/signup",
  29. {
  30. 'ctl00_ToolkitScriptManager1_HiddenField' => '', #Leeg
  31. '__EVENTTARGET' => '', #Leeg
  32. '__EVENTARGUMENT' => '', #Leeg
  33. '__VIEWSTATE' => $viewstate,
  34. '&ctl00$ContentPlaceHolder1$ctl00$passwordConfirm' => '', #Leeg
  35. '&ctl00$ContentPlaceHolder1$ctl00$txtEmail' => $gebruikers[0],
  36. '&ctl00$ContentPlaceHolder1$ctl00$txtPassword' => $gebruikers[1],
  37. '&ctl00$ContentPlaceHolder1$ctl00$txtRepeatPass' => $gebruikers[1],
  38. '&ctl00$ContentPlaceHolder1$ctl00$txtFirstname' => $gebruikers[2],
  39. '&ctl00$ContentPlaceHolder1$ctl00$txtPhoneno' => $gebruikers[3],
  40. '&ctl00$ContentPlaceHolder1$ctl00$AgreeToTermsAndConditionsCheckBox' => 'on',
  41. '&ctl00$ContentPlaceHolder1$ctl00$txtStreet' => $gebruikers[4],
  42. '&ctl00$ContentPlaceHolder1$ctl00$txtHouseno' => $gebruikers[5],
  43. '&ctl00$ContentPlaceHolder1$ctl00$txtFloor' => '',
  44. '&ctl00$ContentPlaceHolder1$ctl00$txtPostCodedk' => $gebruikers[6],
  45. '&ctl00$ContentPlaceHolder1$ctl00$txtCityDk' => $gebruikers[7],
  46. '&ctl00$ContentPlaceHolder1$ctl00$btnCreate' => 'Account Aanmaken',
  47. '__EVENTVALIDATION' => $eventvalidation
  48. });
  49. if($rss->is_success)
  50. {
  51. open(HTML,">error.html");
  52. print HTML $rss->content;
  53. close(HTML);
  54. }
  55. }
  56.  
  57. sub useragent
  58. {
  59. my @useragent = ("Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.12) Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12","Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)","Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125","Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)","Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5","Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.815.0 Safari/535.1","Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.813.0 Safari/535.1","Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.801.0 Safari/535.1","Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0a2) Gecko/20110613 Firefox/6.0a2","Mozilla/5.0 (X11; U; Linux i586; de; rv:5.0) Gecko/20100101 Firefox/5.0","Mozilla/5.0 (X11; U; Linux amd64; rv:5.0) Gecko/20100101 Firefox/5.0 (Debian)","Mozilla/5.0 (Windows NT 6.2; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0","Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:5.0) Gecko/20110619 Firefox/5.0","Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:5.0) Gecko/20100101 Firefox/5.0","Mozilla/5.0 (Windows NT 6.1.1; rv:5.0) Gecko/20100101 Firefox/5.0","Mozilla/5.0 (Windows NT 5.2; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0","Mozilla/5.0 (Windows NT 5.1; U; rv:5.0) Gecko/20100101 Firefox/5.0","Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/5.0","Mozilla/5.0 (Windows NT 5.0; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0","Mozilla/5.0 (Windows NT 5.0; rv:5.0) Gecko/20100101 Firefox/5.0");
  60. return $useragent[int rand($#useragent)]
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement