Skip to content

Bug using elisticsearch option #64

@sei-mwd

Description

@sei-mwd

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions