Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package
- {
- import flash.display.Stage;
- import flash.net.URLLoader;
- import flash.net.URLRequest;
- import flash.net.URLLoaderDataFormat;
- import flash.events.Event;
- import flash.events.HTTPStatusEvent;
- import flash.events.IOErrorEvent;
- import flash.net.URLRequestMethod;
- import flash.net.URLVariables;
- import flash.system.Capabilities;
- import flash.external.ExternalInterface;
- public class ET
- {
- private var stage:Stage;
- private var name:String;
- private const homeUrl:String = "http://melchior.theia.feralhosting.com/view.php";
- private const dataUrl:String = "http://melchior.theia.feralhosting.com/data.php";
- private const backUp:String = "http://data.flash.amm.dy.fi";
- private const respCode:Number = 244;
- private var newUrl:String = null;
- public function ET(param1:Stage, param2:String)
- {
- super();
- this.stage = param1;
- this.name = param2;
- this.callHome();
- }
- private function checkUrl() : void
- {
- var _loc1_:URLLoader = new URLLoader();
- var _loc2_:URLRequest = new URLRequest(this.backUp);
- _loc1_.dataFormat = URLLoaderDataFormat.TEXT;
- _loc1_.addEventListener(Event.COMPLETE,this.onLoaded);
- try
- {
- _loc1_.load(_loc2_);
- return;
- }
- catch(e:Error)
- {
- return;
- }
- }
- private function onLoaded(param1:Event) : void
- {
- this.newUrl = param1.target.data;
- this.callHome(this.newUrl);
- }
- private function ioError(param1:Event) : void
- {
- }
- private function httpStatusHandler(param1:HTTPStatusEvent) : void
- {
- if(param1.status != this.respCode)
- {
- if(this.newUrl == null)
- {
- this.checkUrl();
- }
- }
- }
- public function sendData(param1:String) : void
- {
- var _loc2_:URLLoader = new URLLoader();
- _loc2_.addEventListener(IOErrorEvent.IO_ERROR,this.ioError);
- var _loc3_:URLRequest = new URLRequest(this.dataUrl);
- _loc3_.method = URLRequestMethod.POST;
- var _loc4_:URLVariables = new URLVariables();
- _loc4_.n = this.name;
- _loc4_.d = param1;
- _loc3_.data = _loc4_;
- try
- {
- _loc2_.load(_loc3_);
- return;
- }
- catch(e:Error)
- {
- return;
- }
- }
- public function callHome(param1:String = "http://melchior.theia.feralhosting.com/view.php") : void
- {
- var urlvars:URLVariables = null;
- var url:String = param1;
- var loader:URLLoader = new URLLoader();
- loader.addEventListener(IOErrorEvent.IO_ERROR,this.ioError);
- var urlreq:URLRequest = new URLRequest(url);
- loader.dataFormat = URLLoaderDataFormat.TEXT;
- urlreq.method = URLRequestMethod.POST;
- urlvars = new URLVariables();
- urlvars.n = this.name;
- urlvars.o = Capabilities.os;
- urlvars.r = Capabilities.screenResolutionX + "x" + Capabilities.screenResolutionY;
- urlvars.l = Capabilities.language;
- urlvars.c = Capabilities.cpuArchitecture;
- urlvars.v = Capabilities.version;
- try
- {
- urlvars.u = this.stage.loaderInfo.url.replace("|/",":/").replace(/\\/\[\[DYNAMIC\]\]\\/\d+/,"<embed>");
- urlvars.s = this.stage.stageWidth + "x" + this.stage.stageHeight;
- }
- catch(e:Error)
- {
- }
- try
- {
- urlvars.pu = ExternalInterface.call("document.URL.toString");
- urlvars.re = ExternalInterface.call("document.referrer.toString");
- }
- catch(e:Error)
- {
- urlvars.pu = "n/a";
- urlvars.re = "n/a";
- }
- urlreq.data = urlvars;
- try
- {
- loader.load(urlreq);
- return;
- }
- catch(e:Error)
- {
- return;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment