Nmap Development mailing list archives

[NSE] opentracker-stats


From: Meshcheryakov Alexey <tank1st99 () gmail com>
Date: Sun, 31 Mar 2013 01:34:23 +0400

Hi. nmap-dev. attached is a basic script, which read and parse stats from
openTracer bittorrent tracker. I use Lua-Simple-XML-parser (
https://github.com/Cluain/Lua-Simple-XML-Parser) for parsing xml.

-- @usage
-- nmap --script opentracker-stats -p 6969 host
--
-- @output
-- 6969/tcp open  acmsoda
-- | opentracker-stats:
-- |     tracker_id : 1865970182
-- |     version :
-- |     $Source: /home/cvsroot/opentracker/opentracker.c,v $: $Revision:
1.233 $
-- |     $Source: /home/cvsroot/opentracker/ot_accesslist.c,v $: $Revision:
1.31 $
-- |     $Source: /home/cvsroot/opentracker/ot_clean.c,v $: $Revision: 1.20
$
-- |     $Source: /home/cvsroot/opentracker/ot_fullscrape.c,v $: $Revision:
1.34 $
-- |     $Source: /home/cvsroot/opentracker/ot_http.c,v $: $Revision: 1.51 $
-- |     $Source: /home/cvsroot/opentracker/ot_iovec.c,v $: $Revision: 1.6 $
-- |     $Source: /home/cvsroot/opentracker/ot_mutex.c,v $: $Revision: 1.23
$
-- |     $Source: /home/cvsroot/opentracker/ot_stats.c,v $: $Revision: 1.65
$
-- |     $Source: /home/cvsroot/opentracker/ot_udp.c,v $: $Revision: 1.24 $
-- |     $Source: /home/cvsroot/opentracker/ot_vector.c,v $: $Revision:
1.19 $
-- |     $Source: /home/cvsroot/opentracker/scan_urlencoded_query.c,v $:
$Revision: 1.34 $
-- |     $Source: /home/cvsroot/opentracker/trackerlogic.c,v $: $Revision:
1.137 $
-- |     $Source: /home/cvsroot/opentracker/ot_livesync.c,v $: $Revision:
1.18 $
-- |
-- |     uptime : 3821842
-- |   torrents
-- |         count_mutex : 31
-- |         count_iterator : 31
-- |   peers
-- |         count : 5888
-- |   seeds
-- |         count : 5826
-- |   completed
-- |         count : 48874
-- |   connections
-- |       tcp
-- |             accept : 33068713
-- |             announce : 14210217
-- |             scrape : 218335
-- |       udp
-- |             overall : 1272243
-- |             connect : 640327
-- |             announce : 413373
-- |             scrape : 218335
-- |       livesync
-- |             count : 0
-- |   debug
-- |       renew
-- |             count interval=00: 38455
-- |             count interval=01: 51425
-- |             count interval=02: 30323
-- |             count interval=03: 23074
-- |             count interval=04: 15962
-- |             count interval=05: 134987
-- |             count interval=06: 57302
-- |             count interval=07: 7787
-- |             count interval=08: 5574
-- |             count interval=09: 5199
-- |             count interval=10: 1180697
-- |             count interval=11: 19076
-- |             count interval=12: 5980
-- |             count interval=13: 78311
-- |             count interval=14: 726257
-- |             count interval=15: 930854
-- |             count interval=16: 884587
-- |             count interval=17: 256456
-- |             count interval=18: 63007
-- |             count interval=19: 44228
-- |             count interval=20: 40126
-- |             count interval=21: 34245
-- |             count interval=22: 155732
-- |             count interval=23: 119517
-- |             count interval=24: 15986
-- |             count interval=25: 14055
-- |             count interval=26: 14861
-- |             count interval=27: 678666
-- |             count interval=28: 1402111
-- |             count interval=29: 1426155
-- |             count interval=30: 1432023
-- |             count interval=31: 1416702
-- |             count interval=32: 1410788
-- |             count interval=33: 753108
-- |             count interval=34: 34753
-- |             count interval=35: 6780
-- |             count interval=36: 4379
-- |             count interval=37: 3504
-- |             count interval=38: 3355
-- |             count interval=39: 2625
-- |             count interval=40: 3469
-- |             count interval=41: 2006
-- |             count interval=42: 2031
-- |             count interval=43: 2410
-- |             count interval=44: 1843
-- |       http_error
-- |             count code=302 Redirect: 0
-- |             count code=400 Parse Error: 2
-- |             count code=400 Invalid Parameter: 534
-- |             count code=400 Invalid Parameter (compact=0): 1
-- |             count code=400 Not Modest: 0
-- |             count code=403 Access Denied: 0
-- |             count code=404 Not found: 120
-- |             count code=500 Internal Server Error: 0
-- |       mutex_stall
-- |_            count : 4


Regards, Alexey Meshcheryakov

Attachment: opentracker-stats.nse
Description:

Attachment: xml.lua
Description:

_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: