FTP KIller, Gestore ftp

« Older   Newer »
  Share  
-Anubi-
CAT_IMG Posted on 22/6/2010, 09:09     +1   -1




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 )

Eccolo:

SPOILER (click to view)
#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
 
Top
lollofieretto
CAT_IMG Posted on 22/6/2010, 09:30     +1   -1




veramente bellooo
 
Top
-Anubi-
CAT_IMG Posted on 22/6/2010, 09:33     +1   -1




Grazia !
 
Top
3ad_Pr0grammer
CAT_IMG Posted on 22/6/2010, 10:03     +1   -1




Bello ma c' è qualche bug nella visualizzazione del sito in anteprima.. comunque gooD!
 
Top
-Anubi-
CAT_IMG Posted on 22/6/2010, 10:24     +1   -1




Trattandosi di internet explorer xD
 
Top
Djvinz95
CAT_IMG Posted on 22/6/2010, 11:42     +1   -1




Usa l'UDF di firefox allora :) . Comunque bravo ;)
 
Top
-Anubi-
CAT_IMG Posted on 22/6/2010, 11:54     +1   -1




Firefox non lo usano tutti...con Ie si và sul sicuro !
 
Top
Gianlu-thebest
CAT_IMG Posted on 22/6/2010, 12:26     +1   -1




CITAZIONE (-Anubi- @ 22/6/2010, 10:09)
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 )

Eccolo:

SPOILER (click to view)
#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

Scusa anubi, ma non mi sembra molto comodo. C'è quell'object di ie che non ho capito a che serve e poi per mettere connessione passiva usa le checkbox non le radio..
 
Top
-Anubi-
CAT_IMG Posted on 22/6/2010, 12:29     +1   -1




A che servono le radio se ne è una sola di casella ? Che cambia ? L'object di ie serve a visualizzare il sito in anteprima.
Che motivi sarebbero ? xD
 
Top
Gianlu-thebest
CAT_IMG Posted on 22/6/2010, 12:37     +1   -1




A me compare solo pubblicità, le radio le hai messe tu! Metti le CheckBox così si può attivare o disattivare
 
Top
-Anubi-
CAT_IMG Posted on 22/6/2010, 13:20     +1   -1




CHE CAMBIA ! Radio o checkbox le puoi sempre disattivare, no ?
 
Top
Aaly
CAT_IMG Posted on 22/6/2010, 18:20     +1   -1




per le radio dovresti farne una attiva e una disattiva, visto che si spostano solo.
Invece la checkbox può essere spuntata o non
 
Top
-Anubi-
CAT_IMG Posted on 23/6/2010, 08:07     +1   -1




Ad Anubi si spunta invece !
 
Top
qwerty2
CAT_IMG Posted on 23/6/2010, 17:04     +1   -1




bello
 
Top
` K u r t ·
CAT_IMG Posted on 23/6/2010, 17:42     +1   -1




CITAZIONE (-Anubi- @ 22/6/2010, 12:54)
Firefox non lo usano tutti...con Ie si và sul sicuro !

ahaahahahahahhahahahaha
Anubi più passa il tempo e più sono convinto che sei un nabbaccio.
 
Top
14 replies since 22/6/2010, 09:09   280 views
  Share