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

ValueError: need more than 1 value to unpack #200

Open
LegendXI1 opened this issue Sep 23, 2022 · 6 comments
Open

ValueError: need more than 1 value to unpack #200

LegendXI1 opened this issue Sep 23, 2022 · 6 comments

Comments

@LegendXI1
Copy link

LegendXI1 commented Sep 23, 2022

┌──(cuckoo-test)(cuckoo7k㉿kali)-[~]
└─$ vmcloak init --verbose --win7x64 win7x64base1 --cpus 2 --ramsize 2048
/home/cuckoo7k/.virtualenvs/cuckoo-test/lib/python2.7/site-packages/OpenSSL/crypto.py:14: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography import utils, x509
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
INFO:vmcloak:Starting the Virtual Machine u'win7x64base1' to install Windows.
Traceback (most recent call last):
File "/home/cuckoo7k/.virtualenvs/cuckoo-test/bin/vmcloak", line 8, in
sys.exit(main())
File "/home/cuckoo7k/.virtualenvs/cuckoo-test/lib/python2.7/site-packages/click/core.py", line 716, in call
return self.main(*args, **kwargs)
File "/home/cuckoo7k/.virtualenvs/cuckoo-test/lib/python2.7/site-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/home/cuckoo7k/.virtualenvs/cuckoo-test/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/cuckoo7k/.virtualenvs/cuckoo-test/lib/python2.7/site-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/cuckoo7k/.virtualenvs/cuckoo-test/lib/python2.7/site-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "/home/cuckoo7k/.virtualenvs/cuckoo-test/lib/python2.7/site-packages/vmcloak/main.py", line 275, in init
m.wait_for_state(shutdown=True)
File "/home/cuckoo7k/.virtualenvs/cuckoo-test/lib/python2.7/site-packages/vmcloak/vm.py", line 65, in wait_for_state
status = self.vminfo("VMState")
File "/home/cuckoo7k/.virtualenvs/cuckoo-test/lib/python2.7/site-packages/vmcloak/vm.py", line 49, in vminfo
key, value = line.split("=", 1)
ValueError: need more than 1 value to unpack

Hi, im trying to innit win7 but I came across this issue which doesn't seem to have happend before to anyone else before.
Thank you

@Glacons
Copy link

Glacons commented Oct 12, 2022

I successfully implemented Cuckoo few months ago with vmcloak and now i try to reinstall it from scratch and got the same error. Currently using Virtualbox, i was using VMware workstation when it worked.

@TiborGalko
Copy link

Looks like bug in vm.py file. Because output from VBoxManage showvminfo can contain lines with no = character. Split will then fail. I tried to add if condition before key, value = line.split("=", 1) in home/cuckoo/lib/python2.7/site-packages/vmcloak/vm.py vminfo function: if("=" not in line): continue and it seems to work.

@j3nn13
Copy link

j3nn13 commented Apr 12, 2023

Looks like bug in vm.py file. Because output from VBoxManage showvminfo can contain lines with no = character. Split will then fail. I tried to add if condition before key, value = line.split("=", 1) in home/cuckoo/lib/python2.7/site-packages/vmcloak/vm.py vminfo function: if("=" not in line): continue and it seems to work.

Hi can you do a video demo :(( i struggle with this bugs for days..

@j3nn13
Copy link

j3nn13 commented Apr 12, 2023

I fixed like u said but it still give an error :(

image
image

@TiborGalko
Copy link

@j3nn13 Like this. Add continue after if. If there is no "=" in line, then skip it.

...
for line in lines.split("\n"):
    if ("=" not in line):
        continue
    key, value = line.split("=", 1)
...

@GVATech
Copy link

GVATech commented Apr 26, 2023

Had the same issue, Tried the additional IF statement and vmcloak worked correctly. Thanks @TiborGalko

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

5 participants