28 lines
1.1 KiB
Python
Executable File
28 lines
1.1 KiB
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import random, string # for generating the random stuff
|
|
import argparse # for command line utility
|
|
|
|
"""
|
|
Function antidiscovery:
|
|
- Generate html code containing the input string but wrapped up with <i> and random numbers.
|
|
|
|
Parameters:
|
|
- to_discover: string to put into the Function
|
|
|
|
Returns:
|
|
- the newly generated string
|
|
"""
|
|
def antidiscovery(to_discover: str):
|
|
new_html = ""
|
|
for i in range(len(to_discover)):
|
|
random_idx = random.randrange(1, 52)
|
|
new_html += f"<i>{string.ascii_letters[random_idx]}</i>{to_discover[i]}"
|
|
return new_html
|
|
|
|
if __name__ == "__main__":
|
|
parser = argparse.ArgumentParser(description='Small helper to convert a clear-text (e.g. e-mail) to a - at least for search engines - unreadable format. Random letters integrated. For an example input string of "hello", an example output would be "<i>G</i>h<i>R</i>e<i>d</i>l<i>T</i>l<i>y</i>o"')
|
|
parser.add_argument('to_discover', type=str, help='The string to be covered by the program')
|
|
args = parser.parse_args()
|
|
print(antidiscovery(args.to_discover))
|