portune 0.1.5__tar.gz → 0.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of portune might be problematic. Click here for more details.
- {portune-0.1.5/portune.egg-info → portune-0.1.6}/PKG-INFO +1 -1
- {portune-0.1.5 → portune-0.1.6}/portune/portune.py +13 -4
- {portune-0.1.5 → portune-0.1.6}/portune/version.py +2 -2
- {portune-0.1.5 → portune-0.1.6/portune.egg-info}/PKG-INFO +1 -1
- {portune-0.1.5 → portune-0.1.6}/.github/workflows/python-publish.yml +0 -0
- {portune-0.1.5 → portune-0.1.6}/.gitignore +0 -0
- {portune-0.1.5 → portune-0.1.6}/LICENSE +0 -0
- {portune-0.1.5 → portune-0.1.6}/README.md +0 -0
- {portune-0.1.5 → portune-0.1.6}/portune/__init__.py +0 -0
- {portune-0.1.5 → portune-0.1.6}/portune.egg-info/SOURCES.txt +0 -0
- {portune-0.1.5 → portune-0.1.6}/portune.egg-info/dependency_links.txt +0 -0
- {portune-0.1.5 → portune-0.1.6}/portune.egg-info/entry_points.txt +0 -0
- {portune-0.1.5 → portune-0.1.6}/portune.egg-info/top_level.txt +0 -0
- {portune-0.1.5 → portune-0.1.6}/pyproject.toml +0 -0
- {portune-0.1.5 → portune-0.1.6}/setup.cfg +0 -0
|
@@ -281,8 +281,8 @@ function initTableFilters(table) {
|
|
|
281
281
|
// Add filter input
|
|
282
282
|
const input = document.createElement('input');
|
|
283
283
|
input.type = 'search';
|
|
284
|
-
input.className =
|
|
285
|
-
input.placeholder = '\\uD83D\\uDD0E\\uFE0E';
|
|
284
|
+
input.className = `column-filter input-${index}`;
|
|
285
|
+
input.placeholder = '\\uD83D\\uDD0E\\uFE0E';
|
|
286
286
|
input.addEventListener('input', () => applyFilters(table));
|
|
287
287
|
header.appendChild(input);
|
|
288
288
|
}
|
|
@@ -547,6 +547,7 @@ function exportToExcel(table, fileNamePrefix = 'export') {
|
|
|
547
547
|
let commandsTable = document.querySelector('#commandTable');
|
|
548
548
|
document.addEventListener('DOMContentLoaded', () => {
|
|
549
549
|
if (commandsTable) initTableFilters(commandsTable);
|
|
550
|
+
document.querySelector('.input-4').value = '{FILTER}';
|
|
550
551
|
});
|
|
551
552
|
</script>
|
|
552
553
|
"""
|
|
@@ -1187,6 +1188,7 @@ def generate_html_report(
|
|
|
1187
1188
|
stats: Dict[str, Any],
|
|
1188
1189
|
input_file: str = '',
|
|
1189
1190
|
desc_titles: List[str] = [],
|
|
1191
|
+
filter: str = '',
|
|
1190
1192
|
) -> None:
|
|
1191
1193
|
"""Generate a complete HTML report of the port scan results.
|
|
1192
1194
|
|
|
@@ -1256,8 +1258,11 @@ def generate_html_report(
|
|
|
1256
1258
|
ping_status = 'UP' if ping else 'N/A' if noping else 'DOWN'
|
|
1257
1259
|
ping_class = 'green' if ping else 'blue' if noping else 'red'
|
|
1258
1260
|
status_class = 'green' if status == 'CONNECTED' else 'blue' if status == 'REFUSED' else 'red'
|
|
1261
|
+
row_class = ''
|
|
1262
|
+
if filter and status != filter:
|
|
1263
|
+
row_class = 'hidden'
|
|
1259
1264
|
f.write(f'''
|
|
1260
|
-
<tr>
|
|
1265
|
+
<tr class="{row_class}">
|
|
1261
1266
|
<td>{escape(str(hostname))}</td>
|
|
1262
1267
|
<td>{escape(str(ip))}</td>
|
|
1263
1268
|
<td>{str(get_vlan_base(ip, stats['vlan_bits']))}</td>
|
|
@@ -1274,7 +1279,7 @@ def generate_html_report(
|
|
|
1274
1279
|
f.write(generate_html_summary(stats, parallelism, timeout))
|
|
1275
1280
|
|
|
1276
1281
|
# Add JavaScript for interactivity
|
|
1277
|
-
f.write(f'</body>{JS}</html>\n')
|
|
1282
|
+
f.write(f'</body>{JS.replace("{FILTER}", filter)}</html>\n')
|
|
1278
1283
|
|
|
1279
1284
|
def print_statistics(stats, timeout, parallelism):
|
|
1280
1285
|
def format_percent(value, total):
|
|
@@ -1449,6 +1454,9 @@ def main():
|
|
|
1449
1454
|
parser.add_argument('-s', '--summary', action="store_true", help='Print scan summary information')
|
|
1450
1455
|
parser.add_argument('-b', '--bits', type=int, default=16, help='VLAN bits for timeout summary (default: 16)')
|
|
1451
1456
|
parser.add_argument('-d', '--desc_titles', type=str, nargs='*', help='List of custom description titles for hosts (optional)')
|
|
1457
|
+
parser.add_argument('-f', '--filter', type=str, help='default status filter for html report (optional)',
|
|
1458
|
+
choices=['CONNECTED', 'REFUSED', 'TIMEOUT', 'UNREACHABLE', 'RESOLVE_FAIL'], default='')
|
|
1459
|
+
|
|
1452
1460
|
# Email related arguments
|
|
1453
1461
|
email_group = parser.add_argument_group('Email Options')
|
|
1454
1462
|
email_group.add_argument('--email-to', help='Comma-separated list of email recipients')
|
|
@@ -1516,6 +1524,7 @@ def main():
|
|
|
1516
1524
|
stats,
|
|
1517
1525
|
args.input_file,
|
|
1518
1526
|
args.desc_titles,
|
|
1527
|
+
args.filter,
|
|
1519
1528
|
)
|
|
1520
1529
|
|
|
1521
1530
|
# Print summary
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|