Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lilbrocodes/otf
Obfuscated Text Format GitHub. Read README.MD
https://github.com/lilbrocodes/otf
Last synced: 15 days ago
JSON representation
Obfuscated Text Format GitHub. Read README.MD
- Host: GitHub
- URL: https://github.com/lilbrocodes/otf
- Owner: LilBroCodes
- License: mit
- Created: 2023-11-08T19:23:21.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-11-08T19:30:53.000Z (about 1 year ago)
- Last Synced: 2023-11-08T20:28:28.446Z (about 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Version 1.0
# Otf (Obfuscated Text Format) Documentation
## Usage:
### Functions:
#### Obfuscate:
Function that generates the .otf file, takes a filename, and a list of strings to obfuscate.Example:
obfuscate("obfuscated.otf", ["string1", "string2"]) ->
file obfuscated.otf
#### Decode:
Function that takes a filename, and returns the list of strings in that file.Example:
print(decode("obfuscated.otf")) ->
[string 1, 2, 3, 4 ...]
## Data structure:
### Headers:
The .otf file has two headers, both at the start of the file. the first 6 hex bytes will always be 63 74 66 2D 31 36, so ctf-16, which
references the old name of the file format, compact file format, with 16 indicating the fact that it is hex.The second header, is at byte 7, which indicates the number of strings the file contains.
After the two headers, every even byte is an index to the lookup table*, with the previous bit referencing what string is the character for.
So the file will look like this:
string id, character id, string id, character id...Example: 01 09 02 32, which will be: string 1 : "H", string 2 : "W".
## * Lookup table:
["A", "Á", "B", "C", "D", "E", "É", "F", "G", "H", "I", "Í", "J",
"K", "L", "M", "N", "O", "Ó", "Ö", "Ő", "P", "Q", "R", "S", "T",
"U", "Ú", "Ü", "Ű", "V", "W", "X", "Y", "Z", "a", "á", "b", "c",
"d", "e", "é", "f", "g", "h", "i", "í", "j", "k", "l", "m", "n",
"o", "ó", "ö", "ő", "p", "q", "r", "s", "t", "u", "ú", "ü", "ű",
"v", "w", "x", "y", "z", ",", "?", ";", ".", ":", "-", "_", "*",
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "§", "'", '"',
"+", "!", "%", "/", "=", "(", ")", "~", "ˇ", "^", "˘", "°", "˛",
"`", "˙", "´", "˝", "¨", "¸", "|", "{", "}", "<", ">", "#", "&",
"@", " "]