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

unpack requires a string argument of length 1 #26

Closed
CirnoT opened this issue May 15, 2019 · 1 comment
Closed

unpack requires a string argument of length 1 #26

CirnoT opened this issue May 15, 2019 · 1 comment

Comments

@CirnoT
Copy link

CirnoT commented May 15, 2019

python pykms_Client.py

                        Client generating RPC Bind Request...

Server receiving
<===============        Client sending RPC Bind Request...



Server sending
===============>        Client received RPC Bind Response !!!

                        RPC Bind acknowledged !!!


                        Client generating Activation Request dictionary...

                        Client generating Activation Request data...

                        Client generating RPC Activation Request...

Server receiving
<===============        Client sending RPC Activation Request...





Server sending
===============>        Client received Response !!!

Traceback (most recent call last):
  File "pykms_Client.py", line 266, in <module>
    clt_main(with_gui = False)
  File "pykms_Client.py", line 188, in clt_main
    client_create()
  File "pykms_Client.py", line 151, in client_create
    parsed = MSRPCRespHeader(response)
  File "/opt/py-kms/pykms_Dcerpc.py", line 641, in __init__
    MSRPCHeader.__init__(self, aBuffer, alignment)
  File "/opt/py-kms/pykms_Dcerpc.py", line 588, in __init__
    Structure.__init__(self,data, alignment)
  File "/opt/py-kms/pykms_Structure.py", line 110, in __init__
    self.fromString(data)
  File "/opt/py-kms/pykms_Structure.py", line 167, in fromString
    self[field[0]] = self.unpack(field[1], data[:size], dataClassOrCode = dataClassOrCode, field = field[0])
  File "/opt/py-kms/pykms_Structure.py", line 329, in unpack
    return self.unpack(two[0],data)
  File "/opt/py-kms/pykms_Structure.py", line 385, in unpack
    return unpack(format, b(data))[0]
struct.error: ('unpack requires a string argument of length 1', "When unpacking field 'ver_major | B=5 | ''[:1]'")

Do yourself a favor and:

  • Document breaking changes such as -v to -V and -f to -F.
  • Learn how to use Git instead of generating 40 useless commits and uploading local changes with literally no history of what happened
  • Test your stuff
  • Use GitHub releases for keeping archived versions of old releases - it will do so automatically when you create tag with release version. Git is not for storing backup files.
  • Decide whether you want to use Python 3 or Python 2 in README examples - example command for Ubuntu installs both versions but then installs and uses pip for Python 2 only.
@SystemRage
Copy link
Owner

Good advice,
however tested (both command line and GUI) and here no problems.

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