diff --git a/Cryptography/README.md b/Cryptography/README.md index a802ce5..3e1f9a2 100644 --- a/Cryptography/README.md +++ b/Cryptography/README.md @@ -1,3 +1,27 @@ # TOOLS: -- https://www.cryptool.org/en/cryptool1-en \ No newline at end of file +- https://www.cryptool.org/en/cryptool1-en + +- frequency analyses online: + + +## ROT13 + +In the command line +``` +VAR=$(cat data.txt) +echo "$VAR" +alias rot13="tr A-Za-z N-ZA-Mn-za-m" +echo "$VAR" | rot13 +``` +---- + + +In Python we can use: ```"YRIRY GJB CNFFJBEQ EBGGRA".decode(encoding="ROT13")``` +https://docs.python.org/2/library/codecs.html#codec-base-classes + +--- + +Online: + +http://www.xarg.org/tools/caesar-cipher/ diff --git a/Cryptography/ROT_13_EASY.md~ b/Cryptography/ROT_13_EASY.md~ deleted file mode 100644 index 94f3727..0000000 --- a/Cryptography/ROT_13_EASY.md~ +++ /dev/null @@ -1,10 +0,0 @@ -``` -VAR=$(cat data.txt) -echo "$VAR" -alias rot13="tr A-Za-z N-ZA-Mn-za-m" -echo "$VAR" | rot13 -``` - - -In Python we can use: ```"YRIRY GJB CNFFJBEQ EBGGRA".decode(encoding="ROT13")``` -https://docs.python.org/2/library/codecs.html#codec-base-classes diff --git a/Cryptography/ROT_13_EASY.md b/Cryptography/RotationCiphers/ROT_13_EASY.md similarity index 100% rename from Cryptography/ROT_13_EASY.md rename to Cryptography/RotationCiphers/ROT_13_EASY.md diff --git a/Cryptography/RotationCiphers/brute_force_rotation.py b/Cryptography/RotationCiphers/brute_force_rotation.py new file mode 100644 index 0000000..155ef43 --- /dev/null +++ b/Cryptography/RotationCiphers/brute_force_rotation.py @@ -0,0 +1,17 @@ +#!/usr/bin/python +import sys + +CIPHER = "OMQEMDUEQMEK" +LETTERS = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") +CIPHER = "" +shift = 1 + +while i < len(LETTERS): + for c in CIPHER: + if c in LETTERS: + CIPHER += LETTERS[(LETTERS.index(c)+shift)%(len(LETTERS))] + print("Shift used: " + str(shift)) + print("Ciphertext: " + CIPHER) + print("CIPHER: " + CIPHER) + shift = shift + 1 + CIPHER = "" diff --git a/Reverse_Engineering/COMMAND_LINE_TOOLS.md b/Reverse_Engineering/COMMAND_LINE_TOOLS.md new file mode 100644 index 0000000..890ff54 --- /dev/null +++ b/Reverse_Engineering/COMMAND_LINE_TOOLS.md @@ -0,0 +1,68 @@ +COMMAND LINE TOOLS +================== + + +### Tricks: + +- Files with spaces in the name + symbolinc links. + + +### Searching + + +``` +grep word f1 + +sort | uniq -c + +diff f1 f2 + +find -size f1 +``` + + +### Encondings/ Binaries + +``` +file f1 + +ltrace bin + +strings f1 + +base64 -d + +xxd -r +``` + + + +### Compressed Files + + +``` +zcat f1 > f2 + +gzip -d file + +bzip2 -d f1 + +tar -xvf file +``` + + + +### Connecting to a Server/Port + +``` +echo 4wcYUJFw0k0XLShlDzztnTBHiqxU3b3e | nc localhost 30000 + +openssl s_client -connect localhost:30001 -quiet + +nmap -p 31000-32000 localhost + +telnet localhost 3000 +``` + + +