Skip to content

Instantly share code, notes, and snippets.

@Tikam02
Created September 9, 2019 08:34
Show Gist options
  • Save Tikam02/bc526f7d300baca2baabc628e21a414d to your computer and use it in GitHub Desktop.
Save Tikam02/bc526f7d300baca2baabc628e21a414d to your computer and use it in GitHub Desktop.

Revisions

  1. Tikam02 created this gist Sep 9, 2019.
    23 changes: 23 additions & 0 deletions wordlist_cleanup.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    ## covert a entire wordlist to all lowercase with no garbage.

    $ cat dirtyfile.txt | awk '{gsub(/[[:punct:]]/,"")}1' | tr A-Z a-z | sed 's/[0-9]*//g' | sed -e 's/ //g' | strings | tr -cs '[:alpha:]' '\ ' | sed -e 's/ /\n/g' | tr A-Z a-z | sort -u > cleanfile.txt

    ## Remove Duplicates

    awk '!(count[$0]++)' old.txt > new.txt

    ## Sort Wordlist by Length

    awk '{print length, $0}' old.txt | sort -n | cut -d " " -f2- > new.txt

    ## Sort Alphabetical order

    sort old.txt | uniq > new.txt

    ## Merge multiple text files into one

    cat file1.txt file2.txt > combines.txt

    ## Remove all blank lines

    egrep -v "^[[:space:]]*$" old.txt > new.txt