mirror of
https://github.com/mgeeky/Penetration-Testing-Tools.git
synced 2024-11-22 02:21:36 +01:00
updated tamperUpx.py
This commit is contained in:
parent
d697207e5f
commit
6aec7aea22
@ -6,7 +6,12 @@ import os, sys
|
|||||||
|
|
||||||
|
|
||||||
def tamperUpx(outfile):
|
def tamperUpx(outfile):
|
||||||
|
pe = None
|
||||||
|
try:
|
||||||
pe = pefile.PE(outfile)
|
pe = pefile.PE(outfile)
|
||||||
|
except:
|
||||||
|
print('[!] Input PE file corrupted. Unable to proceed.')
|
||||||
|
return False
|
||||||
|
|
||||||
newSectionNames = (
|
newSectionNames = (
|
||||||
'.text',
|
'.text',
|
||||||
@ -144,6 +149,8 @@ def main(argv):
|
|||||||
|
|
||||||
if tamperUpx(outfile):
|
if tamperUpx(outfile):
|
||||||
print('[+] Success. UPX should have some issues decompressing output artifact now.')
|
print('[+] Success. UPX should have some issues decompressing output artifact now.')
|
||||||
|
else:
|
||||||
|
print('[-] FAILED: Could not tamper input file.')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main(sys.argv)
|
main(sys.argv)
|
Loading…
Reference in New Issue
Block a user