2019-09-07 00:15:32 +00:00
|
|
|
# shcrt
|
|
|
|
|
|
|
|
SecureCRT session browser for GNU/Linux and Windows Subsystem for Linux.
|
|
|
|
|
2019-09-09 00:06:40 +00:00
|
|
|
It should also work on macOS with some changes but YMMV.
|
|
|
|
|
2019-09-07 00:15:32 +00:00
|
|
|
At early stages, not heavily tested. Alpha quality.
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
- Browse SecureCRT sessions
|
|
|
|
- Search through them
|
|
|
|
- Parse SSH sessions and generate a OpenSSH command line
|
|
|
|
- Password is automatically copied to clipboard if found
|
|
|
|
|
2019-09-09 00:06:40 +00:00
|
|
|
## How to use
|
|
|
|
|
2019-12-02 00:08:31 +00:00
|
|
|
### Arch Linux (including Arch on WSL)
|
|
|
|
|
|
|
|
AUR package: https://aur.archlinux.org/packages/shcrt-git/
|
|
|
|
|
|
|
|
### Other distributions (including WSL)
|
|
|
|
|
2019-09-09 00:06:40 +00:00
|
|
|
It should work both natively on GNU/Linux and on Windows under WSL, provided you have
|
|
|
|
`bash`, `python3`, `pycrypto` for Python3 and your favorite dialog tool
|
|
|
|
((c)`dialog` works everywhere).
|
|
|
|
|
|
|
|
- Clone it with `--recursive`
|
2019-09-09 15:05:05 +00:00
|
|
|
```bash
|
2019-09-09 00:06:40 +00:00
|
|
|
git clone --recursive https://github.com/Depau/shcrt.git
|
|
|
|
```
|
|
|
|
- If you forgot about it...
|
2019-09-09 15:05:05 +00:00
|
|
|
```bash
|
2019-09-09 00:06:40 +00:00
|
|
|
git submodule init
|
|
|
|
git submodule update
|
|
|
|
```
|
|
|
|
- Simply run the script:
|
2019-09-09 15:05:05 +00:00
|
|
|
```bash
|
2019-09-09 00:06:40 +00:00
|
|
|
./shcrt
|
|
|
|
```
|
2019-09-09 15:05:05 +00:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
Configuration can be placed in `~/.shcrtrc`. It must be a sourceable by bash, use bash syntax.
|
|
|
|
|
|
|
|
### Custom GUI mode
|
|
|
|
```bash
|
|
|
|
export supermode=YOUR_CHOICE
|
|
|
|
```
|
|
|
|
|
|
|
|
It must be set to one of the GUI back-ends supported by [EasyBashGUI](https://github.com/BashGui/easybashgui/).
|
|
|
|
|
|
|
|
At the time of writing, supported modes are:
|
|
|
|
|
|
|
|
- `dialog`: ncurses terminal based GUI (good for WSL)
|
|
|
|
- `whiptail`: another terminal based GUI (good for WSL)
|
|
|
|
- `none`: uses internal shell-based EBG GUI, which uses `echo` and `read`
|
2019-09-09 23:25:34 +00:00
|
|
|
- `zenity`: GTK-based GUI for GNOME-base desktops, with a Windows port (see below)
|
|
|
|
- `yad`, `gtkdialog`, `xdialog`: other GTK-based GUIs for GNOME-based desktops
|
2019-09-09 15:05:05 +00:00
|
|
|
- `kdialog`: Qt5-based GUI for KDE or Qt-based desktops
|
|
|
|
|
2019-09-09 23:25:34 +00:00
|
|
|
Needless to say, unless you're using `none`, the desired GUI back-end needs to be installed.
|
2019-09-09 15:05:05 +00:00
|
|
|
|
2019-09-09 23:25:34 +00:00
|
|
|
If you're using WSL and you don't want to use a terminal-based GUI, you need an X11 server such as [VcXsrv](https://sourceforge.net/projects/vcxsrv/).
|
|
|
|
Otherwise you can use Zenity for Windows.
|
2019-09-09 15:05:05 +00:00
|
|
|
|
2019-09-09 23:25:34 +00:00
|
|
|
#### Zenity on Windows
|
|
|
|
|
|
|
|
The script includes an experimental wrapper for [native Windows Zenity](https://github.com/maravento/winzenity) on WSL.
|
|
|
|
|
|
|
|
To make it work, you need to:
|
|
|
|
- Download WinZenity: https://github.com/maravento/winzenity
|
|
|
|
- Place it somewhere in your Windows drive (i.e. `C:\Program Files\zenity.exe`)
|
|
|
|
- Add this line to your `~/.shcrtrc`:
|
|
|
|
```bash
|
|
|
|
alias zenity.exe="'/mnt/c/path/to/your/zenity.exe'"
|
|
|
|
# for example
|
|
|
|
alias zenity.exe="'/mnt/c/Program Files/zenity.exe'"
|
|
|
|
```
|
|
|
|
- Notice how you need to put double quotes to take into account for the spaces in the file path.
|
|
|
|
|
2019-09-09 15:05:05 +00:00
|
|
|
### Emojis
|
|
|
|
```bash
|
2019-09-09 23:25:34 +00:00
|
|
|
export emojis=YOUR_CHOICE
|
2019-09-09 15:05:05 +00:00
|
|
|
```
|
|
|
|
|
2019-09-09 23:25:34 +00:00
|
|
|
Force enable/disable emojis. Emojis are enabled by default on GNU/Linux, and disabled on WSL.
|
|
|
|
If you're using a custom terminal that supports emojis you can force-enable them on Windows too.
|
|
|
|
|
2019-09-09 15:05:05 +00:00
|
|
|
- `auto`: always display emojis on GNU/Linux, disabled on WSL because of crappy terminal
|
|
|
|
- `yes`, `no`: force enable/disable
|
2019-09-09 00:06:40 +00:00
|
|
|
|
2019-09-09 15:17:19 +00:00
|
|
|
### Custom SecureCRT config path
|
|
|
|
```bash
|
|
|
|
export crtconfig="/path/to/your/Config"
|
|
|
|
```
|
|
|
|
|
|
|
|
Overrides default SecureCRT config paths:
|
|
|
|
- GNU/Linux: `~/.vandyke/SecureCRT/Config`
|
|
|
|
- Windows: `%APPDATA%/VanDyke/Config` (⇒ usually `/mnt/c/Users/your.user/AppData/VanDyke/Config`)
|
|
|
|
|
2019-09-09 00:06:40 +00:00
|
|
|
## Bugs
|
|
|
|
|
|
|
|
I expect it to be full of bugs; so should you.
|
|
|
|
|
|
|
|
Please report any bugs you find on GitHub :)
|