Aerotactics

Untitled

Sep 30th, 2017
1,049
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.48 KB | None | 0 0
  1. @echo off
  2. setlocal enabledelayedexpansion
  3. title Batch Password Generator 1.0
  4.  
  5. set /a Length=10
  6. set /a TempLength=!Length!
  7. set Select=NULL
  8. set Password=
  9.  
  10. :Main
  11. cls
  12. echo .
  13. echo .
  14. echo [ Batch Password Generator ]
  15. echo .
  16. echo .
  17. echo 1) Length: !Length!
  18. echo 2) Generate New Password
  19. echo .
  20. echo .
  21. echo Result: !Password!
  22. choice /c 123456 /n /cs /t 9999 /d 6 /m "Choose an option from the list."
  23. set Select=!errorlevel!
  24.  
  25. if %Select%==1 goto SetLength
  26. if %Select%==2 (
  27. set /a TempLength=!Length!
  28. set Password=
  29. echo Generating New Password...
  30. goto SetPassword )
  31. goto Main
  32.  
  33. :SetLength
  34. cls
  35. echo .
  36. echo Set Length:
  37. echo .
  38. echo Note: Valid range is 1 - 100
  39. set /p Length=
  40. if !Length! LSS 1 goto SetLength
  41. if !Length! GTR 100 goto SetLength
  42. goto Main
  43.  
  44. :SetPassword
  45. set /a Type=!random! %% 4
  46. if "!Type!"=="0" (
  47. set /a Num=!random! %% 10
  48. set Password=!Password!!Num!
  49. goto EndSetPassword
  50. )
  51. if "!Type!"=="1" (
  52. set /a Num=!random! %% 26
  53. if "!Num!"=="0" (
  54. set Password=!Password!a
  55. goto EndSetPassword
  56. )
  57. if "!Num!"=="1" (
  58. set Password=!Password!b
  59. goto EndSetPassword
  60. )
  61. if "!Num!"=="2" (
  62. set Password=!Password!c
  63. goto EndSetPassword
  64. )
  65. if "!Num!"=="3" (
  66. set Password=!Password!d
  67. goto EndSetPassword
  68. )
  69. if "!Num!"=="4" (
  70. set Password=!Password!e
  71. goto EndSetPassword
  72. )
  73. if "!Num!"=="5" (
  74. set Password=!Password!f
  75. goto EndSetPassword
  76. )
  77. if "!Num!"=="6" (
  78. set Password=!Password!g
  79. goto EndSetPassword
  80. )
  81. if "!Num!"=="7" (
  82. set Password=!Password!h
  83. goto EndSetPassword
  84. )
  85. if "!Num!"=="8" (
  86. set Password=!Password!i
  87. goto EndSetPassword
  88. )
  89. if "!Num!"=="9" (
  90. set Password=!Password!j
  91. goto EndSetPassword
  92. )
  93. if "!Num!"=="10" (
  94. set Password=!Password!k
  95. goto EndSetPassword
  96. )
  97. if "!Num!"=="11" (
  98. set Password=!Password!l
  99. goto EndSetPassword
  100. )
  101. if "!Num!"=="12" (
  102. set Password=!Password!m
  103. goto EndSetPassword
  104. )
  105. if "!Num!"=="13" (
  106. set Password=!Password!n
  107. goto EndSetPassword
  108. )
  109. if "!Num!"=="14" (
  110. set Password=!Password!o
  111. goto EndSetPassword
  112. )
  113. if "!Num!"=="15" (
  114. set Password=!Password!p
  115. goto EndSetPassword
  116. )
  117. if "!Num!"=="16" (
  118. set Password=!Password!q
  119. goto EndSetPassword
  120. )
  121. if "!Num!"=="17" (
  122. set Password=!Password!r
  123. goto EndSetPassword
  124. )
  125. if "!Num!"=="18" (
  126. set Password=!Password!s
  127. goto EndSetPassword
  128. )
  129. if "!Num!"=="19" (
  130. set Password=!Password!t
  131. goto EndSetPassword
  132. )
  133. if "!Num!"=="20" (
  134. set Password=!Password!u
  135. goto EndSetPassword
  136. )
  137. if "!Num!"=="21" (
  138. set Password=!Password!v
  139. goto EndSetPassword
  140. )
  141. if "!Num!"=="22" (
  142. set Password=!Password!w
  143. goto EndSetPassword
  144. )
  145. if "!Num!"=="23" (
  146. set Password=!Password!x
  147. goto EndSetPassword
  148. )
  149. if "!Num!"=="24" (
  150. set Password=!Password!y
  151. goto EndSetPassword
  152. )
  153. if "!Num!"=="25" (
  154. set Password=!Password!z
  155. goto EndSetPassword
  156. )
  157. )
  158.  
  159. if "!Type!"=="2" (
  160. set /a Num=!random! %% 26
  161. if "!Num!"=="0" (
  162. set Password=!Password!A
  163. goto EndSetPassword
  164. )
  165. if "!Num!"=="1" (
  166. set Password=!Password!B
  167. goto EndSetPassword
  168. )
  169. if "!Num!"=="2" (
  170. set Password=!Password!C
  171. goto EndSetPassword
  172. )
  173. if "!Num!"=="3" (
  174. set Password=!Password!D
  175. goto EndSetPassword
  176. )
  177. if "!Num!"=="4" (
  178. set Password=!Password!E
  179. goto EndSetPassword
  180. )
  181. if "!Num!"=="5" (
  182. set Password=!Password!F
  183. goto EndSetPassword
  184. )
  185. if "!Num!"=="6" (
  186. set Password=!Password!G
  187. goto EndSetPassword
  188. )
  189. if "!Num!"=="7" (
  190. set Password=!Password!H
  191. goto EndSetPassword
  192. )
  193. if "!Num!"=="8" (
  194. set Password=!Password!I
  195. goto EndSetPassword
  196. )
  197. if "!Num!"=="9" (
  198. set Password=!Password!J
  199. goto EndSetPassword
  200. )
  201. if "!Num!"=="10" (
  202. set Password=!Password!K
  203. goto EndSetPassword
  204. )
  205. if "!Num!"=="11" (
  206. set Password=!Password!L
  207. goto EndSetPassword
  208. )
  209. if "!Num!"=="12" (
  210. set Password=!Password!M
  211. goto EndSetPassword
  212. )
  213. if "!Num!"=="13" (
  214. set Password=!Password!N
  215. goto EndSetPassword
  216. )
  217. if "!Num!"=="14" (
  218. set Password=!Password!O
  219. goto EndSetPassword
  220. )
  221. if "!Num!"=="15" (
  222. set Password=!Password!P
  223. goto EndSetPassword
  224. )
  225. if "!Num!"=="16" (
  226. set Password=!Password!Q
  227. goto EndSetPassword
  228. )
  229. if "!Num!"=="17" (
  230. set Password=!Password!R
  231. goto EndSetPassword
  232. )
  233. if "!Num!"=="18" (
  234. set Password=!Password!S
  235. goto EndSetPassword
  236. )
  237. if "!Num!"=="19" (
  238. set Password=!Password!T
  239. goto EndSetPassword
  240. )
  241. if "!Num!"=="20" (
  242. set Password=!Password!U
  243. goto EndSetPassword
  244. )
  245. if "!Num!"=="21" (
  246. set Password=!Password!V
  247. goto EndSetPassword
  248. )
  249. if "!Num!"=="22" (
  250. set Password=!Password!W
  251. goto EndSetPassword
  252. )
  253. if "!Num!"=="23" (
  254. set Password=!Password!X
  255. goto EndSetPassword
  256. )
  257. if "!Num!"=="24" (
  258. set Password=!Password!Y
  259. goto EndSetPassword
  260. )
  261. if "!Num!"=="25" (
  262. set Password=!Password!Z
  263. goto EndSetPassword
  264. )
  265. )
  266.  
  267. if "!Type!"=="3" (
  268. set /a Num=!random! %% 5
  269. if "!Num!"=="0" (
  270. set Password=!Password!@
  271. goto EndSetPassword
  272. )
  273. if "!Num!"=="1" (
  274. set Password=!Password!#
  275. goto EndSetPassword
  276. )
  277. if "!Num!"=="2" (
  278. set Password=!Password!$
  279. goto EndSetPassword
  280. )
  281. if "!Num!"=="3" (
  282. set Password=!Password!_
  283. goto EndSetPassword
  284. )
  285. if "!Num!"=="4" (
  286. set "Password=!Password! "
  287. goto EndSetPassword
  288. )
  289. )
  290.  
  291. :EndSetPassword
  292. if !TempLength! GTR 1 (
  293. set /a TempLength=!TempLength! - 1
  294. goto SetPassword
  295. )
  296. ECHO ^[!date! !time!] [L:!Length!] !Password!>>"PWGen_Log.ini"
  297. goto Main
Add Comment
Please, Sign In to add comment