Misc Quick Scripting / Command References

Linux:

Merge two files into one:

  cat file1.txt file2.txt > mergedfile.txt

Hide Error Messages from Output:

  cmd-used 2>/dev/null

Quick Banner-grab:

  nc 192.168.1.1 445

Generate Password List (8+ Characters):

  cat  ./master.lst | uniq -u > ./tempu.txt  | cat ./tempu.txt| grep -vwE '\w{1,7}' > pswd8plus.txt

Filter List of Service Listeners based on Port:

  lsof -i -n -P | grep 21

Windows:

Filter List of Service Listeners based on Port:

  netstat -naob | find 445

Merge two files into one:

  type A.txt B.txt > C.txt

Pentest-Zen (ExitC0de00c.com)