Skip to content
Permalink
Browse files
add info about alternative invocation
h/t @rubys for the inventive invocation
  • Loading branch information
gstein committed Dec 6, 2019
1 parent 092da2f commit e02ebe4212e2e2ea575db82cc28919e9522d0d4e
Showing 1 changed file with 16 additions and 0 deletions.
@@ -28,6 +28,22 @@ If the local host has the `xclip` program, then the reponse will be automaticall
copied to the clipboard. If that is not present, or does not exit with success,
then the response string can be manually copied, then pasted to the remote.

## Alternative Usage
The script examines the program name used to invoke it (`sys.argv[0]`), and
if that name matches a defined algorithm (`otp-*`), then it will use the command
line arguments to select the sequence and seed.

For example:
```
[local]$ ln -s $somewhere/otp.py otp-md5
[local]$ otp-md5 440 someseed ext
Response: MEAT SAD JERK STUN ARGO ITS
NOTE: copied to clipboard
```

Note that the challenge string from [remote] is directly pasted to the
shell prompt.

## Testing
```
$ ./otp.py --test

0 comments on commit e02ebe4

Please sign in to comment.