8000 Patch pyreadline3 by p0rtL6 · Pull Request #1920 · fortra/impacket · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Patch pyreadline3 #1920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/dcomexec.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ def run(self, addr, silentCommand=False):

class RemoteShell(cmd.Cmd):
def __init__(self, share, quit, executeShellCommand, smbConnection, shell_type, silentCommand=False):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self)
self._share = share
self._output = '\\' + OUTPUT_FILENAME
Expand Down
4 changes: 4 additions & 0 deletions examples/goldenPac.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ def run(self):

class RemoteShell(cmd.Cmd):
def __init__(self, server, port, credentials, tid, fid, TGS, share):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self, False)
self.prompt = '\x08'
self.server = server
Expand Down
4 changes: 4 additions & 0 deletions examples/mimikatz.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@

class MimikatzShell(cmd.Cmd):
def __init__(self, dce):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self)
self.shell = None

Expand Down
4 changes: 4 additions & 0 deletions examples/ntfs-read.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,10 @@ def getINode(self, iNodeNum):

class MiniShell(cmd.Cmd):
def __init__(self, volume):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self)
self.volumePath = volume
self.volume = NTFS(volume)
Expand Down
4 changes: 4 additions & 0 deletions examples/ntlmrelayx.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@

class MiniShell(cmd.Cmd):
def __init__(self, relayConfig, threads, api_address):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self)

self.prompt = 'ntlmrelayx> '
Expand Down
4 changes: 4 additions & 0 deletions examples/psexec.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,10 @@ def run(self):

class RemoteShell(cmd.Cmd):
def __init__(self, server, port, credentials, tid, fid, share, transport):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self, False)
self.prompt = '\x08'
self.server = server
Expand Down
4 changes: 4 additions & 0 deletions examples/raiseChild.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,10 @@ def run(self):

class RemoteShell(cmd.Cmd):
def __init__(self, server, port, credentials, tid, fid, TGS, share):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self, False)
self.prompt = '\x08'
self.server = server
Expand Down
4 changes: 4 additions & 0 deletions examples/smbexec.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ def run(self, remoteName, remoteHost):

class RemoteShell(cmd.Cmd):
def __init__(self, share, rpc, mode, serviceName, shell_type):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self)
self.__share = share
self.__mode = mode
Expand Down
4 changes: 4 additions & 0 deletions examples/wmiexec.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ def run(self, addr, silentCommand=False):

class RemoteShell(cmd.Cmd):
def __init__(self, share, win32Process, smbConnection, shell_type, silentCommand=False):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self)
self.__share = share
self.__output = '\\' + OUTPUT_FILENAME
Expand Down
4 changes: 4 additions & 0 deletions examples/wmiquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@

class WMIQUERY(cmd.Cmd):
def __init__(self, iWbemServices):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self)
self.iWbemServices = iWbemServices
self.prompt = 'WQL> '
Expand Down
4 changes: 4 additions & 0 deletions impacket/examples/ldap_shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class LdapShell(cmd.Cmd):
LDAP_MATCHING_RULE_IN_CHAIN = "1.2.840.113556.1.4.1941"

def __init__(self, tcp_shell, domain_dumper, client):

import readline
readline.backend = 'readline'

cmd.Cmd.__init__(self, stdin=tcp_shell.stdin, stdout=tcp_shell.stdout)

if PY2:
Expand Down
4 changes: 4 additions & 0 deletions impacket/examples/mssqlshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@

class SQLSHELL(cmd.Cmd):
def __init__(self, SQL, show_queries=False, tcpShell=None):

import readline
readline.backend = 'readline'

if tcpShell is not None:
cmd.Cmd.__init__(self, stdin=tcpShell.stdin, stdout=tcpShell.stdout)
sys.stdout = tcpShell.stdout
Expand Down
4 changes: 4 additions & 0 deletions impacket/examples/smbclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ def __init__(self, smbClient, tcpShell=None, outputfile=None):
#If the tcpShell parameter is passed (used in ntlmrelayx),
# all input and output is redirected to a tcp socket
# instead of to stdin / stdout

import readline
readline.backend = 'readline'

if tcpShell is not None:
cmd.Cmd.__init__(self, stdin=tcpShell.stdin, stdout=tcpShell.stdout)
sys.stdout = tcpShell.stdout
Expand Down
0