One surgical procedure for the ethical hacker is to use scalpel to fix tunn3l v1s10n.
In the /etc/scalpel/scalpel.conf configuration file of the scalpel tool, uncomment the following line:
| #!/bin/python3 | |
| '''Encode or decode ROT47''' | |
| # Any spaces are left unchanged. | |
| def rot47(string): | |
| '''Encode/decode string.''' | |
| enc_dec = '' # string encoded/decoded to/from ROT47 | |
| for char in string: | |
| ascii_code = ord(char) # convert character to ASCII code number |
picoCTF's Matryoshka challenge provides a dolls.jpg file which contains nested files that can be accessed using the unzip tool.
┌──(kali㉿kali)-[~/Desktop]
└─$ unzip dolls.jpg
Archive: dolls.jpg| #!/bin/python3 | |
| '''Print picoCTF flag for “keygenme-py” challenge.''' | |
| import hashlib | |
| user = b'GOUGH' | |
| nums = [4, 5, 3, 6, 2, 7, 1, 8] | |
| flag_1 = 'picoCTF{1n_7h3_|<3y_of_' | |
| flag_2 = '' | |
| flag_3 = '}' |
| #!/bin/zsh | |
| # print random string from list of Kali terminal arg tips | |
| # color formats | |
| GRN="\e[1;32m" | |
| YEL="\e[1;33m" | |
| BLU="\e[1;34m" | |
| END="\e[0m" | |
| # kali tips |
PicoCTF's Mind your Ps and Qs challenge includes a hyperlink to a text file:
Decrypt my super sick RSA:
c: 62324783949134119159408816513334912534343517300880137691662780895409992760262021
n: 1280678415822214057864524798453297819181910621573945477544758171055968245116423923
e: 65537
| #!/bin/python3 | |
| '''Generate Symmetrical Random Color art.''' | |
| from random import randint | |
| SCHEMES = { | |
| '1': ['264653', '2a9d8f', 'e9c46a', 'f4a261', 'e76f51'], | |
| '2': ['cb997e', 'ddbea9', 'ffe8d6', 'b7b7a4', 'a5a58d', '6b705c'], | |
| '3': ['03045e', '023e8a', '0077b6', '0096c7', '00b4d8', '48cae4', '90e0ef', | |
| 'ade8f4', 'caf0f8'], |
| import pickle | |
| example_dict = {'one': '1', 'two': '2', 'three': '3', 'four': '4', 'five': '5', 'six': '6', 'seven': '7'} | |
| with open('dict_pickle', 'wb') as pickle_out: | |
| pickle.dump(example_dict, pickle_out) | |
| print('\x1b[32mPrint pickled or serialized dictionary:\x1b[0m\n') | |
| with open('/home/nick/Desktop/dict_pickle', 'rb') as file_out: |