cheetz / c2

Covert Channels for C2 Server
17 stars 20 forks source link

Can't generate under Kali 2.0 #2

Open absane opened 8 years ago

absane commented 8 years ago

I just downloaded this script to Kali 2.0 and it seems that I cannot generate binaries. This is the error I get after running generate_binary:

> generate_binary a.b.c.d 4444
Traceback (most recent call last):
  File "/opt/pyinstaller-2.0/pyinstaller.py", line 14, in <module>
    from PyInstaller.__main__ import run
  File "Z:\opt\pyinstaller-2.0\PyInstaller\__main__.py", line 21, in <module>
    import PyInstaller.building.build_main
  File "Z:\opt\pyinstaller-2.0\PyInstaller\building\build_main.py", line 32, in <module>
    from ..depend import bindepend
  File "Z:\opt\pyinstaller-2.0\PyInstaller\depend\bindepend.py", line 30, in <module>
    from . import dylib, utils
  File "Z:\opt\pyinstaller-2.0\PyInstaller\depend\utils.py", line 25, in <module>
    from ..lib.modulegraph import modulegraph
  File "Z:\opt\pyinstaller-2.0\PyInstaller\lib\modulegraph\modulegraph.py", line 12, in <module>
    import pkg_resources
ImportError: No module named pkg_resources
Traceback (most recent call last):
  File "server.py", line 302, in <module>
    gen_bin(info[1],info[2])
  File "server.py", line 125, in gen_bin
    gen_binary.generate_binary(IP,PORT)
  File "/opt/c2/gen_binary.py", line 93, in generate_binary
    subprocess.check_output("wine C:/Python27/python.exe /opt/pyinstaller-2.0/pyinstaller.py --icon=RichText.ico --noconsole --onefile winword.py", shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'wine C:/Python27/python.exe /opt/pyinstaller-2.0/pyinstaller.py --icon=RichText.ico --noconsole --onefile winword.py' returned non-zero exit status 1

All the solutions I see say to reinstall python-setuptools but that does not work. I've also copied the Kali-provided pyinstaller to /opt/pyinstaller-2.0 but that also does not help.