Small bug fixes.

1.6
Harmj0y 2016-02-16 01:53:16 -05:00
parent 734831b5fb
commit 75ea648c49
3 changed files with 4 additions and 5 deletions

View File

@ -576,13 +576,13 @@ def color(string, color=None):
return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string) return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
else: else:
if string.startswith("[!]"): if string.strip().startswith("[!]"):
attr.append('31') attr.append('31')
return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string) return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
elif string.startswith("[+]"): elif string.strip().startswith("[+]"):
attr.append('32') attr.append('32')
return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string) return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
elif string.startswith("[*]"): elif string.strip().startswith("[*]"):
attr.append('34') attr.append('34')
return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string) return '\x1b[%sm%s\x1b[0m' % (';'.join(attr), string)
else: else:

View File

@ -24,7 +24,7 @@ def title(version):
""" """
os.system('clear') os.system('clear')
print "====================================================================================" print "===================================================================================="
print " Empire: PowerShell post-exploitation agent | [Version]: " + version print " Empire: PowerShell post-exploitation agent | [Version]: %s" % (version)
print '====================================================================================' print '===================================================================================='
print ' [Web]: https://www.PowerShellEmpire.com/ | [Twitter]: @harmj0y, @sixdub, @enigma0x3' print ' [Web]: https://www.PowerShellEmpire.com/ | [Twitter]: @harmj0y, @sixdub, @enigma0x3'
print '====================================================================================' print '===================================================================================='

View File

@ -395,7 +395,6 @@ class Stagers:
# patch the dll with the new PowerShell code # patch the dll with the new PowerShell code
searchString = (("Invoke-Replace").encode("UTF-16"))[2:] searchString = (("Invoke-Replace").encode("UTF-16"))[2:]
index = dllRaw.find(searchString) index = dllRaw.find(searchString)
print "index:",index
dllPatched = dllRaw[:index]+replacementCode+dllRaw[(index+len(replacementCode)):] dllPatched = dllRaw[:index]+replacementCode+dllRaw[(index+len(replacementCode)):]
return dllPatched return dllPatched