Skip to content
This repository has been archived by the owner on Oct 29, 2022. It is now read-only.

Quit Xshell

awesomelewis2007 edited this page Jun 11, 2021 · 1 revision

How to Quit Xshell

There are 2 safe ways to close Xshell

Control C method

Windows and linux

To exit Xshell on windows and linux press the following keybindings

Ctrl+C

Xshell will give a prompt like this:

[!] Keyboard interrupt press ctrl+c again to exit

This is made possible using the KeyboardInterupt exaptation

except KeyboardInterrupt:
    log.info("^c was pressed sending warning")
    print(color('\n[!] Keyboard interrupt press ctrl+c again to exit', fore="yellow"))
    print(color('┌──[', fore='blue')+color(xshell_text, fore='green')+color(']──[', fore='blue')+cwd+color(']', fore='blue'))
    try:
        user_input = input(color('└─>', fore='blue'))
    except KeyboardInterrupt:
        print("\n")
        log.info("^c was pressed closing Xshell")
        log.info("Killing System")
        exit()

Xshell will log the event's in system\temp\logs\System_log.log

[11-06-2021:21:03:57]  [main.py:190] [ INFO ]  ^c was pressed sending warning
[11-06-2021:21:03:59]  [main.py:197] [ INFO ]  ^c was pressed closing Xshell

Mac OS X

To exit Xshell on windows and linux press the following keybindings

Command+C

Xshell will give a prompt like this:

[!] Keyboard interrupt press ctrl+c again to exit

This is made possible using the KeyboardInterupt exaptation

except KeyboardInterrupt:
    log.info("^c was pressed sending warning")
    print(color('\n[!] Keyboard interrupt press ctrl+c again to exit', fore="yellow"))
    print(color('┌──[', fore='blue')+color(xshell_text, fore='green')+color(']──[', fore='blue')+cwd+color(']', fore='blue'))
    try:
        user_input = input(color('└─>', fore='blue'))
    except KeyboardInterrupt:
        print("\n")
        log.info("^c was pressed closing Xshell")
        log.info("Killing System")
        exit()

Xshell will log the event's in system\temp\logs\System_log.log

[11-06-2021:21:03:57]  [main.py:190] [ INFO ]  ^c was pressed sending warning
[11-06-2021:21:03:59]  [main.py:197] [ INFO ]  ^c was pressed closing Xshell

Command Method

Exit Command

To exit Xshell using the Exit Command run the command exit to quit Xshell

This will instantly quit Xshell and send a log to system\temp\logs\System_log.log

[11-06-2021:21:19:43]  [main.py:201] [ INFO ]  Running Command:exit
[11-06-2021:21:19:43]  [main.py:211] [ INFO ]  Killing System

This is done using the exit if statement in main.py

if "exit" in user_input:
    trim_user_input = user_input[:4]
    if trim_user_input == "exit":
        log.info("Killing System")
        exit()

Quit Command

To exit Xshell using the Quit Command run the command quit to quit Xshell

This will instantly quit Xshell and send a log to system\temp\logs\System_log.log

[11-06-2021:21:19:43]  [main.py:201] [ INFO ]  Running Command:quit
[11-06-2021:21:19:43]  [main.py:211] [ INFO ]  Killing System

This is done using the exit if statement in main.py

if "quit" in user_input:
    trim_user_input = user_input[:4]
    if trim_user_input == "quit":
        log.info("Killing System")
        exit()

Xshell Wiki

Welcome to the Xshell Wiki


General

Installing Xshell

Commands List

How to Close Xshell

Error Codes

Addon Support

Clone this wiki locally