forked from fnmsd/awvs_script_decode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsybase_ping.script
More file actions
26 lines (24 loc) · 1.75 KB
/
Copy pathsybase_ping.script
File metadata and controls
26 lines (24 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include string_helpers.inc;
#include reporting_helpers.inc;
if (IsPortOpen(5000)) {
var packet = strFromRawHex("0200020000000200000000000000000000000000000000000000000000000000000000000000004e65737375732d546573742d557365720000000000000000000000000000105858585858585858585858585858585858585858000000000000000000001430303030303061300000000000000000000000000000000000201881b82c080301060a090101000000000000000000737175656c646120312e30000000000000000000000000000000000000000b0000000000000000000000000000000000000000000000000000000000000000145858585858585858585858585858585858585858000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040200004d5344424c49420000000706000000000d110000000000000000000000000000000000000000000000000201004700000200000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303000000003000000");
var socket = new TSocket('tcp');
socket.Host = ScanHost;
socket.Port = 5000;
socket.Timeout = 4;
socket.Connect();
if (socket.IsConnected)
{
socket.Send(packet);
var data = socket.ReceiveBytes(1024);
if (data.length > 0)
{
trace(data.toHexString());
if (data.match(/Login failed/))
{
trace('We have sybase server here');
KBase("Sybase server running", "A Sybase server is running on TCP port 5000.");
}
}
} trace("Can not conect");
}