elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Recopilación Tutoriales y Manuales Hacking, Seguridad, Privacidad, Hardware, etc


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP) (Moderador: kub0x)
| | | |-+  [C#] MD5 Cracker 0.3
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [C#] MD5 Cracker 0.3  (Leído 1,940 veces)
BigBear


Desconectado Desconectado

Mensajes: 545



Ver Perfil
[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 :

Código
  1. // MD5 Cracker 0.3
  2. // (C) Doddy Hackman 2014
  3. // Credits :
  4. // Based in ->
  5. // http://md5online.net
  6. // http://md5decryption.com
  7. // http://md5.my-addr.com
  8. // Thanks to aeonhack for the Theme Skin
  9.  
  10. using System;
  11. using System.Collections.Generic;
  12. using System.ComponentModel;
  13. using System.Data;
  14. using System.Drawing;
  15. using System.Text;
  16. using System.Windows.Forms;
  17. using System.Text.RegularExpressions;
  18.  
  19. namespace md5cracker
  20. {
  21.    public partial class Form1 : Form
  22.    {
  23.        public Form1()
  24.        {
  25.            InitializeComponent();
  26.        }
  27.  
  28.        private void droneButton2_Click(object sender, EventArgs e)
  29.        {
  30.            toolStripStatusLabel1.Text = "[+] Cracking ...";
  31.            this.Refresh();
  32.  
  33.            //202cb962ac59075b964b07152d234b70
  34.  
  35.            string md5 = textBox1.Text;
  36.            string rta = "";
  37.            string code = "";
  38.  
  39.            DH_Tools tools = new DH_Tools();
  40.            code = tools.tomar("http://md5online.net/index.php", "pass=" + md5 + "&option=hash2text&send=Submit");
  41.  
  42.            Match regex = Regex.Match(code, "<center><p>md5 :<b>(.*?)</b> <br>pass : <b>(.*?)</b></p>", RegexOptions.IgnoreCase);
  43.            if (regex.Success)
  44.            {
  45.                rta = regex.Groups[2].Value;
  46.  
  47.            }
  48.            else
  49.            {
  50.                code = tools.tomar("http://md5decryption.com/index.php", "hash=" + md5 + "&submit=Decrypt It!");
  51.  
  52.                regex = Regex.Match(code, "Decrypted Text: </b>(.*?)</font>", RegexOptions.IgnoreCase);
  53.                if (regex.Success)
  54.                {
  55.                    rta = regex.Groups[1].Value;
  56.  
  57.                }
  58.                else
  59.                {
  60.                    code = tools.tomar("http://md5.my-addr.com/md5_decrypt-md5_cracker_online/md5_decoder_tool.php", "md5=" + md5);
  61.                    regex = Regex.Match(code, "<span class='middle_title'>Hashed string</span>: (.*?)</div>", RegexOptions.IgnoreCase);
  62.                    if (regex.Success)
  63.                    {
  64.                        rta = regex.Groups[1].Value;
  65.  
  66.                    }
  67.                    else
  68.                    {
  69.                        rta = "Not Found";
  70.                    }
  71.  
  72.                }
  73.  
  74.            }
  75.  
  76.            textBox2.Text = rta;
  77.  
  78.            toolStripStatusLabel1.Text = "[+] Finished";
  79.            this.Refresh();
  80.  
  81.        }
  82.  
  83.        private void droneButton3_Click(object sender, EventArgs e)
  84.        {
  85.            Clipboard.SetText(textBox2.Text);
  86.  
  87.            toolStripStatusLabel1.Text = "[+] Copied";
  88.            this.Refresh();
  89.        }
  90.  
  91.        private void droneButton1_Click(object sender, EventArgs e)
  92.        {
  93.            Application.Exit();
  94.        }
  95.  
  96.    }
  97. }
  98.  
  99. // The End ?
  100.  

Código
  1. // Class Name : DH Tools
  2. // Version : Beta
  3. // Author : Doddy Hackman
  4. // (C) Doddy Hackman 2014
  5. //
  6. // Functions :
  7. //
  8. // [+] HTTP Methods GET & POST
  9. // [+] Get HTTP Status code number
  10. // [+] HTTP FingerPrinting
  11. // [+] Read File
  12. // [+] Write File
  13. // [+] GET OS
  14. // [+] Remove duplicates from a List
  15. // [+] Cut urls from a List
  16. // [+] Download
  17. // [+] Upload
  18. // [+] Get Basename from a path
  19. // [+] Execute commands
  20. // [+] URI Split
  21. // [+] MD5 Hash Generator
  22. // [+] Get MD5 of file
  23. // [+] Get IP address from host name
  24. //
  25. // Credits :
  26. //
  27. // Method POST -> https://technet.rapaport.com/Info/Prices/SampleCode/Full_Example.aspx
  28. // Method GET -> http://stackoverflow.com/questions/4510212/how-i-can-get-web-pages-content-and-save-it-into-the-string-variable
  29. // HTTP Headers -> http://msdn.microsoft.com/en-us/library/system.net.httpwebresponse.headers%28v=vs.110%29.aspx
  30. // List Cleaner -> http://forums.asp.net/t/1318899.aspx?Remove+duplicate+items+from+List+String+
  31. // Execute command -> http://www.codeproject.com/Articles/25983/How-to-Execute-a-Command-in-C
  32. // MD5 Hash Generator -> http://www.java2s.com/Code/CSharp/Security/GetandverifyMD5Hash.htm
  33. // Get MD5 of file -> http://stackoverflow.com/questions/10520048/calculate-md5-checksum-for-a-file
  34. //
  35. // Thanks to : $DoC and atheros14 (Forum indetectables)
  36. //
  37.  
  38. using System;
  39. using System.Collections.Generic;
  40. using System.Text;
  41.  
  42. using System.Net;
  43. using System.IO;
  44. using System.Text.RegularExpressions;
  45. using System.Security.Cryptography;
  46.  
  47. namespace md5cracker
  48. {
  49.    class DH_Tools
  50.    {
  51.        public string toma(string url)
  52.        {
  53.            string code = "";
  54.  
  55.            try
  56.            {
  57.                WebClient nave = new WebClient();
  58.                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
  59.                code = nave.DownloadString(url);
  60.            }
  61.            catch
  62.            {
  63.                //
  64.            }
  65.            return code;
  66.        }
  67.  
  68.        public string tomar(string url, string par)
  69.        {
  70.  
  71.            string code = "";
  72.  
  73.            try
  74.            {
  75.  
  76.                HttpWebRequest nave = (HttpWebRequest)
  77.                WebRequest.Create(url);
  78.  
  79.                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
  80.                nave.Method = "POST";
  81.                nave.ContentType = "application/x-www-form-urlencoded";
  82.  
  83.                Stream anteantecode = nave.GetRequestStream();
  84.  
  85.                anteantecode.Write(Encoding.ASCII.GetBytes(par), 0, Encoding.ASCII.GetBytes(par).Length);
  86.                anteantecode.Close();
  87.  
  88.                StreamReader antecode = new StreamReader(nave.GetResponse().GetResponseStream());
  89.                code = antecode.ReadToEnd();
  90.  
  91.            }
  92.            catch
  93.            {
  94.                //
  95.            }
  96.  
  97.            return code;
  98.  
  99.        }
  100.  
  101.        public string respondecode(string url)
  102.        {
  103.            String code = "";
  104.            try
  105.            {
  106.                HttpWebRequest nave = (HttpWebRequest)WebRequest.Create(url);
  107.                nave.UserAgent = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
  108.                HttpWebResponse num = (HttpWebResponse)nave.GetResponse();
  109.  
  110.                int number = (int)num.StatusCode;
  111.                code = Convert.ToString(number);
  112.  
  113.            }
  114.            catch
  115.            {
  116.  
  117.                code = "404";
  118.  
  119.            }
  120.            return code;
  121.        }
  122.  
  123.        public string httpfinger(string url)
  124.        {
  125.  
  126.            String code = "";
  127.  
  128.            try
  129.            {
  130.  
  131.                HttpWebRequest nave1 = (HttpWebRequest)WebRequest.Create(url);
  132.                HttpWebResponse nave2 = (HttpWebResponse)nave1.GetResponse();
  133.  
  134.                for (int num = 0; num < nave2.Headers.Count; ++num)
  135.                {
  136.                    code = code + "[+] " + nave2.Headers.Keys[num] + ":" + nave2.Headers[num] + Environment.NewLine;
  137.                }
  138.  
  139.                nave2.Close();
  140.            }
  141.            catch
  142.            {
  143.                //
  144.            }
  145.  
  146.            return code;
  147.  
  148.        }
  149.  
  150.        public string openword(string file)
  151.        {
  152.            String code = "";
  153.            try
  154.            {
  155.                code = System.IO.File.ReadAllText(file);
  156.            }
  157.            catch
  158.            {
  159.                //
  160.            }
  161.            return code;
  162.        }
  163.  
  164.        public void savefile(string file, string texto)
  165.        {
  166.  
  167.            try
  168.            {
  169.                System.IO.StreamWriter save = new System.IO.StreamWriter(file, true);
  170.                save.Write(texto);
  171.                save.Close();
  172.            }
  173.            catch
  174.            {
  175.                //
  176.            }
  177.        }
  178.  
  179.        public string getos()
  180.        {
  181.            string code = "";
  182.  
  183.            try
  184.            {
  185.                System.OperatingSystem os = System.Environment.OSVersion;
  186.                code = Convert.ToString(os);
  187.            }
  188.            catch
  189.            {
  190.                code = "?";
  191.            }
  192.  
  193.            return code;
  194.        }
  195.  
  196.        public List<string> repes(List<string> array)
  197.        {
  198.            List<string> repe = new List<string>();
  199.            foreach (string lin in array)
  200.            {
  201.                if (!repe.Contains(lin))
  202.                {
  203.                    repe.Add(lin);
  204.                }
  205.            }
  206.  
  207.            return repe;
  208.  
  209.        }
  210.  
  211.        public List<string> cortar(List<string> otroarray)
  212.        {
  213.            List<string> cort = new List<string>();
  214.  
  215.            foreach (string row in otroarray)
  216.            {
  217.  
  218.                String lineafinal = "";
  219.  
  220.                Match regex = Regex.Match(row, @"(.*)\?(.*)=(.*)", RegexOptions.IgnoreCase);
  221.                if (regex.Success)
  222.                {
  223.                    lineafinal = regex.Groups[1].Value + "?" + regex.Groups[2].Value + "=";
  224.                    cort.Add(lineafinal);
  225.                }
  226.  
  227.            }
  228.  
  229.            return cort;
  230.        }
  231.  
  232.        public string download(string url, string savename)
  233.        {
  234.  
  235.            String code = "";
  236.  
  237.            WebClient nave = new WebClient();
  238.            nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
  239.  
  240.            try
  241.            {
  242.                nave.DownloadFile(url, savename);
  243.                code = "OK";
  244.            }
  245.            catch
  246.            {
  247.                code = "Error";
  248.            }
  249.  
  250.            return code;
  251.        }
  252.  
  253.        public string upload(string link, string archivo)
  254.        {
  255.  
  256.            String code = "";
  257.  
  258.            try
  259.            {
  260.  
  261.                WebClient nave = new WebClient();
  262.                nave.Headers["User-Agent"] = "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0";
  263.                byte[] codedos = nave.UploadFile(link, "POST", archivo);
  264.                code = System.Text.Encoding.UTF8.GetString(codedos, 0, codedos.Length);
  265.  
  266.            }
  267.  
  268.            catch
  269.            {
  270.                code = "Error";
  271.            }
  272.  
  273.            return code;
  274.  
  275.        }
  276.  
  277.        public string basename(string file)
  278.        {
  279.            String nombre = "";
  280.  
  281.            FileInfo basename = new FileInfo(file);
  282.            nombre = basename.Name;
  283.  
  284.            return nombre;
  285.  
  286.        }
  287.  
  288.        public string console(string cmd)
  289.        {
  290.  
  291.            string code = "";
  292.  
  293.            try
  294.            {
  295.  
  296.                System.Diagnostics.ProcessStartInfo loadnow = new System.Diagnostics.ProcessStartInfo("cmd", "/c " + cmd);
  297.                loadnow.RedirectStandardOutput = true;
  298.                loadnow.UseShellExecute = false;
  299.                loadnow.CreateNoWindow = true;
  300.                System.Diagnostics.Process loadnownow = new System.Diagnostics.Process();
  301.                loadnownow.StartInfo = loadnow;
  302.                loadnownow.Start();
  303.                code = loadnownow.StandardOutput.ReadToEnd();
  304.  
  305.            }
  306.  
  307.            catch
  308.            {
  309.                code = "Error";
  310.            }
  311.  
  312.            return code;
  313.  
  314.        }
  315.  
  316.        public string urisplit(string url, string opcion)
  317.        {
  318.  
  319.            string code = "";
  320.  
  321.            Uri dividir = new Uri(url);
  322.  
  323.            if (opcion == "host")
  324.            {
  325.                code = dividir.Host;
  326.            }
  327.  
  328.            if (opcion == "port")
  329.            {
  330.                code = Convert.ToString(dividir.Port);
  331.            }
  332.  
  333.            if (opcion == "path")
  334.            {
  335.                code = dividir.LocalPath;
  336.            }
  337.  
  338.            if (opcion == "file")
  339.            {
  340.                code = dividir.AbsolutePath;
  341.                FileInfo basename = new FileInfo(code);
  342.                code = basename.Name;
  343.            }
  344.  
  345.            if (opcion == "query")
  346.            {
  347.                code = dividir.Query;
  348.            }
  349.  
  350.            if (opcion == "")
  351.            {
  352.                code = "Error";
  353.            }
  354.  
  355.            return code;
  356.        }
  357.  
  358.        public string convertir_md5(string text)
  359.        {
  360.            MD5 convertirmd5 = MD5.Create();
  361.            byte[] infovalor = convertirmd5.ComputeHash(Encoding.Default.GetBytes(text));
  362.            StringBuilder guardar = new StringBuilder();
  363.            for (int numnow = 0; numnow < infovalor.Length; numnow++)
  364.            {
  365.                guardar.Append(infovalor[numnow].ToString("x2"));
  366.            }
  367.            return guardar.ToString();
  368.        }
  369.  
  370.        public string md5file(string file)
  371.        {
  372.  
  373.            string code = "";
  374.  
  375.            try
  376.            {
  377.                var gen = MD5.Create();
  378.                var ar = File.OpenRead(file);
  379.                code = BitConverter.ToString(gen.ComputeHash(ar)).Replace("-", "").ToLower();
  380.  
  381.            }
  382.            catch
  383.            {
  384.                code = "Error";
  385.            }
  386.  
  387.            return code;
  388.        }
  389.  
  390.        public string getip(string host)
  391.        {
  392.            string code = "";
  393.            try
  394.            {
  395.                IPAddress[] find = Dns.GetHostAddresses(host);
  396.                code = find[0].ToString();
  397.            }
  398.            catch
  399.            {
  400.                code = "Error";
  401.            }
  402.            return code;
  403.        }
  404.  
  405.    }
  406. }
  407.  
  408. // The End ?
  409.  

Si quieren bajar el programa lo pueden hacer de aca.


« Última modificación: 11 Julio 2014, 18:40 pm por Doddy » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
[Ruby] MD5 Cracker 0.2
Scripting
BigBear 2 2,145 Último mensaje 30 Mayo 2015, 18:36 pm
por Kaxperday
[Java] MD5 Cracker 0.2
Java
BigBear 1 1,459 Último mensaje 22 Enero 2016, 16:29 pm
por 0xFer
[C#] ZIP Cracker 0.2
.NET (C#, VB.NET, ASP)
BigBear 0 1,661 Último mensaje 28 Mayo 2016, 03:43 am
por BigBear
Cursos de Cracking joe cracker y SACCOPhHARYNX
Ingeniería Inversa
Anonymous- 2 4,622 Último mensaje 19 Noviembre 2020, 15:56 pm
por MCKSys Argentina
Cracker
Hacking
Marlon357 2 2,290 Último mensaje 25 Noviembre 2021, 20:55 pm
por Marlon357
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines