This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/data/local/bin/python | |
| # AES encryption/decryption with zlib compression | |
| from Crypto.Cipher import AES | |
| from Crypto import Random | |
| import hashlib | |
| import zlib | |
| import base64 | |
| _block_size = 16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import socket | |
| import paramiko | |
| import socks | |
| SOCKS5_HOST = "nnn.nnn.nnn.nnn" | |
| SOCKS5_PORT = 12345 | |
| SERVER_IP = "nnn.nnn.nnn.nnn" | |
| SERVER_PORT = 54321 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| import base64 | |
| from M2Crypto import Rand, EVP | |
| ENC_METHOD="aes_256_cbc" | |
| MODE_B64, MODE_BIN = 0, 1 | |
| IV_LEN = 16 | |
| def encrypt(s, key, mode=MODE_BIN): | |
| iv = Rand.rand_bytes(IV_LEN) # can be : iv = os.urandom(IV_LEN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import getpass | |
| from pyasn1.codec.der import decoder as der_decoder | |
| from cryptography.hazmat.backends import default_backend | |
| from cryptography.hazmat.primitives import padding, hashes | |
| from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes | |
| from cryptography.hazmat.primitives.asymmetric import padding as asympad | |
| from cryptography.hazmat.primitives.serialization import load_der_private_key |