Worldlist Clean up
#1
Hello all, 

I been trying to figure this out for the last hour. I looked online but can't figure it out... I know it's going to be simple command ugh... I have a small file that I like to clean up that has hashes with password. The problem is that there's a space between the hash and password or it has ":" symbol. How do I remove the hash and keep the password. 

Here's an example 

10d21373467d23b7feeec8cfb4dac01a password1        < - no space

1b9c2625dc21ef0540wo4ddf47c5f203837aa32c:ilovelinux      < - has the : after password. 


Thanks, 


Other thing if you have any more command you like to share when cleaning up a wordlist please feel free to share it. 

thank's again.
#2
awk is your friend:

awk 'BEGIN { FS = ":" } ; { print $NF }' potfile
or
cat potfile | awk 'BEGIN { FS = ":" } ; { print $NF }'

should do this job depending on the delimiter (":", " ", ....)

for more read this:
https://www.tutorialspoint.com/awk/awk_b...amples.htm
#3
I think he's rather looking for something like this sed command:

sed 's/^[[:xdigit:]]*[ :]//g'
#4
Thank you guys it cleaned up really well.
#5
Question for you guys. I have a word file I been trying to figure out the last 2 hours ... What I'm trying to remove is the number between the words. The only catch is that I need the number at the end of the word.

Current
a0ambrelola
A0AMC0VL
a0amdibeth
a0amej11319
a0Amelee1488
a0amelia
a0amelia1

Output
aambrelola
AAMCVL
aamdibeth
aamej11319
aAmelee1488
aamelia
aamelia1

I tried running the tr -d '[:digit:]'  command but that removes all the numbers from the word. Is this possible or am i being to picky now?
#6
just think about it like this: "I want to remove every digit that is followed by a non-digit"

you can express this with the unix sed tool like this:
Code:
sed -r 's/[0-9]+([^0-9])/\1/g'