Overthewire War Games (Bandit)
- ssh server login with port specification
- syntax
ssh <username>@<host> -p <port>
ssh
server login
ls
to view directory content
cat
to view file content
ssh
server login
ls
to view directory content
cat
to view file content
- accessing dashed filenames
ssh
server login
cd
to change directory
ls -a
to view hidden directory content
cat
to view file content
ssh
server login
cd
to change directory
ls -a
to view hidden directory content
cat <path>/-filename
view dashed filenames
ssh
server login
cd
to change directory
find
search for files in a directory hierarchy
du
estimate file space usage
ls
list directory content
find -readable -type f ! -executable -exec du -b {} + | grep 1033
or find -readable -type f ! -executable -exec ls -l {} + | grep 1033
ssh
server login
cd
to change directory
find
search for files in a directory hierarchy
ls
list directory content
find -type f -size 33c -exec ls -l {} + | grep -E 'bandit6|bandit7'
ssh
server login
grep
print lines that match patterns
grep data.txt | grep millionth
ssh
server login
sort
sort lines of text files
uniq
report or omit repeated lines
sort data.txt | uniq -u
ssh
server login
strings
print the sequences of printable characters in files
grep
print lines that match patterns
strings data.txt | grep ===
ssh
server login
base64
base64 encode/decode data and print to standard output
base64 -d data.txt
import codecs
print(codecs.decode('Gur cnffjbeq vf WIAOOSFzMjXXBC0KoSKBbJ8puQm5lIEi', 'rot13'))