sup roarie
This commit is contained in:
parent
f1f5a78ae0
commit
19525aec7d
@ -6,4 +6,4 @@ from .colors import Colors
|
|||||||
from .scanner import HTTPZScanner
|
from .scanner import HTTPZScanner
|
||||||
|
|
||||||
|
|
||||||
__version__ = '2.1.7'
|
__version__ = '2.1.8'
|
@ -38,9 +38,17 @@ def format_console_output(result: dict, debug: bool = False, show_fields: dict =
|
|||||||
status = f"{Colors.RED}[{result['status']}]{Colors.RESET}"
|
status = f"{Colors.RED}[{result['status']}]{Colors.RESET}"
|
||||||
parts.append(status)
|
parts.append(status)
|
||||||
|
|
||||||
# Domain (always shown)
|
# Domain/URL
|
||||||
parts.append(f"[{result['url']}]")
|
parts.append(f"[{result['url']}]")
|
||||||
|
|
||||||
|
# Content Type
|
||||||
|
if show_fields.get('content_type') and result.get('content_type'):
|
||||||
|
parts.append(f"{Colors.CYAN}[{result['content_type']}]{Colors.RESET}")
|
||||||
|
|
||||||
|
# Content Length
|
||||||
|
if show_fields.get('content_length') and result.get('content_length'):
|
||||||
|
parts.append(f"{Colors.PINK}[{result['content_length']}]{Colors.RESET}")
|
||||||
|
|
||||||
# Title
|
# Title
|
||||||
if show_fields.get('title') and result.get('title'):
|
if show_fields.get('title') and result.get('title'):
|
||||||
parts.append(f"{Colors.DARK_GREEN}[{result['title']}]{Colors.RESET}")
|
parts.append(f"{Colors.DARK_GREEN}[{result['title']}]{Colors.RESET}")
|
||||||
@ -60,8 +68,8 @@ def format_console_output(result: dict, debug: bool = False, show_fields: dict =
|
|||||||
parts.append(f"{Colors.PURPLE}[{result['favicon_hash']}]{Colors.RESET}")
|
parts.append(f"{Colors.PURPLE}[{result['favicon_hash']}]{Colors.RESET}")
|
||||||
|
|
||||||
# Headers
|
# Headers
|
||||||
if show_fields.get('headers') and result.get('headers'):
|
if show_fields.get('headers') and result.get('response_headers'):
|
||||||
headers_text = [f"{k}: {v}" for k, v in result['headers'].items()]
|
headers_text = [f"{k}: {v}" for k, v in result['response_headers'].items()]
|
||||||
parts.append(f"{Colors.CYAN}[{', '.join(headers_text)}]{Colors.RESET}")
|
parts.append(f"{Colors.CYAN}[{', '.join(headers_text)}]{Colors.RESET}")
|
||||||
else:
|
else:
|
||||||
if show_fields.get('content_type') and result.get('content_type'):
|
if show_fields.get('content_type') and result.get('content_type'):
|
||||||
@ -73,18 +81,18 @@ def format_console_output(result: dict, debug: bool = False, show_fields: dict =
|
|||||||
parts.append(f"{Colors.PINK}[{size}]{Colors.RESET}")
|
parts.append(f"{Colors.PINK}[{size}]{Colors.RESET}")
|
||||||
except (ValueError, TypeError):
|
except (ValueError, TypeError):
|
||||||
parts.append(f"{Colors.PINK}[{result['content_length']}]{Colors.RESET}")
|
parts.append(f"{Colors.PINK}[{result['content_length']}]{Colors.RESET}")
|
||||||
|
|
||||||
# CNAME
|
|
||||||
if show_fields.get('cname') and result.get('cname'):
|
|
||||||
parts.append(f"{Colors.PURPLE}[CNAME: {result['cname']}]{Colors.RESET}")
|
|
||||||
|
|
||||||
# Redirect Chain
|
# Redirect Chain
|
||||||
if show_fields.get('follow_redirects') and result.get('redirect_chain'):
|
if show_fields.get('follow_redirects') and result.get('redirect_chain'):
|
||||||
chain = ' -> '.join(result['redirect_chain'])
|
chain = ' -> '.join(result['redirect_chain'])
|
||||||
parts.append(f"{Colors.YELLOW}[Redirects: {chain}]{Colors.RESET}")
|
parts.append(f"{Colors.YELLOW}[Redirects: {chain}]{Colors.RESET}")
|
||||||
|
|
||||||
|
# CNAME
|
||||||
|
if show_fields.get('cname') and result.get('cname'):
|
||||||
|
parts.append(f"{Colors.PURPLE}[CNAME: {result['cname']}]{Colors.RESET}")
|
||||||
|
|
||||||
# TLS Certificate Info
|
# TLS Certificate Info
|
||||||
if result.get('tls'):
|
if show_fields.get('tls') and result.get('tls'):
|
||||||
cert = result['tls']
|
cert = result['tls']
|
||||||
tls_parts = []
|
tls_parts = []
|
||||||
if cert.get('common_name'):
|
if cert.get('common_name'):
|
||||||
|
2
setup.py
2
setup.py
@ -10,7 +10,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='httpz_scanner',
|
name='httpz_scanner',
|
||||||
version='2.1.7',
|
version='2.1.8',
|
||||||
author='acidvegas',
|
author='acidvegas',
|
||||||
author_email='acid.vegas@acid.vegas',
|
author_email='acid.vegas@acid.vegas',
|
||||||
description='Hyper-fast HTTP Scraping Tool',
|
description='Hyper-fast HTTP Scraping Tool',
|
||||||
|
Loading…
Reference in New Issue
Block a user