adding a rpackets
Moderator: Moderators
adding a rpackets
hi,
sorry if i noob in perl, but i need info on how to add/push $rpackets in MessageTokenizer.pm (line 125)
im guessing that $rpackets are in some kind of (key, value) array form, which generated frm recvpacket.txt
i just need to push a new token,
thanks
sorry if i noob in perl, but i need info on how to add/push $rpackets in MessageTokenizer.pm (line 125)
im guessing that $rpackets are in some kind of (key, value) array form, which generated frm recvpacket.txt
i just need to push a new token,
thanks
Re: adding a rpackets
Yep u right in function.pl we got:
This means %rpackets contains all packets from recvpacket file. So we need to look in FileParser.pm and find it structure:
Boom here it is.
And u no need to push in hash.... it is hash If u need only packet and size do this:
example:
Code: Select all
Settings::addTableFile(Settings::getRecvPacketsFilename(),
loader => [\&parseRecvpackets, \%rpackets]);
Code: Select all
my ($packetID, $length, $minLength, $repeat, $function) = split /\s+/, $line, 5;
$packetID =~ s/^(0x[0-9a-f]+)$/hex $1/e;
$r_hash->{$packetID}{length} = $length;
$r_hash->{$packetID}{minLength} = $minLength;
$r_hash->{$packetID}{repeat} = $repeat;
$r_hash->{$packetID}{function} = $function;
And u no need to push in hash.... it is hash If u need only packet and size do this:
Code: Select all
$rpackets->{your_packet_here}{length} = your_length_here;
Code: Select all
$rpackets->{08AF}{length} = 4;
Please use pin function for uploading your file contents!
Re: adding a rpackets
it works thanks
Re: adding a rpackets
thanks again
Last edited by GitzJoey on 12 Mar 2017, 17:50, edited 1 time in total.
Re: adding a rpackets
Duno what u wrote? Receive or Send? U want to edit packet content lengths on the go, while Kore working? Because if not this can be put in your serverType file.
Please use pin function for uploading your file contents!
Re: adding a rpackets
yes, what im facing in my country is randomize token (specially for login)
i'm guessing i need to rebuilding on the fly specially for revpacket and receive
i'm guessing i need to rebuilding on the fly specially for revpacket and receive
Re: adding a rpackets
if all packets working correct except this why u no set exception for all packets not set in recvpackets.txt?
it is in parse function in src\Network\PacketParser.pm just consider all unset packets is your packet....
of course this is extreme but u can try
it is in parse function in src\Network\PacketParser.pm just consider all unset packets is your packet....
Code: Select all
unless ($handler) {
warning "Packet Parser: Unknown switch: $lastSwitch\n";#
return undef;#delete this
$handler = ['bla_bla', 'bla bla bla', [qw(bla bla)]];
}
Please use pin function for uploading your file contents!
Re: adding a rpackets
yes tq for the tip
i just $self->{packet_list}{$lastSwitch} = ['secure_login_key', 'x2 a*', [qw(secure_key)] ];
before my $handler
anyway its already fixed, but having a different error now lol
tq anyway
i just $self->{packet_list}{$lastSwitch} = ['secure_login_key', 'x2 a*', [qw(secure_key)] ];
before my $handler
anyway its already fixed, but having a different error now lol
tq anyway