INNER CODE UNIT · Python
fng_statistics_top
rfc-st/humble · humble.py:333
def fng_statistics_top():
"""Print top 20 HTTP fingerprint header statistics.
Grouped by service and terminate execution, related to `-f` option.
"""
print(
f"\n{STYLE[0]}{get_detail('[fng_stats]', replace=True)}"
f"{STYLE[4]}{get_detail('[fng_source]', replace=True)}\n",
)
fng_lines = PATHS["fingerprint_top"].read_text(encoding="utf8").splitlines(
keepends=True,
)
fng_lines = fng_lines[SLICE_INT[0]:]
fng_incl = len(fng_lines)
fng_statistics_top_groups(fng_lines, fng_incl)
sys.exit(0)