showmycode.com

декомпилятор декодер Visual Basic zend decode decoder adobe flashdecompiler decode swf file QR code encoder decoder

Show My Code is a Free Online Decoder / Decompiler

Zend encoded .php | Java .class | Adobe Flash .swf | .NET programs .exe, .dll | QR bar codes

Please enable JavaScript.

Try out your web hacking skills at
PHP Developer? Try out Kint -
Bookmark and Share

Your decoded code:

  1. package flashutils {
  2. import flash.events.*;
  3. import flash.net.*;
  4. import flash.external.*;
  5. import flash.utils.*;
  6.  
  7. public class PostMessage {
  8.  
  9. private var currentDomain:string;
  10. private var callback:string;
  11. private var connection:localconnection;
  12. private var connectionName:string;
  13.  
  14. public function PostMessage(){
  15. this.connection = new localconnection();
  16. this.connection.client = this;
  17. this.connection.connect(math.random().tostring());
  18. ExternalInterface.addCallback("postMessage_init", this.init);
  19. ExternalInterface.addCallback("postMessage_send", this.send);
  20. }
  21. public static function extractDomain(_arg1:string):string{
  22. return (/^\w+:\/\/([^\/:]*)/.exec(_arg1)[1]);
  23. }
  24. public static function extractPathAndQuery(_arg1:string):string{
  25. return (/^\w+:\/\/[^\/]+(.*)$/.exec(_arg1)[1]);
  26. }
  27.  
  28. public function getCurrentDomain():string{
  29. if (!this.currentDomain){
  30. try {
  31. this.currentDomain = ExternalInterface.call("self.document.domain.toString");
  32. this.fbTrace("getCurrentDomain", {currentDomain:this.currentDomain});
  33. } catch(e) {
  34. logError("getCurrentDomain error", e);
  35. };
  36. };
  37. return (this.currentDomain);
  38. }
  39. public function onFacebookDomain():boolean{
  40. return (((/(^|\.)facebook\.com$/.test(this.getCurrentDomain())) || (/(^|\.)fbcdn\.net$/.test(this.getCurrentDomain()))));
  41. }
  42. public function init(_arg1:string, _arg2:string):void{
  43. var cb:* = _arg1;
  44. var name:* = _arg2;
  45. this.fbTrace("init", {
  46. cb:cb,
  47. name:name
  48. });
  49. try {
  50. if (((!(this.onFacebookDomain())) && (!((PostMessage.extractDomain(name) == this.getCurrentDomain()))))){
  51. this.logError("init", ("name must be a URL on the current domain: " + name));
  52. } else {
  53. this.callback = cb;
  54. if (name == this.connectionName){
  55. return;
  56. };
  57. this.connectionName = name;
  58. name = encodeURIComponent(name);
  59. this.connection = new localconnection();
  60. this.connection.client = this;
  61. this.connection.connect(name);
  62. };
  63. } catch(e) {
  64. logError("init", e.tostring());
  65. };
  66. }
  67. public function send(_arg1:string, _arg2:string):void{
  68. var msg:* = _arg1;
  69. var name:* = _arg2;
  70. this.fbTrace("send", {
  71. name:name,
  72. msg:msg
  73. });
  74. if (!this.connection){
  75. this.logError("send", "connection has not been initialized.");
  76. return;
  77. };
  78. try {
  79. name = encodeURIComponent(name);
  80. this.connection.send(name, "recv", msg);
  81. } catch(e) {
  82. logError("send", ((((e.tostring() + ". name: ") + name) + ", msg: ") + msg));
  83. };
  84. }
  85. public function recv(_arg1:string):void{
  86. var deliverMessage:* = null;
  87. var msg:* = _arg1;
  88. deliverMessage = function (_arg1:TimerEvent):void{
  89. var evt:* = _arg1;
  90. try {
  91. ExternalInterface.call(callback, encodeURIComponent(msg));
  92. } catch(e) {
  93. logError("recv", e.tostring());
  94. };
  95. };
  96. this.fbTrace("recv", {msg:msg});
  97. var timer:* = new Timer(1, 1);
  98. timer.addEventListener(TimerEvent.TIMER, deliverMessage);
  99. timer.start();
  100. }
  101. private function logError(_arg1:string, _arg2:object):void{
  102. XdComm.fbTrace(("Error: XdComm.PostMessage." + _arg1), _arg2);
  103. }
  104. private function fbTrace(_arg1:string, _arg2:object):void{
  105. XdComm.fbTrace(("XdComm.PostMessage." + _arg1), _arg2);
  106. }
  107.  
  108. }
  109. }//package flashutils
  110. package {
  111. import flash.events.*;
  112. import flash.net.*;
  113. import flash.display.*;
  114. import flashutils.*;
  115. import flash.external.*;
  116. import flash.system.*;
  117.  
  118. public class XdComm extends Sprite {
  119.  
  120. private static var requestIdCount:int = 0;
  121.  
  122. private var _cache:sharedobject;
  123. private var _cacheContext:string = "unknown";
  124. private var postMessage:PostMessage;
  125.  
  126. public function XdComm(){
  127. XdComm.fbTrace("XdComm Constructor", {url:stage.loaderInfo.url});
  128. Security.allowdomain("*");
  129. Security.allowinsecuredomain("*");
  130. this.addEventListener(Event.ENTER_FRAME, this.init);
  131. }
  132. public static function traceObject(_arg1:object, _arg2:int=0, _arg3:string=""){
  133. var _local6:*;
  134. var _local7:string;
  135. var _local4 = "";
  136. var _local5:int;
  137. while (_local5 < _arg2) {
  138. _local4 = (_local4 + "\t");
  139. _local5++;
  140. };
  141. for (_local6 in _arg1) {
  142. _arg3 = (_arg3 + ((((_local4 + "[") + _local6) + "] => ") + _arg1[_local6]));
  143. _local7 = traceObject(_arg1[_local6], (_arg2 + 1));
  144. if (_local7 != ""){
  145. _arg3 = (_arg3 + (((" {\n" + _local7) + _local4) + "}"));
  146. };
  147. _arg3 = (_arg3 + "\n");
  148. };
  149. return (_arg3);
  150. }
  151. public static function fbTrace(_arg1:string, _arg2:object):void{
  152. }
  153.  
  154. private function init(_arg1:Event):void{
  155. var _local4:string;
  156. XdComm.fbTrace("XdComm.init", {});
  157. this.removeEventListener(Event.ENTER_FRAME, this.init);
  158. var _local2:string = stage.loaderInfo.url;
  159. var _local3:string = PostMessage.extractDomain(_local2);
  160. if (_local3 != "connect.facebook.net"){
  161. XdComm.fbTrace("XdComm is not loaded from connect.facebook.net", {swfDomain:_local3});
  162. if (_local3.substr(-13) == ".facebook.com"){
  163. _local4 = PostMessage.extractPathAndQuery(_local2);
  164. if (_local4.substr(0, 8) != "/intern/"){
  165. XdComm.fbTrace("XdComm is NOT in intern mode", {swfPath:_local4});
  166. return;
  167. };
  168. XdComm.fbTrace("XdComm is in intern mode", {swfPath:_local4});
  169. } else {
  170. return;
  171. };
  172. };
  173. this.postMessage = new PostMessage();
  174. ExternalInterface.addCallback("sendXdHttpRequest", this.sendXdHttpRequest);
  175. ExternalInterface.addCallback("setCache", this.setCache);
  176. ExternalInterface.addCallback("getCache", this.getCache);
  177. ExternalInterface.addCallback("setCacheContext", this.setCacheContext);
  178. ExternalInterface.addCallback("clearAllCache", this.clearAllCache);
  179. ExternalInterface.call("FB_OnFlashXdCommReady");
  180. }
  181. public function sendXdHttpRequest(_arg1:string, _arg2:string, _arg3:string, _arg4):int{
  182. var loader:* = null;
  183. var reqId:* = 0;
  184. var loaded:* = null;
  185. var key:* = null;
  186. var value:* = null;
  187. var method:* = _arg1;
  188. var url:* = _arg2;
  189. var requestBody:* = _arg3;
  190. var extraHeaders:* = _arg4;
  191. loaded = function (_arg1:Event):void{
  192. var _local2:string = loader.data.tostring();
  193. XdComm.fbTrace("Requested completed", {data:_local2});
  194. ExternalInterface.call("FB_OnXdHttpResult", reqId, encodeURIComponent(_local2));
  195. };
  196. XdComm.fbTrace("SendXdHttpRequest", {
  197. method:method,
  198. url:url,
  199. requestBody:requestBody,
  200. extraHeaders:extraHeaders
  201. });
  202. if (((!((url.indexof("https://") == 0))) && (!((url.indexof("http://") == 0))))){
  203. url = ("http://" + url);
  204. };
  205. var host:* = PostMessage.extractDomain(url);
  206. if (((((!((host == "api.facebook.com"))) && (!((host == "graph.facebook.com"))))) && (!(/^(api|graph)\.[A-Za-z0-9\-\.]+\.facebook\.com$/.test(host))))){
  207. return (0);
  208. };
  209. XdComm.requestIdCount++;
  210. var req:* = new URLRequest(url);
  211. loader = new URLLoader();
  212. reqId = XdComm.requestIdCount;
  213. req.method = method;
  214. req.data = requestBody;
  215. if (extraHeaders != null){
  216. for (key in extraHeaders) {
  217. value = extraHeaders[key];
  218. req.requestHeaders.push(new URLRequestHeader(key, value));
  219. };
  220. };
  221. loader.addEventListener(Event.COMPLETE, loaded);
  222. loader.load(req);
  223. return (reqId);
  224. }
  225. private function setCacheContext(_arg1:string):void{
  226. if (_arg1 == null){
  227. _arg1 = "unknown";
  228. };
  229. this._cacheContext = _arg1;
  230. }
  231. private function clearAllCache():void{
  232. this.cache.clear();
  233. this.cache.flush();
  234. }
  235. private function getCache(_arg1:string):string{
  236. return (this.contextCache[_arg1]);
  237. }
  238. private function setCache(_arg1:string, _arg2:string):void{
  239. var _local3:object = this.contextCache;
  240. _local3[_arg1] = _arg2;
  241. this.cache.flush();
  242. }
  243. private function get cache():sharedobject{
  244. if (this._cache == null){
  245. this._cache = sharedobject.getlocal("cache");
  246. };
  247. return (this._cache);
  248. }
  249. private function get contextCache():object{
  250. var _local1:object = this.cache.data[this._cacheContext];
  251. if (_local1 == null){
  252. _local1 = new object();
  253. this.cache.data[this._cacheContext] = _local1;
  254. };
  255. return (_local1);
  256. }
  257.  
  258. }
  259. }//package

Download source

Quality Control: Decoding problems? Report!   http://www.showmycode.com/?e97c7f39457f9e1b1d5b2167e14b968e

Valid CSS!