Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{"fingerprint": "", "port": 123456},
],
"scan": [
{"port": 123456, "protocol": "TCP"},
{"port": 123456, "protocol": "UDP"},
],
"web": {
"paths": ["/", "/favicon.ico", "/robots.txt"],
"useragents": ["", "", ""],
},
},
"seen": True,
"tags": ["", "", ""],
}
EXAMPLE_IP_CONTEXT_OUTPUT = ANSI_MARKUP.parse(
textwrap.dedent(
"""\
<header>OVERVIEW</header>
----------------------------
Actor:
Classification:
First seen:
IP:
Last seen:
Tags:
-
-
-
<header>METADATA</header>
----------------------------
ANSI_MARKUP.parse(
textwrap.dedent(
u"""\
╔═══════════════════════════╗
║ <header> Query 1 of 1 </header> ║
╚═══════════════════════════╝
Query:
┌───────────────────────────┐
│ Result 1 of 1 │
└───────────────────────────┘
"""
)
)
+ EXAMPLE_IP_CONTEXT_OUTPUT,
),
output = [
context.command.get_usage(context),
(
"Error: at least one text file must be passed "
"either through the -i/--input_file option or through a shell pipe."
),
]
click.echo("\n\n".join(output))
context.exit(-1)
else:
input_file = click.open_file("-")
if output_file is None:
output_file = click.open_file("-", mode="w")
for chunk in api_client.filter(input_file, noise_only=noise_only):
output_file.write(ANSI_MARKUP(chunk))