Skip to content

Instantly share code, notes, and snippets.

@e-orz
e-orz / bluetooth-connect-a2dp.sh
Created May 26, 2019 14:54
connect to mdr-1000x bluetooth audio headphone (A2DP profile, set default, move current streams to the new one)
bluetooth-connect-a2dp.sh
#!/usr/bin/expect -f
set timeout 2
set prompt "#"
spawn "bluetoothctl"
set address [lindex $argv 0]
expect "Agent registered"
expect -re $prompt
send "connect $address\r"
expect {
@e-orz
e-orz / VIPAccess.exp
Created April 23, 2018 20:13 — forked from p120ph37/VIPAccess.exp
Command-line implementation of Symantec's "VIP Access" token application on OSX. This will read from the same secret key and produce the same time-based one-time-passwords as the GUI application, but with output that can be captured and used in scripts. This can be useful for things like automating two-factor AnyConnect VPN logins through openco…
#!/usr/bin/expect -f
#
# VIPAccess.exp
#
# Command-line emulation of Symantec's VIP Access software token.
# Usage:
# ./VIPAccess.exp [v]
# If the "v" argument (or any argument) is specified, verbose output
# will be produced on stderr. The OTP value will be output on stdout.
#