..we are going to create a new app for the hacksuite. We're not going to do anything fancy here, we will make a simple app to get familiar how to write compatible scripts for the..
Discovers interesting locations, paths and data of a website
<?php
/* Edit File handler
Author: Remco Kouw
Site: http://www.hacksuite.com
Last Edit: 04-03-2015
*/
if(!defined('IN_SCRIPT')){
exit;
}
if(!file_exists($sDest)){
$sCode .= "<div class=\"spacingmsg\">".$_CONTEXT['result_headers']['error']."Invalid source file<p><a href=\"development.php?action=list\">[ back ]</a></p></div>\n";
}
else{
if(!function_exists("GetFileData")){
@include_once($_PATHS['functions_root']."/get_file_data.php");
}
if(!isset($_POST['sNewData'])){
$sCode = " <form method=\"post\">\n";
$sCode .= " <div class=\"emboss borderr5 border1pxtrans pad5 edgeglow overflw\">\n";
$sCode .= " <div class=\"embosshdrnocenter border1pxtrans pad10\">edit file</div>\n";
$sCode .= " <div class=\"cc_record\">\n";
$sCode .= " <div class=\"flt pad3\">[ edit ]</div><div class=\"flt pad3\"><input type=\"hidden\" name=\"manager\" value=\"editfile\" /><input type=\"hidden\" name=\"sValue\" value=\"".$sDest."\" /><textarea rows=\"15\" cols=\"50\" name=\"sNewData\">".GetFileData($sDest)."</textarea><br /><input type=\"submit\" name=\"submit\" value=\"Edit\" /></div>\n";
$sCode .= " </div>\n";
$sCode .= " <div class=\"clear\"></div>\n";
$sCode .= " </div>\n";
$sCode .= " </form>\n";
}
else{
if(!function_exists("WriteF")){
include_once($_PATHS['functions_root']."/fwrite.php");
}
$sCode .= "<div class=\"spacingmsg\">".$_CONTEXT['result_headers']['result'].(WriteF($sDest,$_POST['sNewData'],"w") ? "Successfully edited file" : "Failed to edit file")."<p><a href=\"development.php?action=list\">[ back ]</a></p></div>\n";
}
}
?>