Example #1
0
ini_set('max_execution_time', 500);
//Module details
$module_name_here = "Github Code Enumerator";
$module_path_here = "recon/profiles-repositories/github_repos";
$allowed_actions = ["options", "info"];
//Run module
if (isset($_POST['module_option_source']) && strlen($_POST['module_option_source']) > 0) {
    //Configuration & Functions
    require_once "../../../../includes/config.php";
    require_once "../../../../includes/functions.php";
    $module_source = urldecode($_POST['module_option_source']);
    $sid = manager_recon("init", NULL);
    $use_module = manager_recon("use", array($module_path_here, $sid));
    $set_module_source = manager_recon("set", array('SOURCE', $module_source, $sid));
    $run_module = manager_recon("run", $sid);
    echo "<pre>";
    print_r($run_module);
    echo "</pre>";
    return;
}
//Show data based on action
if (strlen($action) > 0 && in_array($action, $allowed_actions)) {
    if ($action == "options") {
        ?>
        Module Name: <b><?php 
        echo $module_name_here;
        ?>
</b><br>
        Module path: <b><?php 
        echo $module_path_here;
Example #2
0
<?php

if (strtolower($_SERVER['REQUEST_METHOD']) == "post") {
    try {
        require_once "includes/config.php";
        require_once "includes/functions.php";
        $sid = manager_recon("init", NULL);
        $set_global_debug = manager_recon("global_set", array('DEBUG', "False", $sid));
        $set_global_namerserver = manager_recon("global_set", array('NAMESERVER', "8.8.8.8", $sid));
        $set_global_threads = manager_recon("global_set", array('THREADS', "10", $sid));
        $set_global_timeout = manager_recon("global_set", array('TIMEOUT', "10", $sid));
        $set_global_useragent = manager_recon("global_set", array('USER-AGENT', "Recon-ng/v4", $sid));
        $set_global_verbose = manager_recon("global_set", array('VERBOSE', "True", $sid));
        $set_global_proxy = manager_recon("global_set", array('PROXY', '""', $sid));
        $set_recon_workspace = manager_recon("workspace", array("default", $sid));
        @session_start();
        $_SESSION = array();
        if (ini_get("session.use_cookies")) {
            $params = session_get_cookie_params();
            setcookie(session_name(), '', time() - 42000, $params["path"], $params["domain"], $params["secure"], $params["httponly"]);
        }
        @session_destroy();
        echo '<div class="alert alert-success"><span class="glyphicon glyphicon-ok"></span> Recon-ng configuration has been reset to default."</div>';
        return;
    } catch (Exception $e) {
        echo '<div class="alert alert-danger"><span class="glyphicon glyphicon-remove"></span> Resetting Recon-ng failed. Try again or contact administrator</div>';
    }
    return;
}
?>
<!DOCTYPE html>
     $global_useragent = html_entity_decode(urldecode($_POST['global_useragent']));
     $global_verbose = urldecode($_POST['global_verbose']);
     $global_proxy = "";
     $sid = manager_recon("init", NULL);
     $set_global_debug = manager_recon("global_set", array('DEBUG', $global_debug, $sid));
     $set_global_namerserver = manager_recon("global_set", array('NAMESERVER', $global_nameserver, $sid));
     $set_global_threads = manager_recon("global_set", array('THREADS', $global_threads, $sid));
     $set_global_timeout = manager_recon("global_set", array('TIMEOUT', $global_timeout, $sid));
     $set_global_useragent = manager_recon("global_set", array('USER-AGENT', $global_useragent, $sid));
     $set_global_verbose = manager_recon("global_set", array('VERBOSE', $global_verbose, $sid));
     if (isset($_POST['global_proxy'])) {
         $global_proxy = urldecode($_POST['global_proxy']);
         if (strlen($global_proxy) == 0) {
             $set_global_proxy = manager_recon("global_set", array('PROXY', '""', $sid));
         } else {
             $set_global_proxy = manager_recon("global_set", array('PROXY', $global_proxy, $sid));
         }
     }
     @session_start();
     $_SESSION['recon_global_debug'] = $global_debug;
     $_SESSION['recon_global_nameserver'] = $global_nameserver;
     $_SESSION['recon_global_threads'] = $global_threads;
     $_SESSION['recon_global_timeout'] = $global_timeout;
     $_SESSION['recon_global_useragent'] = $global_useragent;
     $_SESSION['recon_global_verbose'] = $global_verbose;
     if (isset($_POST['global_proxy'])) {
         $_SESSION['recon_global_proxy'] = $global_proxy;
     }
     echo '<div class="alert alert-success"><span class="glyphicon glyphicon-ok"></span> Recon-ng global options configured successfully.</div>';
     return;
 } catch (Exception $e) {
Example #4
0
<?php

if (isset($_POST['set_workspace']) && strlen($_POST['set_workspace']) > 0) {
    try {
        $set_workspace = urldecode($_POST['set_workspace']);
        require_once "includes/config.php";
        require_once "includes/functions.php";
        $sid = manager_recon("init", NULL);
        $set_recon_workspace = manager_recon("workspace", array($set_workspace, $sid));
        echo '<div class="alert alert-success"><span class="glyphicon glyphicon-ok"></span> Recon-ng workspace configured to "' . htmlentities($set_workspace) . '"</div>';
        @session_start();
        $_SESSION['recon_workspace'] = $set_workspace;
        return;
    } catch (Exception $e) {
        echo '<div class="alert alert-danger"><span class="glyphicon glyphicon-remove"></span> Setting Recon-ng workspace failed. Try again or contact administrator</div>';
    }
    return;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<title>Recon-ng Web</title>
	<?php 
@(require_once "includes/head-section.php");
?>
</head>
<body>
<div class="container">
	<?php 
@(require_once "includes/navbar.php");