This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"title" : "Technical Engineer: U.S.S.R.", | |
"id" : 127, | |
"ident" : "mechanicEngineer0" | |
}, | |
{ | |
"title" : "maxPiercingSeries", | |
"id" : 32, | |
"ident" : "maxPiercingSeries" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Mojo::IOLoop; | |
my ($ip, $port, $status); | |
Mojo::IOLoop->client({ port => $port, address => $ip } => sub { | |
my ($loop, $error, $stream) = (@_); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# somewhere the app has a 'mango' attribute that was set up like this: | |
# $app->attr(mango => sub { Mango->new('localhost') }); | |
sub some_action { | |
my $self = shift; | |
$self->render_later; | |
$self->mango->db('mydb')->collection('baz')->find_one({ _id => $self->req->param('id') } => sub { | |
my ($coll, $err, $doc) = (@_); | |
if($err) { | |
$self->render(json => { error => $err }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the 0x67 message def | |
$srv_msg->[0x67] = def_msg(0x67, 'Set Slot', [ | |
pair(window_id => MC_byte), | |
pair(slot => MC_short), | |
slotupdate('slot_data'), | |
]); | |
# MC_byte and MC_short reader implementations | |
sub read_byte { return unpack('c', shift->read(1)) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder