diff --git a/.gitignore b/.gitignore index 2fe31e4..29d76fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,14 @@ +# Exclude __pycache__ +*.log +*.error +*.bak +*.csv +*.txt venv -test_output_file.csv -test_input_file.csv \ No newline at end of file +config.yml +app/config.yml +config/config.yml +.env + +# Exception \ No newline at end of file diff --git a/iplookup.py b/iplookup.py index bfe88e4..c18559b 100755 --- a/iplookup.py +++ b/iplookup.py @@ -9,6 +9,7 @@ # 14/08/2025 0.04 Add proxy support # 05/09/2025 0.05 Change standard output to JSON format and proxy configuration # 29/10/2025 0.06 Search FQDN from certificates found on opened/filtered ports +# 04/08/2026 0.07 Fix the type of the field argument import argparse import os @@ -21,7 +22,7 @@ from lib.ipinfo import ip -__version__ = '0.06' +__version__ = '0.07' def get_options(): """ Argument control """ @@ -33,7 +34,7 @@ def get_options(): parser.add_argument('-i', dest='ip', help='IP to check', metavar='') parser.add_argument('--file', dest='ipfile', help='IPs to check', metavar='', action='store') parser.add_argument('-s', '--separator', dest='separator', help='specify the separator used in input CSV file', metavar='', default=',') - parser.add_argument('--field', '--field', dest='field', help='select field includes IP address', metavar='') + parser.add_argument('--field', '--field', dest='field', help='select field includes IP address', metavar='', type=int) parser.add_argument('--format', dest='output_format', help='specify output format (default: csv)', choices=['json', 'csv'], default='csv', type=str.lower) parser.add_argument('-o', '--output', dest='output_file', help='specify the output filename', metavar='', action='store') parser.add_argument('--proxy', dest='proxy', help='specify HTTP proxy with port. Example: "localhost:3128"', metavar=':', type=parse_proxy, action='store')