MCPcopy Create free account
hub / github.com/sqlmapproject/sqlmap / decloak

Function decloak

extra/cloak/cloak.py:36–49  ·  view source on GitHub ↗
(inputFile=None, data=None)

Source from the content-addressed store, hash-verified

34 return xor(zlib.compress(data), KEY)
35
36def decloak(inputFile=None, data=None):
37 if data is None:
38 with open(inputFile, "rb") as f:
39 data = f.read()
40 try:
41 data = zlib.decompress(xor(data, KEY))
42 except Exception as ex:
43 print(ex)
44 print('ERROR: the provided input file \'%s\' does not contain valid cloaked content' % inputFile)
45 sys.exit(1)
46 finally:
47 f.close()
48
49 return data
50
51def main():
52 usage = '%s [-d] -i <input file> [-o <output file>]' % sys.argv[0]

Callers 5

decloakToTempFunction · 0.90
uploadShellcodeexecMethod · 0.90
webUploadMethod · 0.90
webInitMethod · 0.90
mainFunction · 0.85

Calls 3

xorFunction · 0.85
readMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…