├── README.md └── main.py /README.md: -------------------------------------------------------------------------------- 1 | [![Typing SVG](https://readme-typing-svg.herokuapp.com/?color=F90FE7&lines=Keys%20encrypter%20by%20helzy)](https://git.io/typing-svg) 2 | 3 | ![](start.png) 4 | 5 | 1. create `private_keys.txt` file in your directory 6 | 2. `git clone https://github.com/helllzy/encrypt_keys` or just download zip file 7 | 3. `cd encrypt_keys` 8 | 4. put keys in private_keys.txt 9 | 5. run the bot via `py main.py` or `python3 main.py` for linux 10 | 6. choose the digits for replace which will be replaced by symbols 11 | 7. it`s necessary to do backup copy of your private keys, for example, on your flash 12 | 8. save the function that script will print 13 | 14 | example: 15 | digits = `012345` 16 | symbols = `$?/|^>` 17 | your key = `0xfc3248b0` 18 | your key after = `$xfc|/^8b$` 19 | 20 | `Feel free to contact the creator if you have any troubles` 21 | 22 | --- 23 | 24 | 1. создайте `private_keys.txt` файл в вашей папке 25 | 2. `git clone https://github.com/helllzy/arbitrum_voter` или просто скачайте zip файл 26 | 3. `cd encrypt_keys` 27 | 4. поместите ключи в private_keys.txt 28 | 5. запустите бота через `py main.py` или `python3 main.py` на linux`е 29 | 6. выберите цифры для замены и символы, на которые будут заменены цифры 30 | 7. обязательно сделайте резервную копию ваших приватников, например, на флешке 31 | 8. сохраните функцию, которую выдаст скрипт 32 | 33 | пример: 34 | цифры = `012345` 35 | символы = `$?/|^>` 36 | ваш ключ = `0xfc3248b0` 37 | ваш ключ после = `$xfc|/^8b$` 38 | 39 | `Не стесняйтесь писать мне, если у вас возникнут какие-либо проблемы` 40 | 41 | # [author's tg channel](https://t.me/helzy_crypto) | [author](https://t.me/hellZy) | [author's tg chat](https://t.me/+N70ZiKhHWgI1YTUy) 42 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from random import shuffle 2 | 3 | with open('private_keys.txt') as file: 4 | private_keys = [i.strip() for i in file.readlines()] 5 | 6 | 7 | class Key: 8 | def __init__(self, digits: list, symbols: list) -> None: 9 | self.digits = digits 10 | self.symbols = symbols 11 | self.first_part, self.second_part = {}, {} 12 | 13 | 14 | def main(self, private_keys: list) -> list: 15 | encrypted_keys = [] 16 | self.second_symbols = self.symbols.copy() 17 | 18 | shuffle(self.second_symbols) 19 | 20 | for key in private_keys: 21 | encrypted = self.encrypting(key) 22 | encrypted_keys.append(encrypted) 23 | 24 | self.configure_decrypt() 25 | 26 | return encrypted_keys 27 | 28 | 29 | def encrypting(self, key: str) -> str: 30 | half = len(key)//2 31 | 32 | key_first_part = key[:half] 33 | key_second_part = key[half:] 34 | 35 | for num in range(len(self.digits)): 36 | self.first_part[self.symbols[num]] = self.digits[num] 37 | self.second_part[self.second_symbols[num]] = self.digits[num] 38 | key_first_part = key_first_part.replace(self.digits[num], self.symbols[num]) 39 | key_second_part = key_second_part.replace(self.digits[num], self.second_symbols[num]) 40 | 41 | encrypted_key = key_first_part + key_second_part 42 | 43 | return encrypted_key 44 | 45 | 46 | def configure_decrypt(self) -> None: 47 | print('\n' + '='*150 + '\n\n' + ' '*60 + '|||Your decrypt function`s below|||\n\n' + '='*150) 48 | print(rf''' 49 | first_part = {self.first_part} 50 | second_part = {self.second_part} 51 | 52 | 53 | def decrypting(key: str) -> str: 54 | half = len(key)//2 55 | 56 | first_part_keys = list(first_part.keys()) 57 | 58 | key_first_part = key[:half] 59 | key_second_part = key[half:] 60 | 61 | for symbol in first_part_keys: 62 | key_first_part = key_first_part.replace(symbol, first_part[symbol]) 63 | key_second_part = key_second_part.replace(symbol, second_part[symbol]) 64 | 65 | encrypted_key = key_first_part + key_second_part 66 | 67 | return encrypted_key 68 | 69 | 70 | with open('encrypted_keys.txt') as file: 71 | private_keys = [decrypting(i.strip()) for i in file.readlines()] 72 | 73 | # ^^^^^^^^^^^^ change this variable to variable in your code 74 | # |||||||||||| ex: KEYS 75 | 76 | # code below is just for decrypt. if you need to paste this code in your script, just delete code below 77 | 78 | with open('private_keys.txt', 'w') as file: 79 | file.write('\n'.join(private_keys)) 80 | ''') 81 | 82 | 83 | if __name__ == '__main__': 84 | 85 | # each digit only once. ex: 0123 or 6234 or 435216 etc. No more than 10 86 | digits = [i for i in input('Type the digits for replace:\n')] 87 | 88 | [exit(print('You chose equal digits twice')) 89 | for i in digits if digits.count(i) > 1] 90 | 91 | # each symbol only once. ex: $<:>|#@! . No more than 10 92 | # must be equal to the count of digits. 93 | symbols = [i for i in input("\n" + r"Type the symbols (don`t use '\'):" + "\n")] 94 | 95 | [exit(print('You chose equal symbols twice')) 96 | for i in symbols if symbols.count(i) > 1] 97 | 98 | [exit(print('You chose symbols&symbols or digits&digits')) 99 | for i in symbols if i in digits] 100 | 101 | if len(digits) != len(symbols): 102 | exit(print('Digits count must be equal to symbols')) 103 | elif 1 > len(digits) > 10: 104 | exit(print('You chose wrong digits count')) 105 | else: 106 | print(f'\nYou chose these digits {digits}\n' 107 | f'You chose these symbols: {symbols}') 108 | 109 | encrypted_keys = Key(digits, symbols).main(private_keys) 110 | 111 | with open('encrypted_keys.txt', 'w') as file: 112 | file.write('\n'.join(encrypted_keys)) 113 | --------------------------------------------------------------------------------