PageRenderTime 48ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/vinaget/vng262/add.php

http://vinaget-script.googlecode.com/
PHP | 291 lines | 242 code | 11 blank | 38 comment | 80 complexity | 92c0b57552de13488894859eb167b7b3 MD5 | raw file
  1. <?php
  2. error_reporting (E_ALL);
  3. define('vinaget', 'yes');
  4. include("class.php");
  5. function check_account($host,$account){
  6. global $obj;
  7. foreach ($obj->acc[$host]['accounts'] as $value)
  8. if ($account == $value) return true;
  9. return false;
  10. }
  11. if (empty($_POST["accounts"])==false) {
  12. $obj = new stream_get();
  13. $type = $_POST['type'];
  14. $_POST["accounts"] = str_replace(" ","",$_POST["accounts"]);
  15. $account = trim($_POST['accounts']);
  16. $donate = false;
  17. ################################## DONATE ACC real-debrid.com #################################################################
  18. if($type == "real-debrid"){
  19. if(check_account("real-debrid.com",$account)==true) die("false");
  20. if (stristr($account,':')) {
  21. list($user, $pass) = explode(':', $account);
  22. $data = $obj->curl("https://www.real-debrid.com/ajax/login.php?user=".urlencode($user)."&pass=".urlencode($pass),"","");
  23. //You are blocked for one hour because of too many attempts !
  24. if(strpos($data,"You are blocked")) die("You are blocked for one hour because of too many attempts !");
  25. elseif(strpos($data,"Your login informations are incorrect") || strpos($data,"Your account is not active or has been suspended") || strpos($data,"You are blocked"))
  26. die("false");
  27. else {
  28. preg_match('%(auth=.+);%U', $data, $cook);
  29. $cookie = $cook[1];
  30. }
  31. }
  32. else $cookie = $account;
  33. if(check_account("real-debrid.com",$cookie)==true) die("false");
  34. $cookie = preg_replace("/(auth=|AUTH=|Auth=)/","",$cookie);
  35. $data = $obj->curl("https://www.real-debrid.com","auth=".$cookie,"");
  36. if(preg_match('%<strong>Premium:</strong> (.*) </div>%U', $data, $matches)) {
  37. $obj->acc["real-debrid.com"]['accounts'][] = $account;
  38. $donate = true;
  39. }
  40. }
  41. ################################## DONATE ACC real-debrid.com #################################################################
  42. ################################## DONATE ACC alldebrid.com ###################################################################
  43. elseif($type == "alldebrid"){
  44. if(check_account("alldebrid.com",$account)==true) die("false");
  45. if (stristr($account,':')) {
  46. list($user, $pass) = explode(':', $account);
  47. $data = $obj->curl("http://www.alldebrid.com/register/?action=login&returnpage=","","login_login=".urlencode($user)."&login_password=".urlencode($pass));
  48. //you are banned 23min for non respect of AllDebrid flood policy (reason : Too mutch login fail.)
  49. if(strpos($data,"The password is not valid") || strpos($data,"You are banned"))
  50. die("false");
  51. else {
  52. preg_match("%uid=(.*);%U", $data, $matches);
  53. $cookie = $matches[1];
  54. }
  55. }
  56. else $cookie = $account;
  57. if(check_account("alldebrid.com",$cookie)==true) die("false");
  58. $cookie = preg_replace("/(uid=|UID=|Uid=)/","",$cookie);
  59. $data = $obj->curl("http://www.alldebrid.com/account/","uid=".$cookie,"");
  60. if(strpos($data,'</strong>Premium</li>')) {
  61. $obj->acc["alldebrid.com"]['accounts'][] = $account;
  62. $donate = true;
  63. }
  64. }
  65. ################################## DONATE ACC alldebrid.com ###################################################################
  66. ################################## DONATE ACC rapidshare.com ##################################################################
  67. elseif($type == "rapidshare"){
  68. if(check_account("rapidshare.com",$account)==true) die("false");
  69. if (stristr($account,':')) {
  70. list($user, $pass) = explode(':', $account);
  71. $data = $obj->curl("http://api.rapidshare.com/cgi-bin/rsapi.cgi","","sub=getaccountdetails&withcookie=1&withpublicid=1&login=".$user."&cbf=RSAPIDispatcher&cbid=2&password=".$pass);
  72. if(strpos($data,'Login failed'))
  73. die("false");
  74. else {
  75. $cookie = $obj->cut_str($data, "ncookie=","\\n");
  76. }
  77. }
  78. else $cookie = $account;
  79. if(check_account("rapidshare.com",$cookie)==true) die("false");
  80. $cookie = preg_replace("/(enc=|Enc=|ENC=)/","",$cookie);
  81. $data = $obj->curl("http://api.rapidshare.com/cgi-bin/rsapi.cgi","","sub=getaccountdetails&withcookie=1&withpublicid=1&withsession=1&cookie=".$cookie."&cbf=RSAPIDispatcher&cbid=1");
  82. if(preg_match('/billeduntil=([0-9]+)/', $data, $matches)) {
  83. if (time() < $matches[1]) {
  84. $obj->acc["rapidshare.com"]['accounts'][] = $account;
  85. $donate = true;
  86. }
  87. }
  88. }
  89. ################################## DONATE ACC rapidshare.com ##################################################################
  90. ################################## DONATE ACC megaupload.com ##################################################################
  91. elseif($type == "megaupload"){
  92. if(check_account("megaupload.com",$account)==true) die("false");
  93. if (stristr($account,':')) {
  94. list($user, $pass) = explode(':', $account);
  95. $data = $obj->curl("http://www.megaupload.com/?c=account","","username=$user&password=$pass&login=1");
  96. if(strpos($data,"Username and password do not match. Please try again!"))
  97. die("false");
  98. else {
  99. preg_match('/^Set-Cookie: (.*?);/m', $data, $matches);
  100. $cookie = $matches[1];
  101. }
  102. }
  103. else $cookie = $account;
  104. if(check_account("megaupload.com",$cookie)==true) die("false");
  105. $cookie = preg_replace("/(user=|USER=|User=)/","",$cookie);
  106. $data = $obj->curl("http://www.megaupload.com/?c=account","user=$cookie","");
  107. if(strpos($data,"Lifetime Platinum") || strpos($data,"remaining")) {
  108. $obj->acc["megaupload.com"]['accounts'][] = $account;
  109. $donate = true;
  110. }
  111. }
  112. ################################## DONATE ACC megaupload.com ##################################################################
  113. ################################## DONATE ACC hotfile.com #####################################################################
  114. elseif($type == "hotfile"){
  115. if(check_account("hotfile.com",$account)==true) die("false");
  116. if (stristr($account,':')) {
  117. list($user, $pass) = explode(':', $account);
  118. $data = $obj->curl("http://www.hotfile.com/login.php","","user=$user&pass=$pass");
  119. if(strpos($data,"Bad username/password combination"))
  120. die("false");
  121. else {
  122. preg_match('/^Set-Cookie: auth=(.*?);/m', $data, $matches);
  123. $cookie = $matches[1];
  124. }
  125. }
  126. else $cookie = $account;
  127. if(check_account("hotfile.com",$cookie)==true) die("false");
  128. $cookie = preg_replace("/(auth=|AUTH=|Auth=)/","",$cookie);
  129. $ch = @curl_init();
  130. curl_setopt($ch, CURLOPT_URL, "http://hotfile.com/myaccount.html");
  131. curl_setopt($ch, CURLOPT_HEADER, 1);
  132. curl_setopt($ch, CURLOPT_COOKIE, "auth=$cookie");
  133. curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1');
  134. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  135. curl_setopt($ch, CURLOPT_TIMEOUT, 60);
  136. $data = curl_exec( $ch);
  137. curl_close($ch);
  138. if(preg_match('%<p>Premium until: <span class="rightSide">(.+) <b>%U', $data, $matches)) {
  139. $obj->acc["hotfile.com"]['accounts'][] = $account;
  140. $donate = true;
  141. }
  142. }
  143. ################################## DONATE ACC hotfile.com #####################################################################
  144. ################################## DONATE ACC fileserve.com ###################################################################
  145. elseif($type == "fileserve"){
  146. if(check_account("fileserve.com",$account)==true) die("false");
  147. if (stristr($account,':')) {
  148. list($user, $pass) = explode(':', $account);
  149. $data = $obj->curl("http://fileserve.com","","");
  150. $cookie = $obj->GetCookies($data);
  151. $post['loginUserName'] = $user;
  152. $post['loginUserPassword'] = $pass;
  153. $post['loginFormSubmit'] = "Login";
  154. $data = $obj->curl("http://www.fileserve.com/login.php",$cookie,$post);
  155. if(strpos($data,"You are not logged in"))
  156. die("false");
  157. }
  158. else $cookie = $account;
  159. if(check_account("fileserve.com",$cookie)==true) die("false");
  160. $cookie = preg_replace("/(phpsessid=|Phpsessid=|PHPSESSID=)/","",$cookie);
  161. $data = $obj->curl("http://fileserve.com/dashboard.php","PHPSESSID=".$cookie,"");
  162. if(strpos($data,"<td><h4>Premium Until</h4></td>")) {
  163. $obj->acc["fileserve.com"]['accounts'][] = $account;
  164. $donate = true;
  165. }
  166. }
  167. ################################## DONATE ACC fileserve.com ###################################################################
  168. ################################## DONATE ACC filesonic.com ###################################################################
  169. elseif($type == "filesonic"){
  170. //==== Fix link FSN ====
  171. $url = "http://www.filesonic.com/";
  172. $data = $obj->curl($url,"","");
  173. if (preg_match('/ocation: (.*)/', $data, $fsnlink)) $url = trim($fsnlink[1]);
  174. $linkFSN= explode('/', $url);$urllogin = "http://".$linkFSN[2]."/user/login";
  175. //==== Fix link FSN ====
  176. if(check_account("filesonic.com",$account)==true) die("false");
  177. if (stristr($account,':')) {
  178. list($user, $pass) = explode(':', $account);
  179. $post["email"]= $user;
  180. $post["password"]= $pass;
  181. $page = $obj->curl($urllogin,"",$post);
  182. if(strpos($page,"No user found with such email"))
  183. die("false");
  184. else {
  185. $cookies = $obj->GetCookies($page);
  186. $cookie = explode(" ", $cookies);
  187. $cookie = $cookie[3];
  188. }
  189. }
  190. else $cookie = $account;
  191. if(check_account("filesonic.com",$cookie)==true) die("false");
  192. $cookie = preg_replace("/(phpsessid=|Phpsessid=|PHPSESSID=)/","",$cookie);
  193. $data = $obj->curl($url."user/settings","PHPSESSID=".$cookie,"");
  194. if(strpos($data,'Pro Membership Valid Until')) {
  195. $obj->acc["filesonic.com"]['accounts'][] = $account;
  196. $donate = true;
  197. }
  198. }
  199. ################################## DONATE ACC filesonic.com ###################################################################
  200. ################################## DONATE ACC wupload.com #####################################################################
  201. elseif($type == "wupload"){
  202. //==== Fix link ====
  203. $url = "http://www.wupload.com/";
  204. $data = $obj->curl($url,"","");
  205. if (preg_match('/ocation: (.*)/', $data, $fsnlink)) $url = trim($fsnlink[1]);
  206. $linkWU= explode('/', $url);$urllogin = "http://".$linkWU[2]."/account/login";
  207. //==== Fix link ====
  208. if(check_account("wupload.com",$account)==true) die("false");
  209. if (stristr($account,':')) {
  210. list($user, $pass) = explode(':', $account);
  211. $page = $obj->curl($urllogin,"","email=$user&redirect=%2F&password=$pass");
  212. if(strpos($page,"No user found with such email"))
  213. die("false");
  214. else {
  215. $cookie = $obj->GetCookies($page);
  216. preg_match('/lang=en; role=anonymous;(.*); PHPSESSID=(.*);/',$cookie,$temp);
  217. $cookie = $temp[2];
  218. }
  219. }
  220. else $cookie = $account;
  221. if(check_account("wupload.com",$cookie)==true) die("false");
  222. $cookie = preg_replace("/(phpsessid=|Phpsessid=|PHPSESSID=)/","",$cookie);
  223. $data = $obj->curl("http://".$linkWU[2]."/account/settings","PHPSESSID=".$cookie,"");
  224. if(strpos($data,'Premium Membership Valid Until')) {
  225. $obj->acc["wupload.com"]['accounts'][] = $account;
  226. $donate = true;
  227. }
  228. }
  229. ################################## DONATE ACC wupload.com #####################################################################
  230. ################################## savve account #############################################################################
  231. if($donate == true && is_array($obj->acc) && count($obj->acc) > 0) {
  232. $str = "<?php";
  233. $str .= "\n";
  234. $str .= "\n\$this->acc = array(";
  235. $str .= "\n";
  236. $str .= "# Example: 'accounts' => array('user:pass','cookie'),\n";
  237. $str .= "# Example with letitbit.net: 'accounts' => array('user:pass,cookie,prekey=xxxx'),\n";
  238. $str .= "\n";
  239. foreach ($obj->acc as $host => $accounts) {
  240. $str .= "\n '".$host."' => array(";
  241. $str .= "\n 'max_size' => ".($accounts['max_size']?$accounts['max_size']:1024).",";
  242. $str .= "\n 'accounts' => array(";
  243. foreach ($accounts['accounts'] as $acc) {
  244. $str .= "\"".$acc."\",";
  245. }
  246. $str .= "),";
  247. $str .= "\n ),";
  248. $str .= "\n";
  249. }
  250. $str .= "\n);";
  251. $str .= $obj->max_size_other_host ? "\n\$this->max_size_other_host = ".$obj->max_size_other_host.";" : "\n\$this->max_size_other_host = 1024;";
  252. $str .= "\n";
  253. $str .= "\n?>";
  254. $accountPath = "account.php";
  255. $CF = fopen ($accountPath, "w")
  256. or die('<CENTER><font color=red size=3>could not open file! Try to chmod the file "<B>account.php</B>" to 666</font></CENTER>');
  257. fwrite ($CF, $str)
  258. or die('<CENTER><font color=red size=3>could not write file! Try to chmod the file "<B>account.php</B>" to 666</font></CENTER>');
  259. fclose ($CF);
  260. @chmod($accountPath, 0666);
  261. echo "true";
  262. }
  263. else echo "false";
  264. ################################## savve account #############################################################################
  265. }
  266. /*
  267. * Home page: http://vinaget.us
  268. * Blog: http://blog.vinaget.us
  269. * Script Name: Vinaget
  270. * Version: 2.6.2 (18.11.2011)
  271. * Description:
  272. - Vinaget is script generator premium link that allows you to download files instantly and at the best of your Internet speed.
  273. - Vinaget is your personal proxy host protecting your real IP to download files hosted on hosters like RapidShare, megaupload, hotfile...
  274. - You can now download files with full resume support from filehosts using download managers like IDM etc
  275. - Vinaget is a Free Open Source, supported by a growing community.
  276. * Code LeechViet by VinhNhaTrang
  277. * Developed by ..:: [H] ::..
  278. */
  279. ?>