()
| 1573 | thread.start() |
| 1574 | |
| 1575 | def start_progress(): |
| 1576 | global results_folder |
| 1577 | """ Starts the progress bar """ |
| 1578 | progress_frame.grid(row=len(labels) + 9, column=0, columnspan=3, |
| 1579 | pady=10) # Show progress bar BELOW the submit button |
| 1580 | progress_bar.grid(row=0, column=0, padx=10, pady=5) |
| 1581 | progress_label.grid(row=1, column=0, padx=10, pady=5) |
| 1582 | progress_bar["value"] = 0 |
| 1583 | |
| 1584 | # Collect selected options from each group |
| 1585 | results = {group.frame.cget("text"): group.get_selected() for group in groups} |
| 1586 | |
| 1587 | # Print checkbox selections |
| 1588 | # print("Selected Values:", results) |
| 1589 | test_modes = results["Tests"] |
| 1590 | file_types = "*" if results["File Types"] == "all" else results["File Types"] |
| 1591 | # print(test_modes) |
| 1592 | # print(file_types) |
| 1593 | |
| 1594 | # Collect entry values while filtering out hint text |
| 1595 | values = [entry.get() if entry.get() not in [field[1] for field in fields] else "" for entry in entries] |
| 1596 | # print("Submitted Values:", values) |
| 1597 | url = [values[0]] |
| 1598 | #print("here") |
| 1599 | ip = values[1] |
| 1600 | #print("here") |
| 1601 | num_files = values[2] |
| 1602 | #print("here") |
| 1603 | max_depth = int(values[3]) if values[3] != '' else 0 |
| 1604 | #print("here") |
| 1605 | output_dir = values[4] |
| 1606 | #print("here") |
| 1607 | local_dir = values[5] |
| 1608 | #print("here") |
| 1609 | #print(url, ip, num_files, max_depth, output_dir, local_dir) |
| 1610 | |
| 1611 | #num_files = 10 if num_files == '' else int(num_files) |
| 1612 | |
| 1613 | |
| 1614 | # TODO MAKE IT RUN THE TEST NOW |
| 1615 | # output_dir = os.path.abspath(args.output) |
| 1616 | os.makedirs(output_dir, exist_ok=True) |
| 1617 | |
| 1618 | if local_dir != '': |
| 1619 | print("IN LOCAL") |
| 1620 | copy_local_files(local_dir, output_dir) |
| 1621 | |
| 1622 | #print("URL NULL: ", url != "", type(url)) |
| 1623 | |
| 1624 | if url != "": |
| 1625 | #print("IN URL") |
| 1626 | sources = [] |
| 1627 | for u in url: |
| 1628 | if re.match(r'\d+\.\d+\.\d+\.\d+', u): # Single IP |
| 1629 | if is_web_server(u): |
| 1630 | sources.append(f"http://{u}/") |
| 1631 | elif re.match(r'^\d+\.\d+\.\d+\.\d+/\d+$', u): # IP range |
| 1632 | sources.extend([f"http://{ip}/" for ip in process_ip_range(u)]) |
nothing calls this directly
no test coverage detected