[Batch] Generador de diccionario

  • 0 Respuestas
  • 200 Vistas

Valarjar
Hijo de Odyn

[Batch] Generador de diccionario
« en: Abril 13, 2017, 17:13:27 pm »
Con este código de lotes generamos un diccionario para fuerza bruta con la longitud deseada, ojo, cuanto más larga sea, más tiempo necesitará para terminarlo

diccionario.bat
Código: Winbatch
  1. @echo off
  2. title Generador de diccionario - Fuerza Bruta -
  3. color 0a
  4. setlocal enabledelayedexpansion
  5. :ini
  6. if exist dic.txt del /f /q dic.txt
  7. cls
  8. echo.
  9. set /p long="Longitud >:"
  10. if not defined long goto ini
  11. echo  Generando...
  12. echo  Por favor Espere.
  13. set c=0
  14.  
  15. :main
  16. for %%a in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  17. for %%b in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  18. for %%c in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  19. for %%d in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  20. for %%e in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  21. for %%f in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  22. for %%g in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  23. for %%h in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  24. for %%i in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  25. for %%j in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  26. for %%k in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  27. for %%l in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  28. for %%m in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  29. for %%n in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  30. for %%o in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  31. for %%p in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  32. for %%q in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  33. for %%r in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  34. for %%s in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  35. for %%t in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  36. for %%u in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  37. for %%v in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  38. for %%w in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  39. for %%x in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  40. for %%y in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  41. for %%z in (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do (
  42. call :comp %%a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r%%s%%t%%u%%v%%w%%x%%y%%z
  43. )
  44. set c=1
  45. )
  46. set c=2
  47. )
  48. set c=3
  49. )
  50. set c=4
  51. )
  52. set c=5
  53. )
  54. set c=6
  55. )
  56. set c=7
  57. )
  58. set c=8
  59. )
  60. set c=9
  61. )
  62. set c=10
  63. )
  64. set c=11
  65. )
  66. set c=12
  67. )
  68. set c=13
  69. )
  70. set c=14
  71. )
  72. set c=15
  73. )
  74. set c=16
  75. )
  76. set c=17
  77. )
  78. set c=18
  79. )
  80. set c=19
  81. )
  82. set c=20
  83. )
  84. set c=21
  85. )
  86. set c=22
  87. )
  88. set c=23
  89. )
  90. set c=24
  91. )
  92. set c=25
  93. )
  94. goto :fin
  95.  
  96. :comp
  97. set word=%*
  98. set dic=!word:~-%long%!
  99. echo %dic% >>dic.txt
  100. if %c%==%long% goto :fin
  101. goto :eof
  102.  
  103. :fin
  104. echo  Finalizado...OK.
  105. pause
  106. exit
  107.