some new packet from congress stuff

This commit is contained in:
Stefan `Sec` Zehl 2012-01-02 20:12:46 +01:00
parent 0dbfe1fcd2
commit 78c1d5b364
1 changed files with 20 additions and 2 deletions

View File

@ -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