-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathS5Crypto.py
More file actions
55 lines (46 loc) · 1.5 KB
/
Copy pathS5Crypto.py
File metadata and controls
55 lines (46 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import random
def crypt_char(char):
map = '@./=#$%&:,;_-|0712356894bcd3fghijkwlmanopqrstuvxyzACDEFGHIJKLMVNOPQRSTUWXYZB'
i = 0
for ch in map:
if ch == char:
return map[len(map) - 1 - i]
i+=1
return char
def encrypt(text):
i = 0
cryptText = ''
for char in text:
rnd = random.randrange(1,9,1)
cryptText += crypt_char(char) + crypt_char(str(rnd))
i+=1
return cryptText
def decrypt(text):
i = 0
decryptText = ''
while i < len(text):
decryptText += crypt_char(text[i])
i+=2
return decryptText
def tokenize(args):
token = ''
i=0
for item in args:
end = ''
if i<len(args)-1:
end = '|'
token += encrypt(str(item)+end)
i+=1
return token
def parsetoken(token):
patoken = decrypt(token)
return str(patoken).split('|')
#token = tokenize(['eljaguar','Laamenaza1234'])
#url = 'https://tguploader.url/'+encrypt('https://moodle.uclv.edu.cu/draftfile.php/9918312/1323/file.txt')+'/'+token
#tokens = str('https://tguploader.url/uFiIiJmHjKRKXHXDpHnDnJyFqDeDYFzFhHsIBFeEYDeFyFhHYKzJhHXFyKkKBIwIiIwKtJqHeKYGmIuImKXJKKKGIIKEHHXGhIjIeHkDXJyGkDBJwKiHXJKGDEKKGHKEFDJELEFFXGwEtIqDeEOEIELKLEGDHGFFYKsHmEvD/BIAFyIBIkDtHeEqGYFgJpFMEbGaHCKDJLKGJJEDHLFGHFIHKFI*EJHLKJGKK').split('/')
#uri = tokens[-2]
#uri = decrypt(uri)
#userdata = parsetoken(tokens[-1])
#print(url)
#proxy = encrypt('152.206.201.33:4545')
#print(proxy)