Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- adrxs_params = {}
- # output = str(binascii.unhexlify(f.readline().replace("\n", "")).split("HTTP"))
- razd = tz[:8]
- stros = tz.replace("\n", "").split(razd)
- lln = len(stros)
- adresses = [""]*lln
- for w in range(len(stros)):
- if len(stros[w]) >= 40:
- nnn = stros[w][32:40]
- a = str(int(nnn[:2], 16))
- b = str(int(nnn[2:4], 16))
- c = str(int(nnn[4:6], 16))
- d = str(int(nnn[6:], 16))
- adress = a + "." + b + "." + c + "." + d
- if adress not in adresses:
- adresses[w] = adress
- # z.write(adress)
- output = str(binascii.unhexlify(stros[w][40:])).replace("\b", "")
- if "{" in output:
- ffex = output[output.find('{')+1: output.rfind("}")]
- if len(ffex) > 0:
- if ffex[0] == '"':
- www = [0, ffex.split(",")]
- if adress in adrxs_params.keys():
- adrxs_params[adress].append(www)
- else:
- adrxs_params[adress] = [www]
- found = False
- for jj in adrxs_params.items():
- z.write(jj[0] + "---->")
- print(jj[0])
- for yy in jj[1]:
- prilozsh = 0
- kmet = 0
- has_method = False
- print(yy)
- for p in yy[1]:
- if "exception" in p or "error" in p or "Exception" in p or "Error" in p:
- prilozsh = -1
- break
- if '"method"' in p:
- has_method = True
- if p not in good_methods:
- prilozsh = -1
- break
- else:
- type = good_methods.index(p)
- for pp2 in yy[1]:
- if '"params"' in pp2:
- datax = pp2[pp2.find('"params":["')+9:]
- if datax != ":[]":
- print(datax)
- # check "data"
- z.write(p+"----")
- if prilozsh == 1:
- adrnew.append(jj[0])
- found = True
- break
- # elif prilozsh == -1:
- if len(jj[1]) > 0:
- z.write("\n")
- # for vc in adresses:
- # if len(vc) > 0:
- # print(vc)
- # if not found:
- tz = str(f.readline())
- z.write("\n")
- for vc in adrxs:
- print(vc)
- print(okiks)
- import binascii
- import codecs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement