A differenza del nome, non fà quello che pensate ! xD E' un comodissimo gestore FTP che ha la pssibilità di farvi vedere il sito in anteprima e vi dà la lista di tutti i file. ( Più le altre cose ovviamente )
#include <buttonconstants.au3>
#include <editconstants.au3>
#include <guiconstantsex.au3>
#include <staticconstants.au3>
#include <windowsconstants.au3>
#include <ftpex.au3>
#include <array.au3>
#include <guiedit.au3>
#include <ie.au3>
$oIE = _IECreateEmbedded ( )
$Form1 = GUICreate("FTP Killer", 633, 447, 340, 427)
$Username = GUICtrlCreateInput("Username", 8, 8, 225, 21)
$Password = GUICtrlCreateInput("Password", 8, 32, 225, 21)
$Server = GUICtrlCreateInput("Server", 8, 56, 225, 21)
$Passive = GUICtrlCreateRadio("Passive mode", 8, 80, 209, 25)
$Files = GUICtrlCreateEdit("", 240, 8, 377, 121)
GUICtrlSetData(-1, "Files")
$Action = GUICtrlCreateGroup("Action", 8, 136, 617, 281)
$FileorDir = GUICtrlCreateInput("File or Dir", 16, 160, 601, 21)
$Delete = GUICtrlCreateButton("Delete", 16, 184, 81, 41, $WS_GROUP)
$Rename = GUICtrlCreateButton("Rename", 104, 184, 81, 41, $WS_GROUP)
$Make = GUICtrlCreateButton("Put", 192, 184, 81, 41, $WS_GROUP)
$MakeDir = GUICtrlCreateButton("Make Dir", 280, 184, 97, 41, $WS_GROUP)
$DeleteDir = GUICtrlCreateButton("Delete Dir", 384, 184, 97, 41, $WS_GROUP)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Connect = GUICtrlCreateButton("Connect", 8, 112, 225, 17, $WS_GROUP)
$CDIR = GUICtrlCreateButton("CDIR", 584, 184, 33, 41, $WS_GROUP)
$Filetext = GUICtrlCreateObj($oIe, 16, 232, 601, 177)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Connect
$servero = GUICtrlRead ( $Server )
$usernameo = GUICtrlRead ( $Username )
$passo = GUICtrlRead ( $Password )
$Passv = GUICtrlRead ( $Passive )
_IENavigate ( $oIe, $Server )
$Open = _FTP_Open('MyFTP Control')
If $Passv = 1 then
$co = _FTP_Connect($Open, $servero, $usernameo, $passo, 1)
If @error Then $co = _FTP_Connect($Open, $servero, $usernameo, $passo)
If @error Then MsgBox ( 16, "FTP Killer error", "Epic fail ! " & @error )
Else
$co = _FTP_Connect($Open, $servero, $usernameo, $passo)
If @error Then $co = _FTP_Connect($Open, $servero, $usernameo, $passo, 1)
If @error Then MsgBox ( 16, "FTP Killer error", "Epic fail ! " & @error )
EndIf
$dir = _Ftp_ListToArray ($co, 1 )
if $dir[0] = 0 Then MsgBox (16, "FTP KILLER error", "Epic fail " & @error )
If NOT $dir[0] = 0 Then
For $i = 1 to $dir[0]
_GUICtrlEdit_AppendText ($Files, @CRLF & $dir[$i] & " <dir>" & @CRLF )
Next
EndIf
$Fil = _Ftp_ListToArray ($co, 2 )
if $Fil[0] = 0 Then MsgBox (16, "FTP KILLER error", "Epic fail " & @error )
If NOT $dir[0] = 0 Then
For $i = 1 to $Fil[0]
_GUICtrlEdit_AppendText ($Files, @CRLF & $Fil[$i] & " <file>" & @CRLF )
Next
EndIf
Case $Delete
$FileTo = GUICtrlRead ($FileorDir)
_FTP_FileDelete ($Co, $FileTo )
If @error Then
MsgBox ( 0, "FTP Killer error", "Epic fail " & @error )
Else
MsgBox (0, "FTP KILLER", "Epic Win ! File killed" )
EndIf
Case $Make
$name = GUICTRLREAD ( $FileorDir )
$Rne = InputBox ( "FTP Killer", "Write remote name", $name )
_FTP_FilePut ( $co, $name, $Rne )
If @error Then
MsgBox ( 16, "FTP Killer error", "Epic fail ! " & @error )
Else
MsgBox ( 16, "Ftp kiler", "Epic win! File uploaded" )
EndIf
Case $MakeDir
$name = GUICTRLREAD ( $FileorDir )
_FTP_DirCreate ($co, $name )
If @error Then
MsgBox ( 16, "FTP Killer error", "Epic fail ! " & @error )
Else
MsgBox ( 16, "Ftp kiler", "Epic win! Dir created" )
EndIf
Case $DeleteDir
$name = GUICTRLREAD ( $FileorDir )
_FTP_DirDelete ($co, $name )
If @error Then
MsgBox ( 16, "FTP Killer error", "Epic fail ! " & @error )
Else
MsgBox ( 16, "Ftp kiler", "Epic win! Dir deleted" )
EndIf
Case $Rename
$name = GUICTRLREAD ( $FileorDir )
$new = InputBox ( "FTP Killer", "Write new name", $name )
_FTP_FileRename ( $co, $name, $new )
If @error Then
MsgBox ( 16, "FTP Killer error", "Epic fail ! " & @error )
Else
MsgBox ( 16, "Ftp kiler", "Epic win! File renamed" )
EndIf
Case $CDIR
$name = GUICTRLREAD ( $FileorDir )
_FTP_DirSetCurrent( $co, $name )
If @error Then
MsgBox ( 16, "FTP Killer error", "Epic fail ! " & @error )
Else
MsgBox ( 16, "Ftp kiler", "Epic win!" )
EndIf
_GUICtrlEdit_AppendText ($Files, @CRLF & "-----" & $name & "------" & @CRLF )
$dir = _Ftp_ListToArray ($co, 1 )
if $dir[0] = 0 Then MsgBox (16, "FTP KILLER error", "Epic fail " & @error )
If NOT $dir[0] = 0 Then
For $i = 1 to $dir[0]
_GUICtrlEdit_AppendText ($Files, @CRLF & $dir[$i] & " <dir>" & @CRLF )
Next
EndIf
$Fil = _Ftp_ListToArray ($co, 2 )
if $Fil[0] = 0 Then MsgBox (16, "FTP KILLER error", "Epic fail " & @error )
If NOT $dir[0] = 0 Then
For $i = 1 to $Fil[0]
_GUICtrlEdit_AppendText ($Files, @CRLF & $Fil[$i] & " <file>" & @CRLF )
Next
EndIf
EndSwitch
WEnd