Login Register






Pass Generator Batch script filter_list
Author
Message
Pass Generator Batch script #1
Code:
@echo off setlocal enableextensions enabledelayedexpansion set len=15 set str=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz.@#$*()?/\{}[] call :GetLength %str% set /a n=0 :A set /a rnd=%random% %% %i%+1 set out=!out!!str:~%rnd%,1! set /a n+=1 if not %n%==%len% goto :A echo !out! pause && goto :EOF :GetLength set i=0 set arg=%1 :N set T=!arg:~%i%,1! if defined T ( set /a i+=1 goto :N )

Here's a password/passkey generator I wrote just a few minutes ago. It works nicely, the only problem is providing support for special characters like , % ! etc...

Change len and str variables to determine what characters to be using, and the output length of the generated pass. The :GetLength function actually calculates the length of the str variable, because we need this to return a specific character at a specific index within that variable.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: Pass Generator Batch script #2
(10-01-2012, 05:47 AM)ArkPhaze Wrote:
Code:
@echo off setlocal enableextensions enabledelayedexpansion set len=15 set str=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz.@#$*()?/\{}[] call :GetLength %str% set /a n=0 :A set /a rnd=%random% %% %i%+1 set out=!out!!str:~%rnd%,1! set /a n+=1 if not %n%==%len% goto :A echo !out! pause && goto :EOF :GetLength set i=0 set arg=%1 :N set T=!arg:~%i%,1! if defined T ( set /a i+=1 goto :N )

Here's a password/passkey generator I wrote just a few minutes ago. It works nicely, the only problem is providing support for special characters like , % ! etc...

Change len and str variables to determine what characters to be using, and the output length of the generated pass. The :GetLength function actually calculates the length of the str variable, because we need this to return a specific character at a specific index within that variable.

awesome...but its slow is'nt it??

Reply

RE: Pass Generator Batch script #3
(10-01-2012, 05:56 AM)h4r0015k Wrote:
(10-01-2012, 05:47 AM)ArkPhaze Wrote:
Code:
@echo off setlocal enableextensions enabledelayedexpansion set len=15 set str=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz.@#$*()?/\{}[] call :GetLength %str% set /a n=0 :A set /a rnd=%random% %% %i%+1 set out=!out!!str:~%rnd%,1! set /a n+=1 if not %n%==%len% goto :A echo !out! pause && goto :EOF :GetLength set i=0 set arg=%1 :N set T=!arg:~%i%,1! if defined T ( set /a i+=1 goto :N )

Here's a password/passkey generator I wrote just a few minutes ago. It works nicely, the only problem is providing support for special characters like , % ! etc...

Change len and str variables to determine what characters to be using, and the output length of the generated pass. The :GetLength function actually calculates the length of the str variable, because we need this to return a specific character at a specific index within that variable.

awesome...but its slow is'nt it??

Slow? :oO: ... I can generate a 200 value password with this in about as long as it takes for the console to pop up after executing the script. Batch IS slow, but that's not slow. And considering that you'd probably only be using a max of a 50 value password for anything. It does what it's intended to do.

I don't think you tested the script.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: Pass Generator Batch script #4
(10-01-2012, 06:06 AM)ArkPhaze Wrote:
(10-01-2012, 05:56 AM)h4r0015k Wrote:
(10-01-2012, 05:47 AM)ArkPhaze Wrote:
Code:
@echo off setlocal enableextensions enabledelayedexpansion set len=15 set str=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz.@#$*()?/\{}[] call :GetLength %str% set /a n=0 :A set /a rnd=%random% %% %i%+1 set out=!out!!str:~%rnd%,1! set /a n+=1 if not %n%==%len% goto :A echo !out! pause && goto :EOF :GetLength set i=0 set arg=%1 :N set T=!arg:~%i%,1! if defined T ( set /a i+=1 goto :N )

Here's a password/passkey generator I wrote just a few minutes ago. It works nicely, the only problem is providing support for special characters like , % ! etc...

Change len and str variables to determine what characters to be using, and the output length of the generated pass. The :GetLength function actually calculates the length of the str variable, because we need this to return a specific character at a specific index within that variable.

awesome...but its slow is'nt it??

Slow? :oO: ... I can generate a 200 value password with this in about as long as it takes for the console to pop up after executing the script. Batch IS slow, but that's not slow. And considering that you'd probably only be using a max of a 50 value password for anything. It does what it's intended to do.

I don't think you tested the script.

it took the script 3-4 seconds after pop-up to generate a 15 character password...i tested it on winXP in virtualbox..is thats the reason its slow for me??

Reply

RE: Pass Generator Batch script #5
(10-01-2012, 06:12 AM)h4r0015k Wrote:
(10-01-2012, 06:06 AM)ArkPhaze Wrote:
(10-01-2012, 05:56 AM)h4r0015k Wrote:
(10-01-2012, 05:47 AM)ArkPhaze Wrote:
Code:
@echo off setlocal enableextensions enabledelayedexpansion set len=15 set str=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz.@#$*()?/\{}[] call :GetLength %str% set /a n=0 :A set /a rnd=%random% %% %i%+1 set out=!out!!str:~%rnd%,1! set /a n+=1 if not %n%==%len% goto :A echo !out! pause && goto :EOF :GetLength set i=0 set arg=%1 :N set T=!arg:~%i%,1! if defined T ( set /a i+=1 goto :N )

Here's a password/passkey generator I wrote just a few minutes ago. It works nicely, the only problem is providing support for special characters like , % ! etc...

Change len and str variables to determine what characters to be using, and the output length of the generated pass. The :GetLength function actually calculates the length of the str variable, because we need this to return a specific character at a specific index within that variable.

awesome...but its slow is'nt it??

Slow? :oO: ... I can generate a 200 value password with this in about as long as it takes for the console to pop up after executing the script. Batch IS slow, but that's not slow. And considering that you'd probably only be using a max of a 50 value password for anything. It does what it's intended to do.

I don't think you tested the script.

it took the script 3-4 seconds after pop-up to generate a 15 character password...i tested it on winXP in virtualbox..is thats the reason its slow for me??

VirtualBox? This script is safe if you're worried about that. But yes, that could be the reason, depending on what your specs are and how much you're sharing with that virtual environment. Maybe your CPU was locked up for a bit (glitched/froze) and you were forced to wait a bit longer than usual?

There's no other reason why it would be that slow.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: Pass Generator Batch script #6
i know its safe..i used it on virtualbox because my primary OS is ubuntu

Reply

RE: Pass Generator Batch script #7
Ahh... Makes sense then.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply