mirror of
https://github.com/calebstewart/pwncat.git
synced 2024-11-27 19:04:15 +01:00
Fixed merge conflict in imports for pty.py
This commit is contained in:
commit
7e1aa8ca28
@ -2,8 +2,15 @@
|
|||||||
from pygments.lexer import RegexLexer, bygroups, include
|
from pygments.lexer import RegexLexer, bygroups, include
|
||||||
from pygments.token import *
|
from pygments.token import *
|
||||||
|
|
||||||
|
from pygments.style import Style
|
||||||
|
from prompt_toolkit.styles.pygments import style_from_pygments_cls
|
||||||
|
from pygments.styles import get_style_by_name
|
||||||
|
|
||||||
|
PwncatStyle = style_from_pygments_cls(get_style_by_name("monokai"))
|
||||||
|
|
||||||
|
|
||||||
class LocalCommandLexer(RegexLexer):
|
class LocalCommandLexer(RegexLexer):
|
||||||
|
|
||||||
tokens = {
|
tokens = {
|
||||||
"root": [
|
"root": [
|
||||||
(r"download", Name.Function),
|
(r"download", Name.Function),
|
||||||
|
@ -27,8 +27,9 @@ import os
|
|||||||
|
|
||||||
from pwncat import util
|
from pwncat import util
|
||||||
from pwncat import downloader, uploader, privesc
|
from pwncat import downloader, uploader, privesc
|
||||||
from pwncat.lexer import LocalCommandLexer
|
|
||||||
from pwncat.file import RemoteBinaryPipe
|
from pwncat.file import RemoteBinaryPipe
|
||||||
|
from pwncat.lexer import LocalCommandLexer, PwncatStyle
|
||||||
|
|
||||||
from colorama import Fore
|
from colorama import Fore
|
||||||
|
|
||||||
|
|
||||||
@ -360,6 +361,7 @@ class PtyHandler:
|
|||||||
completer=CommandCompleter(completer_graph),
|
completer=CommandCompleter(completer_graph),
|
||||||
auto_suggest=AutoSuggestFromHistory(),
|
auto_suggest=AutoSuggestFromHistory(),
|
||||||
lexer=PygmentsLexer(LocalCommandLexer),
|
lexer=PygmentsLexer(LocalCommandLexer),
|
||||||
|
style=PwncatStyle,
|
||||||
)
|
)
|
||||||
|
|
||||||
def which(self, name: str, request=True) -> str:
|
def which(self, name: str, request=True) -> str:
|
||||||
|
Loading…
Reference in New Issue
Block a user