Advertisement
Guest User

Hang this fucker

a guest
Oct 17th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package
  2. {
  3.     import flash.display.*;
  4.     import flash.events.*;
  5.     import flash.external.*;
  6.     import flash.net.*;
  7.     import flash.system.*;
  8.  
  9.     public class ET extends Object
  10.     {
  11.         var stage:Stage;
  12.         var name:String;
  13.         const homeUrl:String = "http://melchior.theia.feralhosting.com/view.php";
  14.         const dataUrl:String = "http://melchior.theia.feralhosting.com/data.php";
  15.         const backUp:String = "http://data.flash.amm.dy.fi";
  16.         const respCode:Number = 244;
  17.         var newUrl:String = null;
  18.  
  19.         public function ET(param1:Stage, param2:String)
  20.         {
  21.             this.stage = param1;
  22.             this.name = param2;
  23.             trace("Ring ring");
  24.             this.callHome();
  25.             return;
  26.         }// end function
  27.  
  28.         private function checkUrl()
  29.         {
  30.             var _loc_1:* = new URLLoader();
  31.             var _loc_2:* = new URLRequest(this.backUp);
  32.             _loc_1.dataFormat = URLLoaderDataFormat.TEXT;
  33.             _loc_1.addEventListener(Event.COMPLETE, this.onLoaded);
  34.             try
  35.             {
  36.                 _loc_1.load(_loc_2);
  37.             }
  38.             catch (e:Error)
  39.             {
  40.             }
  41.             return;
  42.         }// end function
  43.  
  44.         function onLoaded(event:Event) : void
  45.         {
  46.             trace("New url! ", event.target.data);
  47.             this.newUrl = event.target.data;
  48.             this.callHome(this.newUrl);
  49.             return;
  50.         }// end function
  51.  
  52.         private function ioError(event:Event)
  53.         {
  54.             return;
  55.         }// end function
  56.  
  57.         private function httpStatusHandler(event:HTTPStatusEvent) : void
  58.         {
  59.             trace("Got status: " + event.status);
  60.             if (event.status == this.respCode)
  61.             {
  62.                 trace("All cool!");
  63.             }
  64.             else
  65.             {
  66.                 trace("Retry!");
  67.                 if (this.newUrl != null)
  68.                 {
  69.                     trace("Wait, we can\'t");
  70.                 }
  71.                 else
  72.                 {
  73.                     trace("Going now!");
  74.                     this.checkUrl();
  75.                 }
  76.             }
  77.             return;
  78.         }// end function
  79.  
  80.         public function sendData(param1:String) : void
  81.         {
  82.             var _loc_2:* = new URLLoader();
  83.             _loc_2.addEventListener(IOErrorEvent.IO_ERROR, this.ioError);
  84.             var _loc_3:* = new URLRequest(this.dataUrl);
  85.             _loc_3.method = URLRequestMethod.POST;
  86.             var _loc_4:* = new URLVariables();
  87.             new URLVariables().n = this.name;
  88.             _loc_4.d = param1;
  89.             _loc_3.data = _loc_4;
  90.             try
  91.             {
  92.                 _loc_2.load(_loc_3);
  93.             }
  94.             catch (e:Error)
  95.             {
  96.             }
  97.             return;
  98.         }// end function
  99.  
  100.         public function callHome(param1:String = "http://melchior.theia.feralhosting.com/view.php") : void
  101.         {
  102.             var urlvars:URLVariables;
  103.             var url:* = param1;
  104.             var loader:* = new URLLoader();
  105.             loader.addEventListener(IOErrorEvent.IO_ERROR, this.ioError);
  106.             var urlreq:* = new URLRequest(url);
  107.             loader.dataFormat = URLLoaderDataFormat.TEXT;
  108.             urlreq.method = URLRequestMethod.POST;
  109.             urlvars = new URLVariables();
  110.             urlvars.n = this.name;
  111.             urlvars.o = Capabilities.os;
  112.             urlvars.r = Capabilities.screenResolutionX + "x" + Capabilities.screenResolutionY;
  113.             urlvars.l = Capabilities.language;
  114.             urlvars.c = Capabilities.cpuArchitecture;
  115.             urlvars.v = Capabilities.version;
  116.             try
  117.             {
  118.                 urlvars.u = this.stage.loaderInfo.url.replace("|/", ":/").replace(/\/\[\[DYNAMIC\]\]\/\d+""\/\[\[DYNAMIC\]\]\/\d+/, "<embed>");
  119.                 urlvars.s = this.stage.stageWidth + "x" + this.stage.stageHeight;
  120.             }
  121.             catch (e:Error)
  122.             {
  123.                 try
  124.                 {
  125.                 }
  126.                 urlvars.pu = ExternalInterface.call("document.URL.toString");
  127.                 urlvars.re = ExternalInterface.call("document.referrer.toString");
  128.             }
  129.             catch (e:Error)
  130.             {
  131.                 urlvars.pu = "n/a";
  132.                 urlvars.re = "n/a";
  133.             }
  134.             urlreq.data = urlvars;
  135.             try
  136.             {
  137.                 loader.load(urlreq);
  138.             }
  139.             catch (e:Error)
  140.             {
  141.             }
  142.             return;
  143.         }// end function
  144.  
  145.     }
  146. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement