From 78c1d5b36468bbd9b594be315ce9058631c0cd5a Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Mon, 2 Jan 2012 20:12:46 +0100 Subject: [PATCH] some new packet from congress stuff --- tools/mesh/dbg.pl | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tools/mesh/dbg.pl b/tools/mesh/dbg.pl index 323a651..65a64bf 100755 --- a/tools/mesh/dbg.pl +++ b/tools/mesh/dbg.pl @@ -49,8 +49,8 @@ if($cmd =~ /^r/){ }; while ($read =~ s/\\1(.*?)\\0//){ my $str=$1; - my $cs=substr($str,0,30); - my $crc=unpack("n",substr($str,30,2)); + my $cs=substr($str,0,length($str)-2); + my $crc=unpack("n",substr($str,length($str)-2,2)); my $crc2= crcccitt($cs),"\n"; if($fmt eq "m"){ my $i=substr($str,0,1); @@ -129,6 +129,24 @@ if($cmd =~ /^r/){ $par.=pack("N",0); $par.=pack("N",0); $par.=pack("N",0); + }elsif($scmd eq "rrr"){ + $par.="G"; + $par.=chr(shift); #gen +# $par.=pack("N",scalar(time)+300); + $par.=pack("N",1325250000); + + $par.="r0ket mass p0ng"; + + $par.=pack("C",0); + $par.=pack("C",0); + $par.=pack("C",0); + $par.=pack("C",0); + $par.=pack("C",0); + $par.=pack("C",0); + $par.=pack("C",0); + $par.=pack("C",0); + $par.=pack("C",0); + print length($par),"\n"; }elsif($scmd eq "a"){ $par.="A"; $par.=chr(shift); #gen