Skip to content

Instantly share code, notes, and snippets.

@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();
}
}

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

@wodim
wodim / gist:6535514
Created September 12, 2013 10:29
twicca https response
HTTP/1.1 402 Payment Required
Date: Thu, 12 Sep 2013 10:19:45 GMT
Server: Apache/1.3.42 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8e
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Set-Cookie: PHPSESSID=[REDACTED]; path=/
Content-Type: application/json
X-Cache: MISS from secure1141.sakura.ne.jp
Keep-Alive: timeout=5, max=10
@wodim
wodim / gist:6535520
Created September 12, 2013 10:29
twicca http request
POST https://secure1141.sakura.ne.jp/twicca.r246.jp/_backend/_status/ HTTP/1.1
Content-Length: 82
Content-Type: application/x-www-form-urlencoded
Host: secure1141.sakura.ne.jp
Connection: Keep-Alive
User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4)
id=[REDACTED]&screen_name=[REDACTED]&signature=[REDACTED]
.class public final Ljp/r246/twicca/billing/a/b;
.super Landroid/os/AsyncTask;
# instance fields
.field private a:Ljp/r246/twicca/billing/a/c;
.field private b:J
.field private c:Ljava/lang/String;
@wodim
wodim / gist:6551561
Last active December 23, 2015 00:09
Stylish stylesheet for Feedly (Google Reader look-a-like)
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("http://cloud.feedly.com/") {
/* inside views */
.inlineFrame {
padding: 20px 0 0 0 !important;
background-size: 20px 20px !important;
min-height: 0 !important;
}
.entryTitle.title {
/* padding-bottom: 10px; */
@wodim
wodim / spanish.theme
Last active July 16, 2023 10:13
Traducción del tema por defecto de Irssi al español
# When testing changes, the easiest way to reload the theme is with /RELOAD.
# This reloads the configuration file too, so if you did any changes remember
# to /SAVE it first. Remember also that /SAVE overwrites the theme file with
# old data so keep backups :)
# TEMPLATES:
# The real text formats that irssi uses are the ones you can find with
# /FORMAT command. Back in the old days all the colors and texts were mixed
# up in those formats, and it was really hard to change the colors since you
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''