From e1b7e355fd156325e4782763bab396c546e50048 Mon Sep 17 00:00:00 2001 From: Lincoln Kermit <104798220+LincolnKermit@users.noreply.github.com> Date: Thu, 25 Jan 2024 20:47:03 +0100 Subject: [PATCH 1/3] Fixed host error, for VPN user # Error message if error on import # Use the host 0.0.0.0 for user with VPN/NAT, also use the port 1337 to be more accurate. # Check if user API_key or Pass is correct, min(8) --- gptsploit.py | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/gptsploit.py b/gptsploit.py index e5b7f0b..09a321f 100644 --- a/gptsploit.py +++ b/gptsploit.py @@ -1,14 +1,18 @@ -from flask import Flask, request, jsonify -import subprocess -import datetime -import os -import threading -import time -from pyfiglet import Figlet -from termcolor import colored -import sys +# Created by github.com/Genepix +# Last Modification by github.com/LincolnKermit + +try: + from flask import Flask, request, jsonify + import subprocess, datetime, os, threading, time, sys + from pyfiglet import Figlet + from termcolor import colored +except ImportError as e: + print("Erreur lors de l'importation d'une librairie : ", e) + exit(1) + # Error message if error + +API_KEY = os.environ.get("API_KEY", "VOTRE_MOT_DE_PASSE") -API_KEY = os.environ.get("API_KEY", "g3n3p1x0nt1kt0k") app = Flask(__name__) @@ -21,7 +25,12 @@ def print_with_delay(message, delay=0.03): sys.stdout.write(char) sys.stdout.flush() time.sleep(delay) - print() # New line after message + print() + +if len(API_KEY) < 8: + print_with_delay(colored("API_KEY ou MOT DE PASSE INCORRECT", 'red')) + exit(1) +# Check if user API_key or Pass is correct, min(8) def execute_command_in_thread(command, log_file_path): try: @@ -63,4 +72,5 @@ def execute_command(): if __name__ == '__main__': print_banner('GPTSPLOIT') print("By Genepix\n\n") - app.run(debug=True, host='0.0.0.0') + app.run(debug=True, host='0.0.0.0', port=1337) + # Use the host 0.0.0.0 for user with VPN/NAT, also use the port 1337 to be more accurate. From e403dc83f04fcf9bb3baa5d0a540894d13d15771 Mon Sep 17 00:00:00 2001 From: Lincoln Kermit <104798220+LincolnKermit@users.noreply.github.com> Date: Thu, 25 Jan 2024 21:15:53 +0100 Subject: [PATCH 2/3] Update gptsploit.py --- gptsploit.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/gptsploit.py b/gptsploit.py index 09a321f..b0c22e6 100644 --- a/gptsploit.py +++ b/gptsploit.py @@ -9,18 +9,16 @@ except ImportError as e: print("Erreur lors de l'importation d'une librairie : ", e) exit(1) - # Error message if error - + API_KEY = os.environ.get("API_KEY", "VOTRE_MOT_DE_PASSE") - app = Flask(__name__) def print_banner(title): f = Figlet(font='slant') print_with_delay(colored(f.renderText(title), 'green')) -def print_with_delay(message, delay=0.03): +def print_with_delay(message, delay=0.003): for char in message: sys.stdout.write(char) sys.stdout.flush() @@ -30,7 +28,7 @@ def print_with_delay(message, delay=0.03): if len(API_KEY) < 8: print_with_delay(colored("API_KEY ou MOT DE PASSE INCORRECT", 'red')) exit(1) -# Check if user API_key or Pass is correct, min(8) + def execute_command_in_thread(command, log_file_path): try: @@ -73,4 +71,3 @@ def execute_command(): print_banner('GPTSPLOIT') print("By Genepix\n\n") app.run(debug=True, host='0.0.0.0', port=1337) - # Use the host 0.0.0.0 for user with VPN/NAT, also use the port 1337 to be more accurate. From 7b9fc59f6a79eb22c3f45150c17ddf1d64b0dd1b Mon Sep 17 00:00:00 2001 From: Lincoln Kermit <104798220+LincolnKermit@users.noreply.github.com> Date: Thu, 25 Jan 2024 21:20:27 +0100 Subject: [PATCH 3/3] Update gptsploit.py --- gptsploit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gptsploit.py b/gptsploit.py index b0c22e6..8b3875a 100644 --- a/gptsploit.py +++ b/gptsploit.py @@ -70,4 +70,5 @@ def execute_command(): if __name__ == '__main__': print_banner('GPTSPLOIT') print("By Genepix\n\n") - app.run(debug=True, host='0.0.0.0', port=1337) + app.run(debug=False, host='0.0.0.0', port=1337) + # To not reload the page