PageRenderTime 39ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/hosts/upload/mediafire.com.php

https://github.com/gartz/RapidLeetch
PHP | 123 lines | 97 code | 18 blank | 8 comment | 15 complexity | 84606ea335869ccc57f6c1b63ea16b3b MD5 | raw file
  1. <?php
  2. ####### Free Account Info. ###########
  3. $mediafire_login = ""; // Set you username
  4. $mediafire_pass = ""; // Set your password
  5. ##############################
  6. $not_done=true;
  7. $continue_up=false;
  8. if ($mediafire_login & $mediafire_pass){
  9. $_REQUEST['my_login'] = $mediafire_login;
  10. $_REQUEST['my_pass'] = $mediafire_pass;
  11. $_REQUEST['action'] = "FORM";
  12. echo "<b><center>Use Default login/pass.</center></b>\n";
  13. }
  14. if ($_REQUEST['action'] == "FORM")
  15. $continue_up=true;
  16. else{
  17. ?>
  18. <table border=0 style="width:270px;" cellspacing=0 align=center>
  19. <form method=post>
  20. <input type=hidden name=action value='FORM' />
  21. <tr><td nowrap>&nbsp;Email*<td>&nbsp;<input type=text name=my_login value='' style="width:160px;" />&nbsp;</tr>
  22. <tr><td nowrap>&nbsp;Password*<td>&nbsp;<input type=password name=my_pass value='' style="width:160px;" />&nbsp;</tr>
  23. <tr><td colspan=2 align=center><input type=submit value='Upload' /></tr>
  24. <tr><td colspan=2 align=center><small>*You can set it as default in <b><?php echo $page_upload["mediafire.com"]; ?></b></small></tr>
  25. </form>
  26. </table>
  27. <?php
  28. }
  29. if ($continue_up)
  30. {
  31. $not_done=false;
  32. ?>
  33. <table width=600 align=center>
  34. </td></tr>
  35. <tr><td align=center>
  36. <div id=info width=100% align=center>Retrive upload ID</div>
  37. <?php
  38. $Url=parse_url("http://www.mediafire.com/");
  39. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"],$pauth);
  40. $cookies=GetCookies($page);
  41. if (empty($_REQUEST['my_login']) || empty($_REQUEST['my_pass'])) html_error('No entered Login/Password');
  42. $Url=parse_url("http://www.mediafire.com/dynamic/login.php");
  43. $post["login_email"]=trim($_REQUEST['my_login']);
  44. $post["login_pass"]=trim($_REQUEST['my_pass']);
  45. $post["submit_login"]="Login+to+MediaFire";
  46. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), "http://www.mediafire.com/", $cookies, $post, 0, $_GET["proxy"],$pauth);
  47. is_page($page);
  48. if(strpos($page,"user=") !== false)
  49. {
  50. $cookies=$cookies . '; ' . GetCookies($page);
  51. }
  52. $matc = array();
  53. preg_match("/ukey=[^ ;\r\n]+/",$cookies,$matc);
  54. $ukey=$matc[0];
  55. preg_match("/user=[^ ;\r\n]+/",$cookies,$matc);
  56. $user=$matc[0];
  57. $rnn=rand(10000,99999);
  58. $Url=parse_url("http://www.mediafire.com/basicapi/uploaderconfiguration.php?".$rnn);
  59. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), "http://www.mediafire.com/", $cookies, 0, 0, $_GET["proxy"],$pauth);
  60. is_page($page);
  61. $track= cut_str ( $page ,'<trackkey>' ,'</trackkey>' );
  62. $uploadkey= cut_str ( $page ,'<folderkey>' ,'</folderkey>' );
  63. $MFULConfig = cut_str ( $page ,'<MFULConfig>' ,'</MFULConfig>' );
  64. $url=parse_url("http://www.mediafire.com/basicapi/doupload.php?track=".$track."&".$ukey."&".$user."&uploadkey=".$uploadkey."&upload=0");
  65. ?>
  66. <script>document.getElementById('info').style.display='none';</script>
  67. <table width=600 align=center>
  68. </td></tr>
  69. <tr><td align=center>
  70. <?
  71. unset($post);
  72. $post["Upload"]="Submit Query";
  73. $upagent = "Shockwave Flash";
  74. $upfiles = upfile($url["host"],$url["port"] ? $url["port"] : 80, $url["path"].($url["query"] ? "?".$url["query"] : ""), 0, $ukey, $post, $lfile, $lname, "Filedata",0,0,0,$upagent);
  75. is_page($upfiles);
  76. ?>
  77. <script>document.getElementById('progressblock').style.display='none';</script>
  78. <div id=final width=100% align=center>Get final code</div>
  79. <?php
  80. $key = cut_str($upfiles,"<key>","</key>");
  81. if (!$key) html_error("Error retrive final id");
  82. $error=true;
  83. for ($i=1;$i<12;$i++){
  84. sleep(4);
  85. $page = geturl("www.mediafire.com",80,"/basicapi/pollupload.php?key=".$key."&MFULConfig=".$MFULConfig,"http://www.mediafire.com/myfiles.php",$cookies);
  86. //echo "$i ";
  87. if (stristr($page,"<fileerror>13</fileerror>")){
  88. html_error("File already existent! for your link get it in mediafire member section");
  89. }
  90. if (strstr($page,"No more requests")){$error = false; break;}
  91. }
  92. if ($error == true) html_error("Error verification time out!");
  93. $links_up_file = cut_str($page,'<quickkey>','</quickkey>');
  94. if (!$links_up_file){
  95. echo $page;
  96. html_error("Error retrive upload links!");
  97. }
  98. $download_link = 'http://www.mediafire.com/?'.$links_up_file;
  99. }
  100. /*************************\
  101. Written by kaox 20-feb-10
  102. Updated by szalinski 26-Aug-09
  103. Updated by kaox 03-apr-10
  104. \*************************/
  105. ?>