Created
October 5, 2016 19:34
-
-
Save mrphs/1722c853a6a9bc31d3fa34faeddbdeb9 to your computer and use it in GitHub Desktop.
Handy script to extract the obfs4 randomly assigned port
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TOR_LOG=/var/lib/log/tor/log | |
OBFS4_PORT=`while read line; do; if [[ $line =~ .*obfs4.*\'\[::\]:([0-9]+).* ]]; then echo "${BASH_REMATCH[1]}"; fi; done < $TOR_LOG` | |
echo $OBFS4_PORT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment