portune 0.1.3__tar.gz → 0.1.4__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.3/portune.egg-info → portune-0.1.4}/PKG-INFO +2 -2
- {portune-0.1.3 → portune-0.1.4}/README.md +1 -1
- {portune-0.1.3 → portune-0.1.4}/portune/portune.py +35 -13
- {portune-0.1.3 → portune-0.1.4}/portune/version.py +2 -2
- {portune-0.1.3 → portune-0.1.4/portune.egg-info}/PKG-INFO +2 -2
- {portune-0.1.3 → portune-0.1.4}/.github/workflows/python-publish.yml +0 -0
- {portune-0.1.3 → portune-0.1.4}/.gitignore +0 -0
- {portune-0.1.3 → portune-0.1.4}/LICENSE +0 -0
- {portune-0.1.3 → portune-0.1.4}/portune/__init__.py +0 -0
- {portune-0.1.3 → portune-0.1.4}/portune.egg-info/SOURCES.txt +0 -0
- {portune-0.1.3 → portune-0.1.4}/portune.egg-info/dependency_links.txt +0 -0
- {portune-0.1.3 → portune-0.1.4}/portune.egg-info/entry_points.txt +0 -0
- {portune-0.1.3 → portune-0.1.4}/portune.egg-info/top_level.txt +0 -0
- {portune-0.1.3 → portune-0.1.4}/pyproject.toml +0 -0
- {portune-0.1.3 → portune-0.1.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: portune
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Simple Python HTTP Exec Server
|
|
5
5
|
Author: Franck Jouvanceau
|
|
6
6
|
Maintainer: Franck Jouvanceau
|
|
@@ -58,7 +58,7 @@ Multitreaded port scanner
|
|
|
58
58
|
|
|
59
59
|
# features
|
|
60
60
|
|
|
61
|
-
* parallel check of port availability against
|
|
61
|
+
* parallel check of port availability against servers/ports
|
|
62
62
|
* console output result / summary
|
|
63
63
|
* html full report / dns domain summary / vlan timeout summary
|
|
64
64
|
* mail with html summary / report attachment (mailhost relay)
|
|
@@ -4,7 +4,7 @@ Multitreaded port scanner
|
|
|
4
4
|
|
|
5
5
|
# features
|
|
6
6
|
|
|
7
|
-
* parallel check of port availability against
|
|
7
|
+
* parallel check of port availability against servers/ports
|
|
8
8
|
* console output result / summary
|
|
9
9
|
* html full report / dns domain summary / vlan timeout summary
|
|
10
10
|
* mail with html summary / report attachment (mailhost relay)
|
|
@@ -38,7 +38,9 @@ body {
|
|
|
38
38
|
font-family: Arial, sans-serif;
|
|
39
39
|
overflow: auto;
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
.hidden {
|
|
42
|
+
display: none;
|
|
43
|
+
}
|
|
42
44
|
.icon {
|
|
43
45
|
border-radius: 25px;
|
|
44
46
|
background-color: #444;
|
|
@@ -308,6 +310,7 @@ function toggleSort(table, colIndex, sortBtn) {
|
|
|
308
310
|
}
|
|
309
311
|
|
|
310
312
|
function applyFilters(table) {
|
|
313
|
+
table.classList.add('hidden');
|
|
311
314
|
const rows = Array.from(table.querySelectorAll('tbody tr'));
|
|
312
315
|
const filters = Array.from(table.querySelectorAll('.column-filter'))
|
|
313
316
|
.map(filter => ({
|
|
@@ -322,10 +325,10 @@ function applyFilters(table) {
|
|
|
322
325
|
// First apply filters
|
|
323
326
|
const filteredRows = rows.filter(row => {
|
|
324
327
|
// If no filters are active, show all rows
|
|
325
|
-
if (filters.every(f => !f.value)) {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
328
|
+
//if (filters.every(f => !f.value)) {
|
|
329
|
+
// row.classList.remove('hidden');
|
|
330
|
+
// return true;
|
|
331
|
+
//}
|
|
329
332
|
const cells = row.cells;
|
|
330
333
|
const shouldShow = !filters.some(filter => {
|
|
331
334
|
if (!filter.value) return false;
|
|
@@ -333,7 +336,11 @@ function applyFilters(table) {
|
|
|
333
336
|
if (filter.regexp) return !filter.regexp.test(cellText);
|
|
334
337
|
return !cellText.toLowerCase().includes(filter.value);
|
|
335
338
|
});
|
|
336
|
-
|
|
339
|
+
if (shouldShow) {
|
|
340
|
+
row.classList.remove('hidden');
|
|
341
|
+
} else {
|
|
342
|
+
row.classList.add('hidden');
|
|
343
|
+
}
|
|
337
344
|
return shouldShow;
|
|
338
345
|
});
|
|
339
346
|
|
|
@@ -371,6 +378,7 @@ function applyFilters(table) {
|
|
|
371
378
|
const tbody = table.querySelector('tbody');
|
|
372
379
|
filteredRows.forEach(row => tbody.appendChild(row));
|
|
373
380
|
}
|
|
381
|
+
table.classList.remove('hidden');
|
|
374
382
|
}
|
|
375
383
|
|
|
376
384
|
function processHtmlContent(element) {
|
|
@@ -628,11 +636,11 @@ def parse_input_file(filename: str) -> List[Tuple[str, List[int]]]:
|
|
|
628
636
|
host_dict = {}
|
|
629
637
|
with open(filename, 'r') as f:
|
|
630
638
|
for line in f:
|
|
631
|
-
line = line.strip()
|
|
639
|
+
line = line.strip()
|
|
632
640
|
if not line or line.startswith('#'):
|
|
633
641
|
continue
|
|
634
642
|
words = line.split()
|
|
635
|
-
fqdn = words[0]
|
|
643
|
+
fqdn = words[0].lower()
|
|
636
644
|
ports = words[1] if len(words) > 1 else '22'
|
|
637
645
|
port_list = [int(p) for p in ports.split(',')]
|
|
638
646
|
desc = ' '.join(words[2:]).strip() if len(words) > 2 else ''
|
|
@@ -1158,7 +1166,8 @@ def generate_html_report(
|
|
|
1158
1166
|
parallelism: int,
|
|
1159
1167
|
noping: bool,
|
|
1160
1168
|
stats: Dict[str, Any],
|
|
1161
|
-
input_file: str = ''
|
|
1169
|
+
input_file: str = '',
|
|
1170
|
+
desc_titles: List[str] = [],
|
|
1162
1171
|
) -> None:
|
|
1163
1172
|
"""Generate a complete HTML report of the port scan results.
|
|
1164
1173
|
|
|
@@ -1203,6 +1212,9 @@ def generate_html_report(
|
|
|
1203
1212
|
f.write(f'<h3 class="icon">Port Accessibility Report from {HOSTNAME} ({MY_IP}) to {os.path.basename(input_file)} - {time.strftime("%Y-%m-%d %H:%M:%S", scan_time)}</h3>\n')
|
|
1204
1213
|
|
|
1205
1214
|
# Write detailed results table
|
|
1215
|
+
if not desc_titles:
|
|
1216
|
+
_, _, _, _, _, desc = results[0]
|
|
1217
|
+
desc_titles = ["Description" for d in desc.split("|")]
|
|
1206
1218
|
f.write(f'''
|
|
1207
1219
|
<div class="table-container" id="result-container">
|
|
1208
1220
|
<table id="commandTable">
|
|
@@ -1214,7 +1226,7 @@ def generate_html_report(
|
|
|
1214
1226
|
<th>Port</th>
|
|
1215
1227
|
<th>Status</th>
|
|
1216
1228
|
<th>Ping</th>
|
|
1217
|
-
<th>
|
|
1229
|
+
{"\n".join([f"<th>{d}</th>" for d in desc_titles])}
|
|
1218
1230
|
</tr>
|
|
1219
1231
|
</thead>
|
|
1220
1232
|
<tbody>
|
|
@@ -1233,7 +1245,7 @@ def generate_html_report(
|
|
|
1233
1245
|
<td style="text-align: right;">{port}</td>
|
|
1234
1246
|
<td style="text-align: center;"><span class="{status_class} status">{escape(status)}</span></td>
|
|
1235
1247
|
<td style="text-align: center;"><span class="{ping_class} ping">{ping_status}</span></td>
|
|
1236
|
-
<td class="desc">{escape(str(
|
|
1248
|
+
{"\n".join([f'<td class="desc">{escape(str(d))}</td>' for d in desc.split("|")])}
|
|
1237
1249
|
</tr>
|
|
1238
1250
|
''')
|
|
1239
1251
|
|
|
@@ -1417,7 +1429,7 @@ def main():
|
|
|
1417
1429
|
parser.add_argument('-n', '--noping', action="store_true", help='No ping check')
|
|
1418
1430
|
parser.add_argument('-s', '--summary', action="store_true", help='Print scan summary information')
|
|
1419
1431
|
parser.add_argument('-b', '--bits', type=int, default=16, help='VLAN bits for timeout summary (default: 16)')
|
|
1420
|
-
|
|
1432
|
+
parser.add_argument('-d', '--desc_titles', type=str, nargs='*', help='List of custom description titles for hosts (optional)')
|
|
1421
1433
|
# Email related arguments
|
|
1422
1434
|
email_group = parser.add_argument_group('Email Options')
|
|
1423
1435
|
email_group.add_argument('--email-to', help='Comma-separated list of email recipients')
|
|
@@ -1475,7 +1487,17 @@ def main():
|
|
|
1475
1487
|
|
|
1476
1488
|
# Generate report
|
|
1477
1489
|
results.sort(key=lambda x: (x[0], x[2]))
|
|
1478
|
-
generate_html_report(
|
|
1490
|
+
generate_html_report(
|
|
1491
|
+
results,
|
|
1492
|
+
args.output,
|
|
1493
|
+
time.localtime(start_time),
|
|
1494
|
+
args.timeout,
|
|
1495
|
+
args.parallelism,
|
|
1496
|
+
args.noping,
|
|
1497
|
+
stats,
|
|
1498
|
+
args.input_file,
|
|
1499
|
+
args.desc_titles,
|
|
1500
|
+
)
|
|
1479
1501
|
|
|
1480
1502
|
# Print summary
|
|
1481
1503
|
# Display detailed results in table format
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: portune
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Simple Python HTTP Exec Server
|
|
5
5
|
Author: Franck Jouvanceau
|
|
6
6
|
Maintainer: Franck Jouvanceau
|
|
@@ -58,7 +58,7 @@ Multitreaded port scanner
|
|
|
58
58
|
|
|
59
59
|
# features
|
|
60
60
|
|
|
61
|
-
* parallel check of port availability against
|
|
61
|
+
* parallel check of port availability against servers/ports
|
|
62
62
|
* console output result / summary
|
|
63
63
|
* html full report / dns domain summary / vlan timeout summary
|
|
64
64
|
* mail with html summary / report attachment (mailhost relay)
|
|
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
|