Created
November 21, 2013 23:37
-
-
Save shentonfreude/7591952 to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
# 2013-11-21 Chris Shenton <[email protected]> | |
# Send an Oracle TNS 'ping' to the host and port specified. | |
# If it's Oracle, we should get a response like: | |
# C"7(DESCRIPTION=(TMP=)(VSNNUM=0)(ERR=0)(ALIAS=l_ORCL_001)) | |
# String from base64 encoding packet sent by: | |
# http://www.jammed.com/~jwa/hacks/security/tnscmd/tnscmd | |
tnsstr="AFcAAAEAAAABNgEsAAAIAH//fwgAAAABAB0AOgAAAAAAAAAAAAAAAAAAAAA05gAAAAEAAAAAAAAAAChDT05ORUNUX0RBVEE9KENPTU1BTkQ9cGluZykp" | |
echo $tnsstr | base64 --decode | nc $1 $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment