hatching / vmcloak

Automated Virtual Machine Generation and Cloaking for Cuckoo Sandbox.
483 stars 120 forks source link

Initial_value must be unicode or None, not str #120

Open Kolano opened 7 years ago

Kolano commented 7 years ago

Post the "vmcloak install" command...

vmcloak install seven0 vcredist adobepdf adobepdf.version=11.0.10 wic pillow dotnet dotnet.version=4.6.1 java java.version=8u121 silverlight winrar winrar.version=5.31_x64 flash flash.version=20.0.0.228 removetooltips --debug

...I get the following error...

Traceback (most recent call last):
  File "/usr/local/bin/vmcloak", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/vmcloak/main.py", line 352, in install
    d(h, m, a, image, version, settings).run()
  File "/usr/local/lib/python2.7/dist-packages/vmcloak/dependencies/java.py", line 286, in run
    self.a.upload("C:\\config.cfg", config)
  File "/usr/local/lib/python2.7/dist-packages/vmcloak/agent.py", line 123, in upload
    contents = io.StringIO(contents)
TypeError: initial_value must be unicode or None, not str
jbremer commented 7 years ago

Yes, this was resolved in 0.4.4 thanks to @razuz. Please upgrade!

Kolano commented 7 years ago

Apparently not as I'm using 0.4.4...

Collecting vmcloak
  Downloading VMCloak-0.4.4.tar.gz (57kB)
Collecting click==6.6 (from vmcloak)
  Downloading click-6.6-py2.py3-none-any.whl (71kB)
Collecting jinja2>=2.8 (from vmcloak)
  Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)
Collecting pyyaml==3.12 (from vmcloak)
  Downloading PyYAML-3.12.tar.gz (253kB)
Collecting sqlalchemy==1.0.8 (from vmcloak)
  Downloading SQLAlchemy-1.0.8.tar.gz (4.6MB)
Requirement already satisfied: requests[security]>=2.13.0 in /usr/local/lib/python2.7/dist-packages (from vmcloak)
Collecting MarkupSafe>=0.23 (from jinja2>=2.8->vmcloak)
  Downloading MarkupSafe-1.0.tar.gz
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python2.7/dist-packages (from requests[security]>=2.13.0->vmcloak)
Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python2.7/dist-packages (from requests[security]>=2.13.0->vmcloak)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python2.7/dist-packages (from requests[security]>=2.13.0->vmcloak)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python2.7/dist-packages (from requests[security]>=2.13.0->vmcloak)
Collecting pyOpenSSL>=0.14; extra == "security" (from requests[security]>=2.13.0->vmcloak)
  Downloading pyOpenSSL-17.2.0-py2.py3-none-any.whl (52kB)
Requirement already satisfied: cryptography>=1.3.4; extra == "security" in /usr/local/lib/python2.7/dist-packages (from requests[security]>=2.13.0->vmcloak)
Requirement already satisfied: six>=1.5.2 in /usr/local/lib/python2.7/dist-packages (from pyOpenSSL>=0.14; extra == "security"->requests[security]>=2.13.0->vmcloak)
Requirement already satisfied: ipaddress in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.3.4; extra == "security"->requests[security]>=2.13.0->vmcloak)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.3.4; extra == "security"->requests[security]>=2.13.0->vmcloak)
Requirement already satisfied: enum34 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.3.4; extra == "security"->requests[security]>=2.13.0->vmcloak)
Requirement already satisfied: cffi>=1.7 in /usr/local/lib/python2.7/dist-packages (from cryptography>=1.3.4; extra == "security"->requests[security]>=2.13.0->vmcloak)
Requirement already satisfied: pycparser in /usr/local/lib/python2.7/dist-packages (from cffi>=1.7->cryptography>=1.3.4; extra == "security"->requests[security]>=2.13.0->vmcloak)
Building wheels for collected packages: vmcloak, pyyaml, sqlalchemy, MarkupSafe
  Running setup.py bdist_wheel for vmcloak: started
  Running setup.py bdist_wheel for vmcloak: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/2e/a6/36/77900dbad85c338f86771c4b5f0cf39e053d644e9212c06f91
  Running setup.py bdist_wheel for pyyaml: started
  Running setup.py bdist_wheel for pyyaml: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/2c/f7/79/13f3a12cd723892437c0cfbde1230ab4d82947ff7b3839a4fc
  Running setup.py bdist_wheel for sqlalchemy: started
  Running setup.py bdist_wheel for sqlalchemy: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/26/c7/03/5a3f0f36220cc89bbd5f0ad1f57ec9f070967c5d188529bf52
  Running setup.py bdist_wheel for MarkupSafe: started
  Running setup.py bdist_wheel for MarkupSafe: finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/88/a7/30/e39a54a87bcbe25308fa3ca64e8ddc75d9b3e5afa21ee32d57
Successfully built vmcloak pyyaml sqlalchemy MarkupSafe
Installing collected packages: click, MarkupSafe, jinja2, pyyaml, sqlalchemy, vmcloak, pyOpenSSL
Successfully installed MarkupSafe-1.0 click-6.6 jinja2-2.9.6 pyOpenSSL-17.2.0 pyyaml-3.12 sqlalchemy-1.0.8 vmcloak-0.4.4
jbremer commented 7 years ago

~Oh, right, sorry - it may be there's another instance of what @razuz fixed. Checking..~ Eh, scrap that, taking a look.

Kolano commented 7 years ago

Last version I believe to be working was 0.4.4a2.

razuz commented 7 years ago

yeah, my fix is not really related to this case AFAIK .... odd that this happens with java tho' ... altho' this is the first one having letter

Hodgegoblin commented 6 years ago

I have the same issue using 0.4.4. It worked when installing to win10x64 base but gives this error when attempting a win7x86.

jbremer commented 6 years ago

@Hodgegoblin try 0.4.5, in which I once again resolved this issue (hopefully).

jbremer commented 6 years ago

Ehm, sorry, that'd be 0.4.5a2.

Kolano commented 6 years ago

I think he mean 0.4.4a2, there is no 0.4.5a2 yet.

jbremer commented 6 years ago

There's actually ;)

Kolano commented 6 years ago

Sorry, missed the check in on Nov 13. But it seems something was mucked up causing them to not get listed as releases here yet.

jbremer commented 6 years ago

Looks good to go to me https://pypi.python.org/pypi/VMCloak :)

Kolano commented 6 years ago

I was looking here: https://github.com/jbremer/vmcloak/releases

jbremer commented 6 years ago

You were right - just added the tags there, too!