From 4d9307df0256b5fd5146cd806a1688c1a889e000 Mon Sep 17 00:00:00 2001 From: friedkeenan Date: Thu, 30 Nov 2023 09:36:32 -0600 Subject: [PATCH] Update for the latest Transformice --- src/leakers/Leaker.as | 5 ++++- src/leakers/TransformiceLeaker.as | 19 ++++++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/leakers/Leaker.as b/src/leakers/Leaker.as index 415b069..5f3f475 100644 --- a/src/leakers/Leaker.as +++ b/src/leakers/Leaker.as @@ -468,7 +468,10 @@ package leakers { to a single XOR, and since '0 ^ key == key', we can get the auth key simply by calling the method. */ - var auth_key: int = cipher_method.call(document); + var auth_key: * = cipher_method.call(document); + if (auth_key.constructor != Number) { + continue; + } /* Transformice has a method with the same signature diff --git a/src/leakers/TransformiceLeaker.as b/src/leakers/TransformiceLeaker.as index 9aa7f29..765330c 100644 --- a/src/leakers/TransformiceLeaker.as +++ b/src/leakers/TransformiceLeaker.as @@ -3,7 +3,8 @@ package leakers { import flash.net.Socket; public class TransformiceLeaker extends Leaker { - private var real_socket_prop_name: String = null; + private var socket_key_name: String = null; + private var socket_dict_name: String = null; public function TransformiceLeaker() { super("http://www.transformice.com/Transformice.swf", true); @@ -13,20 +14,24 @@ package leakers { var description: * = describeType(klass); for each (var variable: * in description.elements("factory").elements("variable")) { - if (variable.attribute("type") == "flash.net::Socket") { - this.real_socket_prop_name = variable.attribute("name"); - - return; + if (variable.attribute("type") == "int") { + this.socket_key_name = variable.attribute("name"); + } else if (variable.attribute("type") == "flash.utils::Dictionary") { + this.socket_dict_name = variable.attribute("name"); } } } protected override function get_connection_socket(instance: *) : Socket { - return instance[this.connection_class_info.socket_prop_name][this.real_socket_prop_name]; + var adaptor: * = instance[this.connection_class_info.socket_prop_name]; + + return adaptor[this.socket_dict_name][adaptor[this.socket_key_name]]; } protected override function set_connection_socket(instance: *, socket: Socket) : void { - instance[this.connection_class_info.socket_prop_name][this.real_socket_prop_name] = socket; + var adaptor: * = instance[this.connection_class_info.socket_prop_name]; + + adaptor[this.socket_dict_name][adaptor[this.socket_key_name]] = socket; } protected override function auth_key_return() : String {