Fix pyreadline on Windows

temp
m0rv4i 2019-04-30 12:12:20 +01:00
parent 0aaa5ce53c
commit 8c85abda2b
5 changed files with 16 additions and 7 deletions

View File

@ -1,11 +1,14 @@
#!/usr/bin/python
import zlib, argparse, os, re, datetime, time, base64, string, random, codecs, glob, readline, pyreadline.rlmain
import zlib, argparse, os, re, datetime, time, base64, string, random, codecs, glob, readline
from Config import HTTPResponses, POSHDIR, PayloadsDirectory
from Utils import randomuri
from TabComplete import tabCompleter
from Help import COMMANDS
if os.name == 'nt':
import pyreadline.rlmain
def default_response():
return (random.choice(HTTPResponses)).replace("#RANDOMDATA#",randomuri())

View File

@ -1,6 +1,6 @@
#!/usr/bin/python
import sys, re, os, time, subprocess, traceback, signal, argparse, readline, pyreadline.rlmain
import sys, re, os, time, subprocess, traceback, signal, argparse, readline
from sqlite3 import Error
from Help import logopic, PRECOMMANDS, UXCOMMANDS, SHARPCOMMANDS, COMMANDS, pre_help
from DB import update_item, get_c2server_all, get_implants_all, get_tasks, get_implantdetails, new_urldetails
@ -18,6 +18,9 @@ from PyHandler import handle_py_command
from SharpHandler import handle_sharp_command
from PSHandler import handle_ps_command
if os.name == 'nt':
import pyreadline.rlmain
def catch_exit(signum, frame):
sys.exit(0)

View File

@ -1,4 +1,4 @@
import base64, re, traceback, os, sys, readline, pyreadline.rlmain
import base64, re, traceback, os, sys, readline
from Alias import ps_alias
from Colours import Colours
from Utils import randomuri, validate_sleep_time
@ -12,6 +12,9 @@ from Payloads import Payloads
from Utils import argp, load_file, gen_key
from TabComplete import tabCompleter
if os.name == 'nt':
import pyreadline.rlmain
def handle_ps_command(command, user, randomuri, startup, createdaisypayload, createproxypayload):
try:
check_module_loaded("Stage2-Core.ps1", randomuri, user)

View File

@ -1,6 +1,9 @@
#!/usr/bin/python
import os, sys, readline, pyreadline.rlmain, glob
import os, sys, readline, glob
if os.name == 'nt':
import pyreadline.rlmain
class tabCompleter(object):
"""

View File

@ -82,6 +82,3 @@ def newTask(path):
now = datetime.datetime.now()
DB.update_implant_lastseen(now.strftime("%m/%d/%Y %H:%M:%S"),RandomURI)
return default_response()
#else:
# return None