Displaying 1 result from an estimated 1 matches for "a_body".
Did you mean:
x_body
2004 Sep 22
2
Grandstream bin cfg.txt generator
...l be written to
my $h_crlf = '0d0a'; # hexadecimal crlf
# convert some things to binary
my $b_mac = pack("H12", $h_mac); # convert 12 hex numbers to bin
my $b_crlf = pack("H4", $h_crlf); # convert 4 hex numbers to bin
# open configfile and make body in ascii (a_body)
my $a_body;
open F,$f_in;
while (<F>) {
chomp; # remove trailing lf
s/\#.*$//g; # remove comments
s/\s//g; # remove all whitespace
$a_body .= $_.'&' if length > 0;
}
close F;
$a_body .='gnkey=0b82';
# add an extra byte to make the body even (bytewise)
$a_b...