All Projects → ms2008 → Xshell-OTP

ms2008 / Xshell-OTP

Licence: MIT License
Xshell Semi-Automatic complete One-time Password login

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Xshell-OTP

extract otp secret keys
Extract two-factor authentication (2FA, TFA) secret keys from export QR codes of "Google Authenticator" app
Stars: ✭ 217 (+648.28%)
Mutual labels:  otp, google-authenticator
rx-otp
HMAC-based (HOTP) and Time-based (TOTP) One-Time Password manager. Works with Google Authenticator for Two-Factor Authentication.
Stars: ✭ 79 (+172.41%)
Mutual labels:  otp, google-authenticator
Privacyidea
🔐 multi factor authentication system (2FA, MFA, OTP Server)
Stars: ✭ 1,027 (+3441.38%)
Mutual labels:  otp, mfa
twothy
Two factor authenticator for CLI
Stars: ✭ 39 (+34.48%)
Mutual labels:  google-authenticator, mfa
SimpleTOTP
A highly configurable yet simple to use TOTP based two-factor authentication processing module for SimpleSAMLphp.
Stars: ✭ 16 (-44.83%)
Mutual labels:  google-authenticator, mfa
php-totp
HOTP and TOTP token generation
Stars: ✭ 33 (+13.79%)
Mutual labels:  otp, google-authenticator
nitrokey-storage-firmware
Firmware for the Nitrokey Storage device
Stars: ✭ 53 (+82.76%)
Mutual labels:  otp
ticker-phoenix
Elixir Phoenix Stock Quotes API (IEX Trading)
Stars: ✭ 15 (-48.28%)
Mutual labels:  otp
elixir-fire-brigade-workshop
Workshop "Join the Elixir Fire Brigade - Level-up Your Elixir Debugging Skills" (ElixirConf US 2017)
Stars: ✭ 14 (-51.72%)
Mutual labels:  otp
rabbit
Build Elixir applications with RabbitMQ
Stars: ✭ 36 (+24.14%)
Mutual labels:  otp
macos-receiver
A MacOS TabBar (StatusBar) application that securely receives one-time passwords (OTPs) that you tapped in Raivo for iOS.
Stars: ✭ 44 (+51.72%)
Mutual labels:  otp
nxshell
An easy to use new terminal.
Stars: ✭ 440 (+1417.24%)
Mutual labels:  xshell
cotp
Trustworthy, encrypted, command-line TOTP/HOTP authenticator app with import functionality.
Stars: ✭ 45 (+55.17%)
Mutual labels:  google-authenticator
shibboleth-mfa-u2f-auth
U2F multifactor authentication plugin for Shibboleth IdPv3
Stars: ✭ 25 (-13.79%)
Mutual labels:  mfa
rustotpony
🐴 RusTOTPony — CLI manager of one-time password generators aka Google Authenticator
Stars: ✭ 18 (-37.93%)
Mutual labels:  otp
yubico-rs
Yubikey client API library, Challenge-Response & Configuration
Stars: ✭ 39 (+34.48%)
Mutual labels:  otp
google-auth-csharp
Google Authenticator TOTP C#
Stars: ✭ 30 (+3.45%)
Mutual labels:  google-authenticator
ODYM
Open Dynamic Material Systems Model
Stars: ✭ 36 (+24.14%)
Mutual labels:  mfa
GoWebSSH
功能强大,Go 实现的一个WebSSH,支持文件上传下载
Stars: ✭ 112 (+286.21%)
Mutual labels:  xshell
a12n-server
A ready-to-launch User and Authentication system for those that don't want to build it
Stars: ✭ 324 (+1017.24%)
Mutual labels:  mfa

Xshell-OTP

Xshell 自动登录 One-time Password 跳板机

USAGE

使用

下载 jumper.js 后拖到最后,修改 Main 函数中的配置:

function Main()
{
    // Calculate OTP token
    var totpObj = new TOTP();
    var epoch = Math.floor(new Date().getTime() / 1000 % 30);
    var elapsed = 30 - epoch

    // Adjust the sliding window
    if (elapsed <= 3 ) {
        xsh.Dialog.MsgBox("Hold on, and wait " + elapsed + " seconds!");
        xsh.Session.Sleep(elapsed * 1000 + 100);
    }

    // Calculate OTP token
    // REVISED 修改为你自己的 Google Authenticator Secret
    var otp = totpObj.getOTP("REVISED");

    // Copy the token to clipboard
    xsh.Screen.Synchronous = true;
    xsh.Screen.Send("cmd /c echo " + otp + "| clip");
    xsh.Screen.Send(String.fromCharCode(13));
    xsh.Screen.Clear();

    // Open Session
    // xsh.Session.Open("ssh://username:password@host:port")
    // 修改为你自己的 xsh 文件路径
    xsh.Session.Open("C:\Users\REVISED\Documents\NetSarang\Xshell\Sessions\jump.xsh");

    // Close the local shell
    // xsh.Session.Sleep(1000);
    xsh.Screen.Send("exit");
    xsh.Screen.Send(String.fromCharCode(13));
}

原理

使用 Google Authenticator MFA 验证机制登录跳板机,可以通过其导出的 secret 在本地计算出当前的 token。Xshell 支持运行 javascript 脚本,所以这个 token 可以直接在 Xshell 端计算完成。但是 Xshell 在处理 MFA 验证机制时,是直接弹出对话框,并不支持传统的 terminal 输入,Xshell 也并没有提供自动完成的 API,所以只能手动拷贝输入。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].