Guest User

Untitled

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