Skip to content

Commit

Permalink
avoid seeing a powershell console poping up and closing when running …
Browse files Browse the repository at this point in the history
…hidden like in pupy
  • Loading branch information
n1nj4sec committed Sep 28, 2016
1 parent 37ec45d commit d7ee826
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Windows/lazagne/softwares/browsers/ie.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ def history_from_powershell(self):
get-iehistory
'''
command=['powershell.exe', '/c', cmdline]
res = subprocess.check_output(command, stderr=subprocess.STDOUT, stdin=subprocess.PIPE, universal_newlines=True)

info=subprocess.STARTUPINFO()
info.dwFlags=subprocess.STARTF_USESHOWWINDOW | subprocess.CREATE_NEW_PROCESS_GROUP
info.wShowWindow=subprocess.SW_HIDE
p=subprocess.Popen(command, startupinfo=info, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, universal_newlines=True)
res, _=p.communicate()
urls = []
for r in res.split('\n'):
if r.startswith('http'):
Expand Down Expand Up @@ -216,7 +221,13 @@ def windows_vault_ie(self):
'''

command=['powershell.exe', '/c', cmdline]
results = subprocess.check_output(command, stderr=subprocess.STDOUT, stdin=subprocess.PIPE, universal_newlines=True)

info=subprocess.STARTUPINFO()
info.dwFlags=subprocess.STARTF_USESHOWWINDOW | subprocess.CREATE_NEW_PROCESS_GROUP
info.wShowWindow=subprocess.SW_HIDE
p=subprocess.Popen(command, startupinfo=info, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, universal_newlines=True)
results, _=p.communicate()

passwords = []
for result in results.replace('\n', '').split('_________'):
values = {}
Expand Down Expand Up @@ -279,4 +290,4 @@ def run(self, historic=''):
except Exception,e:
print_debug('DEBUG', '{0}'.format(e))

return pwdFound
return pwdFound

0 comments on commit d7ee826

Please sign in to comment.