Skip to content

Instantly share code, notes, and snippets.

@aimfireready
Created July 20, 2018 20:32
Show Gist options
  • Select an option

  • Save aimfireready/5e41234d49995d800d6e9fd3dc05dbf5 to your computer and use it in GitHub Desktop.

Select an option

Save aimfireready/5e41234d49995d800d6e9fd3dc05dbf5 to your computer and use it in GitHub Desktop.
Generate a complex password using Windows Run dialog
@echo off
setlocal enabledelayedexpansion
set "string=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz012345678901234567890123456789~!@#$%%^&*()
[]{};:,<.>/?\-_=+~!@#$%%^&*()[]{};:,<.>/?\-_=+"
set "result="
for /L %%i in (1,1,36) do call :add
::echo %result% ::TEST
echo %result%|clip
goto :eof
:add
set /a x=%random% %% 140
set result=%result%!string:~%x%,1!
goto :eof
::Sample output
::o?0Q.uDZcCwS9H/,1dfVgYzJkfe\
::eIGg72sF1?znnDXkun+V,1td/aPNB
::a232+8sUDi00RtC3N=iWIONo\fXLICp
::gpuPC7Ft8giw6j\,11Rm9D3oC
::vwl~/ArdJDp=F2ZfbTd/.Y-\Mdt8-i9o
::Rz6XXP9,1f6P87y?7N\u~7
::S,1G60V/xw4SINT,sOSdUEVUSob4BG..P9jn
::~7?Zu\A21t,1I980I7_InHWKgr3eTH5G8iXl
::Blu8Q0VPLmj1J_51=IOf~/9?g1nJiQf=8jvA
::PCb/uJrO9Y,18Jy,v4,,1RfN
::G?d6,16SR~48,16IM076OE512I32wAM,13Te
::d9l1C~63O2Vdu5hWokY954RALD381Opz6w6e
::iF=-_-lw7_C1T\kR7KUi.1,/
::AIf4V,1/kZ\?,l=TItL=
::D_ec+1oX,1=Wy6sAMH7E+w
::NO0daw4=QPGcav-?3~~xvjL~vE3
::k57M/N?J7\r?T9_9f,t6Wom/5.5255_=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment