mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-08-01 11:16:13 -04:00
some small fixes
This commit is contained in:
parent
a5a6601a45
commit
0085af90dd
5 changed files with 110 additions and 11 deletions
|
@ -1,3 +1,27 @@
|
|||
# TOOLS:
|
||||
|
||||
- https://www.cryptool.org/en/cryptool1-en
|
||||
- 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/
|
||||
|
|
|
@ -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
|
17
Cryptography/RotationCiphers/brute_force_rotation.py
Normal file
17
Cryptography/RotationCiphers/brute_force_rotation.py
Normal file
|
@ -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 = ""
|
Loading…
Add table
Add a link
Reference in a new issue