-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcurlboss.sh
More file actions
43 lines (36 loc) · 4.82 KB
/
curlboss.sh
File metadata and controls
43 lines (36 loc) · 4.82 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# curlboss.sh
# by Chris Holt 2016-03-31
# Purpose:
# Use cURL to test for jBoss server vulnerabilities on all ports specified in the list. Issues a GET request to each one in sequence. Shows line numbers for stop/restart purposes. Drops the curl body into /dev/null since that's not interesting, but keeps any non '000' HTTP response code headers in a 4-tuple (code,url,content-type,filesize).
# Usage:
## $> ./curlboss.sh input_list line_num
# line_num is an optional parameter
line=0
list=$1
line=$2
portlist=( 80 180 280 380 480 580 680 780 880 980 1080 1180 1280 1380 1480 1580 1680 1780 1880 1980 2080 2180 2280 2380 2480 2580 2680 2780 2880 2980 3080 3180 3280 3380 3480 3580 3680 3780 3880 3980 4080 4180 4280 4380 4480 4580 4680 4780 4880 4980 5080 5180 5280 5380 5480 5580 5680 5780 5880 5980 6080 6180 6280 6380 6480 6580 6680 6780 6880 6980 7080 7180 7280 7380 7480 7580 7680 7780 7880 7980 8080 8180 8280 8380 8480 8580 8680 8780 8880 8980 9080 9180 9280 9380 9480 9580 9680 9780 9880 9980 10080 10180 10280 10380 10480 10580 10680 10780 10880 10980 11080 11180 11280 11380 11480 11580 11680 11780 11880 11980 12080 12180 12280 12380 12480 12580 12680 12780 12880 12980 13080 13180 13280 13380 13480 13580 13680 13780 13880 13980 14080 14180 14280 14380 14480 14580 14680 14780 14880 14980 15080 15180 15280 15380 15480 15580 15680 15780 15880 15980 16080 16180 16280 16380 16480 16580 16680 16780 16880 16980 17080 17180 17280 17380 17480 17580 17680 17780 17880 17980 18080 18180 18280 18380 18480 18580 18680 18780 18880 18980 19080 19180 19280 19380 19480 19580 19680 19780 19880 19980 20080 20180 20280 20380 20480 20580 20680 20780 20880 20980 21080 21180 21280 21380 21480 21580 21680 21780 21880 21980 22080 22180 22280 22380 22480 22580 22680 22780 22880 22980 23080 23180 23280 23380 23480 23580 23680 23780 23880 23980 24080 24180 24280 24380 24480 24580 24680 24780 24880 24980 25080 25180 25280 25380 25480 25580 25680 25780 25880 25980 26080 26180 26280 26380 26480 26580 26680 26780 26880 26980 27080 27180 27280 27380 27480 27580 27680 27780 27880 27980 28080 28180 28280 28380 28480 28580 28680 28780 28880 28980 29080 29180 29280 29380 29480 29580 29680 29780 29880 29980 30080 30180 30280 30380 30480 30580 30680 30780 30880 30980 31080 31180 31280 31380 31480 31580 31680 31780 31880 31980 32080 32180 32280 32380 32480 32580 32680 32780 32880 32980 33080 33180 33280 33380 33480 33580 33680 33780 33880 33980 34080 34180 34280 34380 34480 34580 34680 34780 34880 34980 35080 35180 35280 35380 35480 35580 35680 35780 35880 35980 36080 36180 36280 36380 36480 36580 36680 36780 36880 36980 37080 37180 37280 37380 37480 37580 37680 37780 37880 37980 38080 38180 38280 38380 38480 38580 38680 38780 38880 38980 39080 39180 39280 39380 39480 39580 39680 39780 39880 39980 40080 40180 40280 40380 40480 40580 40680 40780 40880 40980 41080 41180 41280 41380 41480 41580 41680 41780 41880 41980 42080 42180 42280 42380 42480 42580 42680 42780 42880 42980 43080 43180 43280 43380 43480 43580 43680 43780 43880 43980 44080 44180 44280 44380 44480 44580 44680 44780 44880 44980 45080 45180 45280 45380 45480 45580 45680 45780 45880 45980 46080 46180 46280 46380 46480 46580 46680 46780 46880 46980 47080 47180 47280 47380 47480 47580 47680 47780 47880 47980 48080 48180 48280 48380 48480 48580 48680 48780 48880 48980 49080 49180 49280 49380 49480 49580 49680 49780 49880 49980 50080 50180 50280 50380 50480 50580 50680 50780 50880 50980 51080 51180 51280 51380 51480 51580 51680 51780 51880 51980 52080 52180 52280 52380 52480 52580 52680 52780 52880 52980 53080 53180 53280 53380 53480 53580 53680 53780 53880 53980 54080 54180 54280 54380 54480 54580 54680 54780 54880 54980 55080 55180 55280 55380 55480 55580 55680 55780 55880 55980 56080 56180 56280 56380 56480 56580 56680 56780 56880 56980 57080 57180 57280 57380 57480 57580 57680 57780 57880 57980 58080 58180 58280 58380 58480 58580 58680 58780 58880 58980 59080 59180 59280 59380 59480 59580 59680 59780 59880 59980 60080 60180 60280 60380 60480 60580 60680 60780 60880 60980 61080 61180 61280 61380 61480 61580 61680 61780 61880 61980 62080 62180 62280 62380 62480 62580 62680 62780 62880 62980 63080 63180 63280 63380 63480 63580 63680 63780 63880 63980 64080 64180 64280 64380 64480 64580 64680 64780 64880 64980 65080 65180 65280 65380 65480 )
echo "Starting from line $line"
{
for ((i=$line;i--;))
do
read
done
while read ip
do
echo "Current line: $line"
for port in "${portlist[@]}"
do
##port=1
##port=$3
##while [ $port -lt 65536 ] ;do
echo "Port Test: $port"
url="http://$ip:$port/invoker/JMXInvokerServlet"
## ssl="https://$ip:$port/invoker/JMXInvokerServlet"
curl -sL -w "%{http_code} %{url_effective} %{content_type} %{size_download}\\n" $url -o /dev/null | sed '/^000/ d' | tee -a http.log
## port=$(($port+1));
done
line=$((line +1));
done
} < $list
echo "Completed Task."