Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

public function descifra_ip(cookie:String, claveCifrado:String) : String {
var t:ByteArray = Base64.decodeToByteArray(cookie);
var k:ByteArray = Base64.decodeToByteArray(claveCifrado);
var v:ByteArray = new ByteArray();
var v2:ByteArray = new ByteArray();
var v3:ByteArray = new ByteArray();
var r:ByteArray = new ByteArray();
k.position = 24;
k.writeBytes(t,0,8);
v.writeBytes(t,8,16);
from base64 import b64decode
from Crypto.Cipher import AES
def descifra_ip(cookie, claveCifrado):
t = bytearray(b64decode(cookie))
k = bytearray(b64decode(claveCifrado))
v = b''
v2 = bytearray('\0' * 16)
v3 = b''
r = b''
use strict;
use MIME::Base64;
use Crypt::OpenSSL::AES;
sub descifra_ip {
my ($loc_3, $loc_4) = @_;
my ($loc_5, $loc_6, $loc_7, $loc_8, $loc_9, $loc_10);
$loc_3 = decode_base64($loc_3);
$loc_4 = decode_base64($loc_4);
package
{
import com.hurlant.util.Base64;
import com.hurlant.crypto.symmetric.AESKey;
import flash.utils.*;
public class Tester {
public function descifra_ip(cookie:String, claveCifrado:String) : String {
var t:ByteArray = Base64.decodeToByteArray(cookie);
use Irssi;
use strict;
use vars qw($VERSION %IRSSI);
$VERSION = "1.0";
%IRSSI = (
authors => "",
contact => "",
name => "",
description => "",
license => "",
@wodim
wodim / migrate.py
Last active August 29, 2015 14:08
Script para migrar de escriure a WordPress
# -*- coding: utf-8 -*-
import sqlite3
import MySQLdb
import os
import sys
import mimetypes
admin_nick = "wodim"
admin_email = "lalala@lalala.com"
@wodim
wodim / seconds_to_hhmmss.js
Last active August 29, 2015 14:11
YASTHHMMSSF (Yet Another Seconds To HHMMSS Function)
var seconds_to_hhmmss = function(seconds) {
if (seconds < 0 || isNaN(seconds)) {
return "--:--";
}
var hh = (seconds / 3600);
hh = Math.floor(hh);
hh = hh < 10 ? "0" + hh : hh;
var mm = (seconds / 60) % 60;
mm = Math.floor(mm);
@wodim
wodim / interfaces
Created January 2, 2015 20:23
Archivo interfaces para NAT y host-only (VirtualBox)
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet static
address 192.168.4.103
@wodim
wodim / gist:2691044
Last active October 4, 2015 20:07
Función «descifra» del webchat de IRC-Hispano - Terra
public function descifra(ping:String, claveCifrado:String) : String
{
var t:ByteArray = Base64.decodeToByteArray(ping);
var k:ByteArray = Base64.decodeToByteArray(claveCifrado);
var v:ByteArray = new ByteArray();
k.position = 24;
k.writeBytes(t,0,8);
v.writeBytes(t,8,16);
k.position = 0;
v.position = 0;
sub event_ping {
my ($server, $ping) = @_;
if ($ping =~ m/^:?[a-zA-Z0-9\[\]]{32}$/) {
Irssi::print "Recibido PING cifrado, enviando PONG acorde :-)";
my $pong = "PONG :".descifrar($ping, $private_key);
$server->send_raw($pong);
Irssi::signal_stop();
}
}