zschema
zschema copied to clipboard
Bug using elisticsearch option
There is a bug in zschema when using the elasticsearch option:
zschema --module zgrab2_schemas.zgrab2 elasticsearch zgrab2-ftp /mnt/hgfs/Shared/ftp_dod_cidr.json
Traceback (most recent call last):
File "/usr/local/bin/zschema", line 11, in <module>
load_entry_point('zschema==0.10.2', 'console_scripts', 'zschema')()
File "/home/juser/.local/lib/python2.7/site-packages/zschema/__main__.py", line 87, in main
print json.dumps(record.to_es(recname))
UnboundLocalError: local variable 'recname' referenced before assignment
Removing recname
from the to_es()
call seems to fix this bug. You should probably check the other to_X()
calls, as using recname
is not correct most of the time.