diff --git a/actions/steal_files_telnet.py b/actions/steal_files_telnet.py index 8687dc0..c649f25 100644 --- a/actions/steal_files_telnet.py +++ b/actions/steal_files_telnet.py @@ -3,7 +3,10 @@ """ import os -import telnetlib +try: + import telnetlib +except ImportError: + import telnetlib3 as telnetlib import logging import time from rich.console import Console diff --git a/actions/telnet_connector.py b/actions/telnet_connector.py index 6832f92..c9556d1 100644 --- a/actions/telnet_connector.py +++ b/actions/telnet_connector.py @@ -5,7 +5,10 @@ import os import pandas as pd -import telnetlib +try: + import telnetlib +except ImportError: + import telnetlib3 as telnetlib import threading import logging import time diff --git a/orchestrator.py b/orchestrator.py index 8efe0d2..c80b1e6 100644 --- a/orchestrator.py +++ b/orchestrator.py @@ -198,7 +198,7 @@ def execute_standalone_action(self, action, current_data): row[action_key] = "" # Check if the action is already successful and if retries are disabled for successful actions - if 'success' in row[action_key]: + if action_key in row and 'success' in row[action_key]: if not self.shared_data.retry_success_actions: return False else: diff --git a/requirements.txt b/requirements.txt index df2f240..cec963b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,4 +12,6 @@ smbprotocol==1.14.0 pysmb==1.2.10 pymysql==1.1.1 sqlalchemy==2.0.36 -python-nmap==0.7.1 \ No newline at end of file +python-nmap==0.7.1 +legacy-cgi +telnetlib3 diff --git a/utils.py b/utils.py index 621839a..2bb98f4 100644 --- a/utils.py +++ b/utils.py @@ -7,7 +7,10 @@ import csv import zipfile import uuid -import cgi +try: + import legacy_cgi as cgi +except ImportError: + import cgi import io import importlib import logging