Skip to content

Commit

Permalink
Update for the latest Transformice
Browse files Browse the repository at this point in the history
  • Loading branch information
friedkeenan committed Nov 30, 2023
1 parent f135514 commit 4d9307d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
5 changes: 4 additions & 1 deletion src/leakers/Leaker.as
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 12 additions & 7 deletions src/leakers/TransformiceLeaker.as
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 {
Expand Down

0 comments on commit 4d9307d

Please sign in to comment.