X-Git-Url: https://reisub.nsupdate.info/git/?p=x93.git%2F.git;a=blobdiff_plain;f=xftp.git%2Fext%2Fx64%2Fb64_.py;fp=xftp.git%2Fext%2Fx64%2Fb64_.py;h=908a54616fea13f47543f5e7185356532759e90b;hp=0000000000000000000000000000000000000000;hb=3b43a05e10ec76aa79c878d8bd130e943708c08d;hpb=5938fd9eafee8417d8e7d677d3e663e66f02e7d4 diff --git a/xftp.git/ext/x64/b64_.py b/xftp.git/ext/x64/b64_.py new file mode 100644 index 0000000..908a546 --- /dev/null +++ b/xftp.git/ext/x64/b64_.py @@ -0,0 +1,194 @@ +import random +import base64 +contador=0 +contador1=0 + +def encode(texto): + text=texto.encode("UTF-8") + code=base64.b64encode(text).decode("UTF-8") + return code + +def decode(texto): + text=texto + code=base64.b64decode(text) + return code.decode("UTF-8") + +def encode_list(list2encode,encode2list): + global contador + for i in range(0,len(list2encode)): + encode2list.append(encode(list2encode[contador])) + contador=contador+1 + del(i) + +def decode_list(list2decode): + global contador1 + decode2list=[] + for i in range(0,len(list2decode)): + decode2list.append(decode(list2decode[contador1])) + contador1=contador1+1 + del(i) + return decode2list + + + +alphabet={ +1:"a", +2:"b", +3:"c", +4:"d", +5:"e", +6:"f", +7:"g", +8:"h", +9:"i", +10:"j", +11:"k", +12:"l", +13:"m", +14:"n", +15:"ñ", +16:"o", +17:"p", +18:"q", +19:"r", +20:"s", +21:"t", +22:"u", +23:"v", +24:"w", +25:"x", +26:"y", +27:"z", +28:"1", +29:"2", +30:"3", +31:"4", +32:"5", +33:"6", +34:"7", +35:"8", +36:"9", +37:"0", +38:"=", +39:".", +40:"?", +41:",", +42:";", +43:"_", +44:"°", +45:"!", +46:"&", +47:"#", +48:"$", +49:"/", +50:"|", +51:"A", +52:"B", +53:"C", +54:"D", +55:"E", +56:"F", +57:"G", +58:"H", +59:"I", +60:"J", +61:"K", +62:"L", +63:"M", +64:"N", +65:"Ñ", +66:"O", +67:"P", +68:"Q", +69:"R", +70:"S", +71:"T", +72:"U", +73:"V", +74:"W", +75:"X", +76:"Y", +77:"Z", +78:'¿', +79:' '} + +alphabet_inversed={ +'a':1, +'b':2, +'c':3, +'d':4, +'e':5, +'f':6, +'g':7, +'h':8, +'i':9, +'j':10, +'k':11, +'l':12, +'m':13, +'n':14, +'ñ':15, +'o':16, +'p':17, +'q':18, +'r':19, +'s':20, +'t':21, +'u':22, +'v':23, +'w':24, +'x':25, +'y':26, +'z':27, +'1':28, +'2':29, +'3':30, +'4':31, +'5':32, +'6':33, +'7':34, +'8':35, +'9':36, +'0':37, +'=':38, +'.':39, +'?':40, +',':41, +';':42, +'_':43, +'°':44, +'!':45, +'&':46, +'#':47, +'$':48, +'/':49, +'|':50, +'A':51, +'B':52, +'C':53, +'D':54, +'E':55, +'F':56, +'G':57, +'H':58, +'I':59, +'J':60, +'K':61, +'L':62, +'M':63, +'N':64, +'Ñ':65, +'O':66, +'P':67, +'Q':68, +'R':69, +'S':70, +'T':71, +'U':72, +'V':73, +'W':74, +'X':75, +'Y':76, +'Z':77, +'¿':78, +' ':79} \ No newline at end of file