PageRenderTime 51ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/hosts/upload/filefront.com.php

http://rapidleech.googlecode.com/
PHP | 102 lines | 87 code | 12 blank | 3 comment | 4 complexity | 4963adaf41e0db9b1f009586f0bf066e MD5 | raw file
  1. <?php
  2. ####### Free Account Info. ###########
  3. $filefront_username=""; // Set you username
  4. $filefront_password=""; // Set your password
  5. ##############################
  6. $not_done=true;
  7. $continue_up=false;
  8. if ($filefront_username & $filefront_password){
  9. $_REQUEST['my_login'] = $filefront_username;
  10. $_REQUEST['my_pass'] = $filefront_password;
  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;Username*<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["filefront.com"]; ?></b></small></tr>
  25. </table>
  26. </form>
  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. $usr=$_REQUEST['my_login'];
  39. $pass=$_REQUEST['my_pass'];
  40. $referrer="http://hosted.filefront.com/".$usr;
  41. $Url = parse_url("http://signup.filefront.com/");
  42. $post['uploadID'] = "";
  43. $post['existingUser'] = "1";
  44. $post['redirectTo'] = $referrer;
  45. $post['pageID'] = "49";
  46. $post['loginUser'] = $usr;
  47. $post['loginPass'] = $pass;
  48. $post['x'] = rand(1,50);
  49. $post['y'] = rand(1,20);
  50. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $referrer, 0, $post, 0, $_GET["proxy"],$pauth);
  51. is_page($page);
  52. is_present($page,"signup","Not logged in. Check your login details in filefront.com.php");
  53. preg_match_all('/Set-Cookie: (.*);/U',$page,$temp);
  54. $cook = $temp[1];
  55. $cookie = implode(';',$cook);
  56. $Url = parse_url("http://uploadhosted.filefront.com/");
  57. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $referrer, $cookie, 0, 0, $_GET["proxy"],$pauth);
  58. is_page($page);
  59. $formact=cut_str($page, '<div class="rightColUpload">', '</div>');
  60. $url_action=cut_str($formact, 'action="', '"');
  61. $fpost['UPLOAD_IDENTIFIER'] = cut_str($page, 'UPLOAD_IDENTIFIER value="', '"');
  62. $fpost['FL'] = "k";
  63. $fpost['upload'] = "1";
  64. $fpost['game'] = "";
  65. ?>
  66. <script>document.getElementById('info').style.display='none';</script>
  67. <table width=600 align=center>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td align=center>
  72. <?php
  73. $referrer="http://uploadhosted.filefront.com/";
  74. $url = parse_url($url_action);
  75. $upagent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1";
  76. $upfiles = upfile($url["host"],$url["port"] ? $url["port"] : 80, $url["path"].($url["query"] ? "?".$url["query"] : ""),$referrer, $cookie, $fpost, $lfile, $lname, "upload_formdata[0]");
  77. ?>
  78. <script>document.getElementById('progressblock').style.display='none';</script>
  79. <?php
  80. preg_match('/location: *(.*)/i', $upfiles, $redir);
  81. $Href = rtrim($redir[1]);
  82. $Url = parse_url($Href);
  83. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $referrer, $cookie, 0, 0, $_GET["proxy"],$pauth);
  84. is_present($page,"Duplicate file","You attempted to upload a file that already exists in your directory. Please rename the file or delete the existing file.",0);
  85. is_notpresent($page,"Upload Successful!","Error upload file",0);
  86. preg_match('/http:\/\/files\.filefront\.com\/\w+/i', $page, $down);
  87. $download_link=$down[0];
  88. }
  89. // written by kaox 09/06/2009
  90. ?>