Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# Exclude
__pycache__
*.log
*.error
*.bak
*.csv
*.txt
venv
test_output_file.csv
test_input_file.csv
config.yml
app/config.yml
config/config.yml
.env

# Exception
5 changes: 3 additions & 2 deletions iplookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -21,7 +22,7 @@
from lib.ipinfo import ip


__version__ = '0.06'
__version__ = '0.07'

def get_options():
""" Argument control """
Expand All @@ -33,7 +34,7 @@ def get_options():
parser.add_argument('-i', dest='ip', help='IP to check', metavar='<ip address>')
parser.add_argument('--file', dest='ipfile', help='IPs to check', metavar='<filename>', action='store')
parser.add_argument('-s', '--separator', dest='separator', help='specify the separator used in input CSV file', metavar='<separator_character>', default=',')
parser.add_argument('--field', '--field', dest='field', help='select field includes IP address', metavar='<separator_field>')
parser.add_argument('--field', '--field', dest='field', help='select field includes IP address', metavar='<separator_field>', 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='<filename>', action='store')
parser.add_argument('--proxy', dest='proxy', help='specify HTTP proxy with port. Example: "localhost:3128"', metavar='<proxy_host>:<proxy_port>', type=parse_proxy, action='store')
Expand Down
Loading