CERT-Polska / hfinger

Hfinger - fingerprinting HTTP requests
GNU General Public License v3.0
131 stars 12 forks source link

__main__.py instead of hfinger.py #2

Closed ventaquil closed 3 years ago

ventaquil commented 4 years ago

Consider moving hfinger.py file to hfinger/__main__.py to give possibility to execute hfinger using -m flag.

$ python3 -m hfinger ...

You should add one extra parameter to deliver program name

my_parser = argparse.ArgumentParser(
    description="Hfinger - fingerprinting HTTP requests stored in pcap files",
    allow_abbrev=False,
    prog="hfinger",  # <- this one
)

Without change

$ python3 -m hfinger
usage: __main__.py [-h] (-f FILE | -d DIR) [-o output_path] [-m {0,1,2}]
__main__.py: error: one of the arguments -f/--file -d/--directory is required

After change

$ python3 -m hfinger
usage: hfinger [-h] (-f FILE | -d DIR) [-o output_path] [-m {0,1,2}]
hfinger: error: one of the arguments -f/--file -d/--directory is required
PBia commented 3 years ago

Hi, thanks for the info. We plan to add better modularity support of hfinger - maybe in the next release.

ventaquil commented 3 years ago

Nice - waiting for it 👍

PBia commented 3 years ago

Hi, sorry for keeping you waiting. Now everything should work as you pointed out plus we have added additional report modes. You can find more info in the changelog. Please open an issue if something is wrong.

ventaquil commented 3 years ago

Don't worry, nice to see that project is growing. Everything is looks okay now for me.