byob icon indicating copy to clipboard operation
byob copied to clipboard

AttributeError & Cannot build Client.py

Open CrimsonTorso opened this issue 7 years ago • 6 comments

I've tried running it through python3 (Python2 doesn't seem to work for some reason) & I get this error:

Traceback (most recent call last):
  File "client.py", line 438, in <module>
    main()
  File "client.py", line 191, in main
    stager  = _stager (options, var=var, key=key, modules=modules, imports=imports, hidden=hidden, url=payload)
  File "client.py", line 353, in _stager
    stager = open('core/stagers.py', 'r').read() + generators.main('run', url=kwargs['url'])
  File "/home/pi/Desktop/Perixx/byob/byob/core/generators.py", line 173, in main
    options = ', '.join(args) + str(', '.join(str("{}={}".format(k, v) if bool(v.count('{') > 0 and v.count('{') > 0) else "{}='{}'".format(k,v)) for k,v in kwargs.items()) if len(kwargs) else '')
  File "/home/pi/Desktop/Perixx/byob/byob/core/generators.py", line 173, in <genexpr>
    options = ', '.join(args) + str(', '.join(str("{}={}".format(k, v) if bool(v.count('{') > 0 and v.count('{') > 0) else "{}='{}'".format(k,v)) for k,v in kwargs.items()) if len(kwargs) else '')
AttributeError: 'NoneType' object has no attribute 'count'

Any suggestions?

CrimsonTorso avatar Apr 16 '19 16:04 CrimsonTorso

Try this for me and re-run your client generation + execution;

on the BYOB server, assuming linux: sed -i 's/bool(v.count/v != None and bool(v.count/g' byob/core/generators.py edit: it is possible this leads to a different error; python3 is not tested for much functionality. edi2: forgot filepath for sed

intrct avatar Apr 16 '19 23:04 intrct

I wasn't able to replicate this error on Python 2 or Python 3 - @intrct were you able to reproduce this issue?

malwaredllc avatar Apr 17 '19 01:04 malwaredllc

No, but there is a logic concern in that statement ... I'm not sure what the upstream data coming into that generator main function are intended to be... will need some time to debunk, but would need more info about what was being attempted at the time of error.

intrct avatar Apr 17 '19 17:04 intrct

Am having same issue as above .. Python 3.7


[>]
Dropper
        Writing dropper...
(347 bytes written to byob_k8w.py)
        Compiling executable...

b'547 INFO: PyInstaller: 3.3.1'
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\by\client.py", line 438, in <module>
    main()
  File "C:\Users\Administrator\Desktop\by\client.py", line 192, in main
    dropper = _dropper(options, var=var, key=key, modules=modules, imports=impor
ts, hidden=hidden, url=stager)
  File "C:\Users\Administrator\Desktop\by\client.py", line 420, in _dropper
    name = generators.freeze(name, icon=options.icon, hidden=kwargs['hidden'])
  File "C:\Users\Administrator\Desktop\by\core\generators.py", line 244, in free
ze
    if 'EXE' in line and 'complete' in line: break
TypeError: a bytes-like object is required, not 'str'

NoneAsName avatar Apr 28 '19 20:04 NoneAsName

I do not think the project has made progress in freezing for python3 yet. I suggest freezing with Python2.7.x in the meantime, until python3 is more broadly implemented.

intrct avatar Apr 29 '19 01:04 intrct

Fixed in PR #110 and #127

malwaredllc avatar May 06 '19 16:05 malwaredllc