Skip to content

Instantly share code, notes, and snippets.

View benvanstaveren's full-sized avatar

Ben van Staveren benvanstaveren

View GitHub Profile
{
"vehicles" : {
"18170200" : {
"isAlive" : true,
"vehicleType" : "germany:PzVI_Tiger_P",
"events" : {},
"name" : "WolfhundA1",
"isTeamKiller" : false,
"clanAbbrev" : "",
"team" : 1
[
{
"honorTitles" : [
201326594,
201326597,
201326601,
234881026,
234881029,
234881024,
218103808,
tomas907
docela ferq
[>8$%
?\%2
[>8$%
?[%2
?T%2
?V%2
?S%2
?R%2
@ID]
shotgun99
i gotta a maus woooooohq
Version......: 0.7.4 #220
-- chat message dump -----------------
Source......: tomas907
Target......: #chat:channels/battle/team
Body........: docela fer
Source......: tomas907
Target......: #chat:channels/battle/team
Body........: ja hral za a-20 proti IX
previous_block = null;
while replay_data_available:
block = get_8_bytes_from_replay_data
decrypted_block = decrypt_the_block(block)
if this_block is not the_first_block:
decrypted_block = decrypted_block xor previous_block
previous_block = decrypted_block
my $bc = 0;
my $previous_block;
while(my $bread = $data->read(my $block, 8)) {
if($bread < 8) {
my $missing = 8 - $bread;
$block .= chr(0) x $missing;
}
if($bc > 0) {
my $decrypted_block = $self->blowfish->decrypt($block);
my $bc = 0;
my $previous_block;
while(my $bread = $data->read(my $block, 8)) {
if($bread < 8) {
my $missing = 8 - $bread;
$block .= chr(0) x $missing;
}
if($bc > 0) {
my $decrypted_block = $self->blowfish->decrypt($block);
0xde 0x72 0xbe 0xa0 0xde 0x04 0xbe 0xb1 0xde 0xfe 0xbe 0xef 0xde 0xad 0xbe 0xef
DE 72 BE A0 DE 04 BE B1 DE FE BE EF DE AD BE EF
@benvanstaveren
benvanstaveren / gist:4197629
Created December 3, 2012 20:08
perl implementation of mc3p's Stream class (well, most of it)
package Halcyon::Buffer;
use Mojo::Base '-base';
# a reimplementation of mc3p's Stream class, of sorts
has 'raw' => '';
has 'i' => 0;
has 'tot_bytes' => 0;
has 'wasted_bytes' => 0;
sub append {