1
0
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:
Caleb Stewart 2020-05-08 15:17:36 -04:00
commit 7e1aa8ca28
2 changed files with 10 additions and 1 deletions

View File

@ -2,8 +2,15 @@
from pygments.lexer import RegexLexer, bygroups, include
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):
tokens = {
"root": [
(r"download", Name.Function),

View File

@ -27,8 +27,9 @@ import os
from pwncat import util
from pwncat import downloader, uploader, privesc
from pwncat.lexer import LocalCommandLexer
from pwncat.file import RemoteBinaryPipe
from pwncat.lexer import LocalCommandLexer, PwncatStyle
from colorama import Fore
@ -360,6 +361,7 @@ class PtyHandler:
completer=CommandCompleter(completer_graph),
auto_suggest=AutoSuggestFromHistory(),
lexer=PygmentsLexer(LocalCommandLexer),
style=PwncatStyle,
)
def which(self, name: str, request=True) -> str: