Advertisement
Guest User

fut php

a guest
Jul 23rd, 2012
474
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.68 KB | None | 0 0
  1. <?php
  2. $user = "";
  3. $password = "";
  4. //Secret Question Hash Value
  5. $hash = "548894d5577c241102a85381b911d54d";
  6. //displayname for auth string
  7. $dispname = "bot";
  8. //locale for auth string
  9. $locale = "en-GB";
  10. //Time now in milliseconds
  11. $time = time();
  12.  
  13. //The 4 EA URLs we need to call in this order
  14. $login = "http://www.ea.com/uk/football/services/authenticate/login";
  15. $account = "http://www.ea.com/p/fut/a/card/l/en_GB/s/p/ut/game/ut12/user/accountinfo?timestamp=".$time;
  16. $auth = "http://www.ea.com/p/fut/a/card/l/en_GB/s/p/ut/auth";
  17. $quest = "http://www.ea.com/p/fut/a/card/l/en_GB/s/p/ut/game/ut12/phishing/validate";
  18.            
  19. //HTML Headers to send to the login URL, includes Username and Password
  20. $opts = array(
  21.  'http'=>array(
  22.  'method'=>"POST",
  23.  'header'=>"Content-Type: application/x-www-form-urlencoded",
  24. // 'content'=>"email=".$user."&password=".$password
  25.   'content'=>"email=".$user."&password=".$password  
  26.  )
  27. );
  28.  
  29. $context = stream_context_create($opts);
  30. //Contains the file returned from EA
  31. $EALOGIN = file_get_contents($login, false, $context);
  32. //The Headers returned from EA
  33. $r = $http_response_header;
  34. echo "</br> http://www.ea.com/uk/football/services/authenticate/login headers: </br>";
  35. var_dump($r);
  36. //EASW Key
  37. $s = explode(":", $r[7]);
  38. $t = explode(";", $s[1]);
  39. $EASW_KEY = $t[0];
  40.  
  41. //Session Key
  42. $m = explode(":", $r[8]);
  43. $n = explode(";", $m[1]);
  44. $EASF_SESS = $n[0];
  45. //nuc
  46. $a = explode("<nucleusId>", $EALOGIN);
  47. $b = explode("</nucleusId>", $a[1]);
  48. $NUC = $b[0];
  49.  
  50. //display the keys that we've found
  51. echo $EASW_KEY. "<br />";
  52. echo $EASF_SESS. "<br />";
  53. echo "NUC: ".$NUC."<br />";
  54.  
  55. //unset the variables used in this section as we will use them again
  56. unset($opts, $context, $EALOGIN, $http_response_header, $r, $s, $t, $m, $n, $a, $b);
  57.  
  58. //HTML Headers to send to the account info URL, includes the two keys from above
  59. $opts = array(
  60.  'http'=>array(
  61.  'method'=>"GET",
  62.  'header'=>"Content-Type: application/x-www-form-urlencoded\r\n".
  63.  "Cookie: ".$EASW_KEY.";".$EASF_SESS
  64.  )
  65. );
  66.  
  67. $context = stream_context_create($opts);
  68. //Contains the file returned from EA
  69. $EAACCOUNT = file_get_contents($account, false, $context);
  70. //The Headers returned from EA
  71. $r = $http_response_header;
  72. echo "</br> account info headers</br>";
  73. var_dump($r);
  74.  
  75. //Get personaID and Platform
  76. $d = json_decode($EAACCOUNT);
  77. $personaID = $d->userAccountInfo->personas[0]->personaId;
  78. $platform = $d->userAccountInfo->personas[0]->userClubList[0]->platform;
  79. $clubs = $d->userAccountInfo->personas[0]->userClubList[0]->clubName;
  80.  
  81. //display the variables we've got
  82. echo "</br> login information </br>";
  83. echo "personaId: ".$personaID."<br />";
  84. echo "platform: " .$platform. "<br />";
  85. var_dump($EAACCOUNT);
  86. //unset the variables used in this section as we will use them again
  87. unset($opts, $context, $EAACCOUNT, $http_response_header, $r, $d);
  88.  
  89. //HTML Headers to send to the auth URL, includes Both Keys and General User Info
  90. $opts = array(
  91.  'http'=>array(
  92.  'method'=>"POST",
  93.  'header'=>"Content-Type: application/json\r\n".
  94.  "Cookie: ".$EASW_KEY."; ".$EASF_SESS,
  95.  'content'=>'{ "isReadOnly": false, "sku": "499A0001", "clientVersion": 3, "nuc": '.$NUC.', "nucleusPersonaId": '.$personaID.', "nucleusPersonaDisplayName": "'.$dispname.'", "nucleusPersonaPlatform": "'.$platform.'", "locale": "'.$locale.'", "method": "idm", "priorityLevel":4, "identification": { "EASW-Token": "" } }'
  96.  )
  97. );
  98.  
  99. $context = stream_context_create($opts);
  100. //Contains the file returned from EA
  101. $EAAUTH = file_get_contents($auth, false, $context);
  102. //The Headers returned from EA
  103. $r = $http_response_header;
  104. echo "</br> http://www.ea.com/p/fut/a/card/l/en_GB/s/p/ut/auth headers </br>";
  105. var_dump($r);
  106. //User Session ID
  107. $XSID = $r[4];
  108. //Display the User Session ID
  109.  
  110. //unset the variables used in this section as we will use them again
  111. unset($opts, $context, $EAAUTH, $http_response_header, $r, $NUC, $personaID, $platform, $dispname, $locale);
  112.  
  113. //HTML Headers to send to the Validation URL, includes Both Keys, Session ID and our Question Hash
  114. $opts = array(
  115.  'http'=>array(
  116.  'method'=>"POST",
  117.  'header'=>"Content-Type: application/x-www-form-urlencoded\r\n".
  118.  "Cookie: ".$EASW_KEY."; ".$EASF_SESS ."\r\n".
  119.  $XSID,
  120.  'content'=>"answer=".$hash
  121.  )
  122. );
  123.  
  124. $context = stream_context_create($opts);
  125. //Contains the file returned from EA
  126. $EAVALIDATE = file_get_contents($quest, false, $context);
  127. //The Headers returned from EA
  128. $r = $http_response_header;
  129. echo "</br> next dump: </br>";
  130. var_dump($r);
  131. //Phishing Key
  132. $s = explode(":", $r[7]);
  133. $t = explode(";", $s[1]);
  134. $PHISHKEY = $t[0];
  135. //Display the Phishing Key
  136. echo $PHISHKEY. "<br />";
  137.  
  138. unset($opts, $context, $EAAUTH, $http_response_header, $r, $s, $t);
  139.  
  140.  
  141. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement