|
hayabusa
|
 |
« Reply #15 on: July 05, 2012, 02:40:49 PM » |
|
I was thinking that way, as well, but it would need some additions, if zero (0) is permissible in ANY of the possible places, in each outcome...
So you could start with that, and put in some if's IN the sequence, below it, such that if i was less than 10, also echo it with 0 prepended, then 00, then 000, then 0000,up to 9 zeroes (to accommodate 10 places) then if i less than 100, prepend zeroes from one to eight places... and so forth, and so on...
(Note - STILL spoonfed)
|
|
|
|
« Last Edit: July 05, 2012, 02:42:49 PM by hayabusa »
|
Logged
|
~ hayabusa ~
"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'
OSCE, OSCP , GPEN, C|EH
|
|
|
|
tturner
|
 |
« Reply #16 on: July 05, 2012, 03:13:38 PM » |
|
Yeah you could definitely make it more complex and my script would not work if you needed all 7 (or 10) spaces occupied by a number, but I read it as an ascending word list starting at 0 or 1 and ending at some number. That's actually taken from a script I commonly use to build IP address lists for tools that can target such lists as a file but don't have the capability to define at stdin. for i in $(seq 1 255); do echo 192.168.100.$i >> hostlist.txt; done So I got lazy myself, but the point is people need to actually try to figure things out on their own before they come asking for help. I'll be the first to admit I'm a novice but at least I put forth a minimum of effort.
|
|
|
|
|
Logged
|
Certifications: CISSP, CISA, GPEN, GWAPT, GAWN, GCIA, GCIH, GSEC, OPSE, CSWAE, CSTP, VCP WIP: OSWP, GSSP-JAVA, GXPN Udacity on hold, again. I suck. http://sentinel24.com/blog @tonylturner http://bsidesorlando.org
|
|
|
ajohnson
Recruiters
Hero Member
Offline
Posts: 1057
aka dynamik
|
 |
« Reply #17 on: July 05, 2012, 06:30:39 PM » |
|
I was thinking that way, as well, but it would need some additions, if zero (0) is permissible in ANY of the possible places, in each outcome...
So you could start with that, and put in some if's IN the sequence, below it, such that if i was less than 10, also echo it with 0 prepended, then 00, then 000, then 0000,up to 9 zeroes (to accommodate 10 places) then if i less than 100, prepend zeroes from one to eight places... and so forth, and so on...
(Note - STILL spoonfed)
I think the OSCE has gotten you in the habit of trying too hard  for i in `for ((j=9999999999; j>1; j/=10)); do echo $j; done | sort`; do seq -w 0 $i; done 
|
|
|
|
|
Logged
|
WIP: GCFA | www.infosiege.net | @infosiege The day you stop learning is the day you start becoming obsolete.
|
|
|
|
hayabusa
|
 |
« Reply #18 on: July 05, 2012, 08:55:26 PM » |
|
@tturner - I FULLY agree!
@ajohnson - yeah, 'twas a long weekend (will be studying for attempt 2, as didn't have enough points to pass on first attempt at OSCE) I honestly hadn't even thought about that approach.
|
|
|
|
|
Logged
|
~ hayabusa ~
"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'
OSCE, OSCP , GPEN, C|EH
|
|
|
|
Cyber.spirit
|
 |
« Reply #19 on: July 06, 2012, 01:54:47 AM » |
|
Yeah you could definitely make it more complex and my script would not work if you needed all 7 (or 10) spaces occupied by a number, but I read it as an ascending word list starting at 0 or 1 and ending at some number. That's actually taken from a script I commonly use to build IP address lists for tools that can target such lists as a file but don't have the capability to define at stdin. for i in $(seq 1 255); do echo 192.168.100.$i >> hostlist.txt; done So I got lazy myself, but the point is people need to actually try to figure things out on their own before they come asking for help. I'll be the first to admit I'm a novice but at least I put forth a minimum of effort. Ok tturner as you know making wordlists with crunch is easier but i have problem with crunch's wordlist i cant input it in hydra (even i save it as txt file). So i want to try ur script too but the problem is idk which scripting language u used to for ur script. As it has echo and and >>file.txt i think i can run it as a linux terminal batch file, am i right? If im not tell a way to run ur script to create the wordlist thank u so much. CyberSpirit
|
|
|
|
|
Logged
|
ICS Academy Network Security Certified
|
|
|
|
shadowzero
|
 |
« Reply #20 on: July 06, 2012, 08:08:59 AM » |
|
Ok tturner as you know making wordlists with crunch is easier but i have problem with crunch's wordlist i cant input it in hydra (even i save it as txt file). So i want to try ur script too but the problem is idk which scripting language u used to for ur script. As it has echo and and >>file.txt i think i can run it as a linux terminal batch file, am i right? If im not tell a way to run ur script to create the wordlist thank u so much.
CyberSpirit
It's a bash script. Yes, you run it on Linux, or if you use Windows, cygwin should be able to handle it.
|
|
|
|
|
Logged
|
|
|
|
|
hayabusa
|
 |
« Reply #21 on: July 06, 2012, 08:12:51 AM » |
|
@cyber.spirit -
Or use ajohnson's (it'll make sure you get all iterations) with one small tweak at the end to stick them in a file. Run it right at a command prompt in Backtrack:
root@bt:~/Desktop/# for i in `for ((j=9999999999; j>1; j/=10)); do echo $j; done | sort`; do seq -w 0 $i; done > numberlist.txt
numberlist.txt will contain all the iterations (including all those that start with a 0, or multiple 0's, and the numberlist.txt file will end up in your current working directory.
(Again, this is assuming you want all the numbers, including those with preceding 0's)
Edit - and it's bash, also, if you want to put it into a script to save
|
|
|
|
« Last Edit: July 06, 2012, 08:19:24 AM by hayabusa »
|
Logged
|
~ hayabusa ~
"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'
OSCE, OSCP , GPEN, C|EH
|
|
|
|
Cyber.spirit
|
 |
« Reply #22 on: July 07, 2012, 03:58:12 PM » |
|
ok hayabusa thanx let me try it
|
|
|
|
|
Logged
|
ICS Academy Network Security Certified
|
|
|
|