Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. Created by Rent A Hacker
  2. <?php
  3. //modify the following
  4.  
  5. $username = "username"; //the eBay username
  6. $password = "password"; //the eBay password
  7.  
  8. $item = 300712344201; //the item number
  9. $bid = 0.01; //the bid value in the item's currency
  10.  
  11. //do not modify below
  12.  
  13. //query the sign-in page
  14. $curl = curl_init();
  15. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
  16. curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0.1");
  17. curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
  18. curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  19. curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies.txt");
  20. curl_setopt($curl, CURLOPT_COOKIEJAR, "cookies.txt");
  21. curl_setopt($curl, CURLOPT_URL,"http://signin.ebay.com/aw-cgi/eBayISAPI.dll?SignIn");
  22. $ret = curl_exec ($curl);
  23. curl_close ($curl);
  24.  
  25. //sign-in
  26. $post = "MfcISAPICommand=SignInWelcome&siteid=0&co_partnerId=2&UsingSSL=0&ru=&pp=&pa1=&pa2=&pa3=&i1=-1&pageType=-1&userid={$username}&pass={$password}";
  27.  
  28. $curl = curl_init();
  29. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
  30. curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0.1");
  31. curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
  32. curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  33. curl_setopt($curl, CURLOPT_POST, 1);
  34. curl_setopt($curl, CURLOPT_POSTFIELDS,$post);
  35. curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies.txt");
  36. curl_setopt($curl, CURLOPT_COOKIEJAR, "cookies.txt");
  37. curl_setopt($curl, CURLOPT_REFERER, "http://signin.ebay.com/aw-cgi/eBayISAPI.dll?SignIn");
  38. curl_setopt($curl, CURLOPT_URL, "http://signin.ebay.com/aw-cgi/eBayISAPI.dll");
  39. $ret = curl_exec ($curl);
  40. curl_close ($curl);
  41.  
  42. if (strpos($ret, "Member id {$username}") === FALSE) {
  43. echo "Failed signing in.\r\n";
  44. } else {
  45. echo "Success signing in.\r\n";
  46. }
  47.  
  48. //place the inital bid
  49. $url = "http://offer.ebay.com/ws/eBayISAPI.dll?MakeBid&item={$item}&maxbid={$bid}";
  50.  
  51. $curl = curl_init();
  52. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
  53. curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0.1");
  54. curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
  55. curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  56. curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies.txt");
  57. curl_setopt($curl, CURLOPT_COOKIEJAR, "cookies.txt");
  58. curl_setopt($curl, CURLOPT_URL, $url);
  59. $ret = curl_exec ($curl);
  60. curl_close ($curl);
  61.  
  62. preg_match_all('/(?:value="([-0-9a-zA-Z]*)" *)?name="stok"(?: *value="([-0-9a-zA-Z]*)")?/', $ret, $regs);
  63. $stok = $regs[1][0];
  64.  
  65. preg_match_all('/(?:value="([-0-9a-zA-Z]*)" *)?name="uiid"(?: *value="([-0-9a-zA-Z]*)")?/', $ret, $regs);
  66. $uiid = $regs[1][0];
  67.  
  68. if (($stok) && ($uiid)) {
  69. echo "Success placing initial bid.\r\n";
  70. } else {
  71. echo "Failed placing initial bid.\r\n";
  72. }
  73.  
  74. //confirm the bid
  75. $url = "http://offer.ebay.com/ws/eBayISAPI.dll?MfcISAPICommand=MakeBid&maxbid={$bid}&quant=1&mode=1&stok={$stok}&uiid={$uiid}&co_partnerid=2&user={$username}&fb=0&item={$item}";
  76.  
  77. $curl = curl_init();
  78. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
  79. curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:15.0) Gecko/20100101 Firefox/15.0.1");
  80. curl_setopt($curl, CURLOPT_RETURNTRANSFER,1);
  81. curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
  82. curl_setopt($curl, CURLOPT_COOKIEFILE, "cookies.txt");
  83. curl_setopt($curl, CURLOPT_COOKIEJAR, "cookies.txt");
  84. curl_setopt($curl, CURLOPT_URL, $url);
  85. $ret = curl_exec ($curl);
  86. curl_close ($curl);
  87.  
  88. if (strpos($ret, "you're the first bidder") === FALSE) {
  89. echo "Failed placing final bid.\r\n";
  90. } else {
  91. echo "Success placing final bid.\r\n";
  92. }
  93.  
  94. //for testing
  95. //$fh = fopen("testhtml.html", 'w');
  96. //fwrite($fh, $ret);
  97. //fclose($fh);
  98. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement