Dialog, FileBrowse, FTP Upload
Moderators: JRL, Dorian (MJT support)
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Dialog, FileBrowse, FTP Upload
Hello Guy's,
I Need Alot Of Help With This Script, I Am Not Thinking Straight & Would Love Some Ideas.
What I Am Trying To Create Is A Program Which The User Can Upload Only ZIP Or RAR Files No More Than 8 Meg In Size To My FTP Site.
I Am Having Trouble With The FileBrowse & Assigning The Only Allow Files, Can't Make Sense Of The Help File.
Dialog>DemoLocation
Caption=Demo Uploader
Width=445
Height=250
Top=115
Left=16
Label=[UA] CyberCitizen Demo Upload Tool,8,8,true
Label=Demo Location (RAR Or Zip Files Only),8,32,true
Edit=FilePath,8,48,337,
Button=Locate File,352,48,75,25,3,
FileBrowse=Locate File,FilePath,,open
Default=Locate File
EndDialog>DemoLocation
Show>DemoLocation,r
MessageModal>%DemoLocation.FilePath%
Day>the_day
Month>the_month
Year>the_year
Sec>Seconds
Min>Minutes
Hour>Hour
Let>FTPFILE=Hacker%the_year%%the_month%%the_day% %Hour%%Minutes%%Seconds%
FTPPutFile>HIDDENHOST,HIDDENUSERNAME,HIDDENPASSWORD,21,%DemoLocation.FilePath%,/public_html/hacker_demos/FTPFILE,A
MessageModal>%FTP_RESULT%
I Have Used The Date & Time As A Way Of Making Sure That The Files Are Unique, However Would Perfer To Use The The FileName That The User Has Selected.
Any Help Would Be Great.
I Need Alot Of Help With This Script, I Am Not Thinking Straight & Would Love Some Ideas.
What I Am Trying To Create Is A Program Which The User Can Upload Only ZIP Or RAR Files No More Than 8 Meg In Size To My FTP Site.
I Am Having Trouble With The FileBrowse & Assigning The Only Allow Files, Can't Make Sense Of The Help File.
Dialog>DemoLocation
Caption=Demo Uploader
Width=445
Height=250
Top=115
Left=16
Label=[UA] CyberCitizen Demo Upload Tool,8,8,true
Label=Demo Location (RAR Or Zip Files Only),8,32,true
Edit=FilePath,8,48,337,
Button=Locate File,352,48,75,25,3,
FileBrowse=Locate File,FilePath,,open
Default=Locate File
EndDialog>DemoLocation
Show>DemoLocation,r
MessageModal>%DemoLocation.FilePath%
Day>the_day
Month>the_month
Year>the_year
Sec>Seconds
Min>Minutes
Hour>Hour
Let>FTPFILE=Hacker%the_year%%the_month%%the_day% %Hour%%Minutes%%Seconds%
FTPPutFile>HIDDENHOST,HIDDENUSERNAME,HIDDENPASSWORD,21,%DemoLocation.FilePath%,/public_html/hacker_demos/FTPFILE,A
MessageModal>%FTP_RESULT%
I Have Used The Date & Time As A Way Of Making Sure That The Files Are Unique, However Would Perfer To Use The The FileName That The User Has Selected.
Any Help Would Be Great.
FIREFIGHTER
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
I'd like to help but I'm also stumped trying to set the masks for the filebrowse. I've never used it before but the help seemed straight forward enough. Except that using a mask for anything, even the sample from help for text files, doesn't work for me. I've inserted a mask into the dialog portion of your script. When I call this dialog and go to filebrowse I only see directories, however, the mask choices do show up under "Files of type".
I just looked and I'm still using version 7.4.004 on my home computer, It'll take me a while but I'll get the latest version installed and see if that makes any difference.
The green highlighted section is what I added to your originally posted script. I don't know what is wrong with it, only know that it isn't working.
Dialog>DemoLocation
Caption=Demo Uploader
Width=445
Height=250
Top=115
Left=16
Label=[UA] CyberCitizen Demo Upload Tool,8,8,true
Label=Demo Location (RAR Or Zip Files Only),8,32,true
Edit=FilePath,8,48,337,
Button=Locate File,352,48,75,25,3,
FileBrowse=Locate File,FilePath,*.*|All Files|*.rar|Rar Files|*.zip|Zip Files,open
Default=Locate File
EndDialog>DemoLocation
Show>DemoLocation,r
Later,
Dick
I just looked and I'm still using version 7.4.004 on my home computer, It'll take me a while but I'll get the latest version installed and see if that makes any difference.
The green highlighted section is what I added to your originally posted script. I don't know what is wrong with it, only know that it isn't working.
Dialog>DemoLocation
Caption=Demo Uploader
Width=445
Height=250
Top=115
Left=16
Label=[UA] CyberCitizen Demo Upload Tool,8,8,true
Label=Demo Location (RAR Or Zip Files Only),8,32,true
Edit=FilePath,8,48,337,
Button=Locate File,352,48,75,25,3,
FileBrowse=Locate File,FilePath,*.*|All Files|*.rar|Rar Files|*.zip|Zip Files,open
Default=Locate File
EndDialog>DemoLocation
Show>DemoLocation,r
Later,
Dick

Dialog>Dialog1
Caption=Dialog1
Width=445
Height=157
Top=114
Left=16
Label=Filename:,24,16,true
Edit=msEdit1,24,40,273,msEdit1
Button=Browse,304,40,75,25,0
Button=OK,24,80,75,25,10
Button=Cancel,120,80,75,25,2
FileBrowse=Browse,msEdit1,All Files|*.*|Rar Files|*.rar|Zip Files|*.zip,open
EndDialog>Dialog1
Show>Dialog1,r
Sorry! Will get it fixed in next release!
MJT Net Support
[email protected]
[email protected]
Thank you Support, works much better that way.
CyberCitizen,
Try this. No guarantee but it should get you close. I did not test any of the FTP stuff.
Dialog>DemoLocation
Caption=Demo Uploader
Width=445
Height=250
Top=115
Left=16
Label=[UA] CyberCitizen Demo Upload Tool,8,8,true
Label=Demo Location (RAR Or Zip Files Only),8,32,true
Edit=FilePath,8,48,337,
Button=Locate File,352,48,75,25,0
Button=OK,168,160,75,25,3
FileBrowse=Locate File,FilePath,Zip and Rar Files|*.zip;*.rar|Zip Files|*.zip|Rar Files|*.rar|All Files|*.*,open
Default=Locate File
EndDialog>DemoLocation
Show>DemoLocation
//MessageModal>%DemoLocation.FilePath%
Label>ActionLoop
GetDialogAction>DemoLocation,r
if>r=3,Process
if>r=2,Exit
Goto>ActionLoop
Label>exit
Label>Process
FileSize>DemoLocation.FilePath,FileSz
Length>DemoLocation.FilePath,Len
Let>Len=Len-2
Midstr>DemoLocation.FilePath,Len,3,Ext
If>{(%Ext%="rar")OR(%Ext%="zip")AND(%FileSz%Rerun
Let>r=0
MDL>%DemoLocation.FilePath%%CRLF%Is not a ZIP or RAR file or it is%CRLF%larger than 8 Meg
ResetDialogAction>DemoLocation
goto>ActionLoop
Label>Continue
CloseDialog>DemoLocation
Day>the_day
Month>the_month
Year>the_year
Sec>Seconds
Min>Minutes
Hour>Hour
Let>FTPFILE=Hacker%the_year%%the_month%%the_day% %Hour%%Minutes%%Seconds%
FTPPutFile>HIDDENHOST,HIDDENUSERNAME,HIDDENPASSWORD,21,%DemoLocation.FilePath%,/public_html/hacker_demos/FTPFILE,A
MessageModal>%FTP_RESULT%
Label>Exit
CyberCitizen,
Try this. No guarantee but it should get you close. I did not test any of the FTP stuff.
Dialog>DemoLocation
Caption=Demo Uploader
Width=445
Height=250
Top=115
Left=16
Label=[UA] CyberCitizen Demo Upload Tool,8,8,true
Label=Demo Location (RAR Or Zip Files Only),8,32,true
Edit=FilePath,8,48,337,
Button=Locate File,352,48,75,25,0
Button=OK,168,160,75,25,3
FileBrowse=Locate File,FilePath,Zip and Rar Files|*.zip;*.rar|Zip Files|*.zip|Rar Files|*.rar|All Files|*.*,open
Default=Locate File
EndDialog>DemoLocation
Show>DemoLocation
//MessageModal>%DemoLocation.FilePath%
Label>ActionLoop
GetDialogAction>DemoLocation,r
if>r=3,Process
if>r=2,Exit
Goto>ActionLoop
Label>exit
Label>Process
FileSize>DemoLocation.FilePath,FileSz
Length>DemoLocation.FilePath,Len
Let>Len=Len-2
Midstr>DemoLocation.FilePath,Len,3,Ext
If>{(%Ext%="rar")OR(%Ext%="zip")AND(%FileSz%Rerun
Let>r=0
MDL>%DemoLocation.FilePath%%CRLF%Is not a ZIP or RAR file or it is%CRLF%larger than 8 Meg
ResetDialogAction>DemoLocation
goto>ActionLoop
Label>Continue
CloseDialog>DemoLocation
Day>the_day
Month>the_month
Year>the_year
Sec>Seconds
Min>Minutes
Hour>Hour
Let>FTPFILE=Hacker%the_year%%the_month%%the_day% %Hour%%Minutes%%Seconds%
FTPPutFile>HIDDENHOST,HIDDENUSERNAME,HIDDENPASSWORD,21,%DemoLocation.FilePath%,/public_html/hacker_demos/FTPFILE,A
MessageModal>%FTP_RESULT%
Label>Exit
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Could Use Some More Help If Anyone Has Any Suggestions.
Since The New Version Of MS The Counting & Limiting Of The Uploads Has Stopped Working After 3 Uploads It Errors Instead Of Displaying An Error Message.
Anyone Have Any Ideas?
Since The New Version Of MS The Counting & Limiting Of The Uploads Has Stopped Working After 3 Uploads It Errors Instead Of Displaying An Error Message.
Anyone Have Any Ideas?
Code: Select all
Let>APP_TITLE=EGN Demo Upload Tool
//Get Upload Count
RegistryReadKey>HKEY_CURRENT_USER,Software\EGN Ban Tool,Uploads,Count
RegistryReadKey>HKEY_CURRENT_USER,Software\EGN Ban Tool,Date,Today
//if not already set, set Date
If>Today=
Day>DD
Month>Today
Year>YY
Concat>Today,%DD%%YY%
RegistryWriteKey>HKEY_CURRENT_USER,Software\EGN Ban Tool,Date,Today
Else
//Set Today
Day>DD
Month>Date_Today
Year>YY
Concat>Date_Today,%DD%%YY%
If>Date_Today<Today>Count=0
RegistryWriteKey>HKEY_CURRENT_USER,Software\EGN Ban Tool,Date,Date_Today
EndIf
EndIf
//If Not Already Set, Set Count
If>Count=
Let>Count=0
Endif
RegistryReadKey>HKEY_CURRENT_USER,Software\EGN Ban Tool,Name,DName
RegistryReadKey>HKEY_CURRENT_USER,Software\EGN Ban Tool,Email,DEmail
If>Count<3>DemoLocation
Caption=EGN Demo Uploader
Width=378
Height=397
Top=CENTER
Left=CENTER
Max=0
Min=0
Close=1
Resize=0
Label=[UA] CyberCitizen Demo Upload Tool,8,8,true
Label=Enter Your Name So That You Receive Recognition For The Demo,8,32,true
Label=Enter Your Email Address So That You Can Be Advised Of The Outcome,8,72,true
Label=Gamers Name,8,112,true
Label=Gamers SteamID,192,112,true
Label=Ban Reason,8,152,true
Label=Game Type,192,152,true
Label=Server Name / IP Address,8,192,true
Label=Server Location,256,192,true
Label=Comments,8,232,true
Label=Demo Location (RAR or ZIP Files Only - 8 Meg Maximum),8,296,true
Edit=Name,8,48,353,%DName%
Edit=Email,8,88,353,%DEmail%
Edit=GamersName,8,128,169,
Edit=GamersSteamID,192,128,169,
ComboBox=BanReason,8,168,169, %CRLF%Abusive%CRLF%Cheating%CRLF%Exploits%CRLF%Racist%CRLF%Team Killing
ComboBox=GameType,192,168,169, %CRLF%Counter-Strike%CRLF%Counter-Strike Source
Edit=ServerName,8,208,233,
ComboBox=ServerLocation,256,208,105, %CRLF%VIC%CRLF%WA
Memo=Comments,8,248,353,41,
Edit=FilePath,8,312,353,
Button=Locate File,288,336,73,25,0
Button=Submit Demo,8,336,83,25,3
Button=Exit,96,336,83,25,2
Default=Locate File
FileBrowse=Locate File,FilePath,ZIP and RAR Files|*.zip;*.rar|ZIP Files|*.zip|RAR Files|*.rar|All Files|*.*,open
EndDialog>DemoLocation
Show>DemoLocation
Label>ActionLoop
GetDialogAction>DemoLocation,r
if>r=3,Process
if>r=2,Exit
Goto>ActionLoop
Label>Process
If>%DemoLocation.Name%=,BlankFields
If>%DemoLocation.Email%=,BlankFields
If>%DemoLocation.GamersName%=,BlankFields
If>%DemoLocation.GamersSteamID%=,BlankFields
If>%DemoLocation.BanReason%= ,BlankFields
If>%DemoLocation.GameType%= ,BlankFields
If>%DemoLocation.ServerName%=,BlankFields
If>%DemoLocation.ServerLocation%= ,BlankFields
If>%DemoLocation.FilePath%=,BlankFields
FileSize>DemoLocation.FilePath,FileSz
Length>DemoLocation.FilePath,Len
Let>Len=Len-2
Midstr>DemoLocation.FilePath,Len,3,Ext
If>{(%Ext%="rar")OR(%Ext%="zip")AND(%FileSz%<8000000>Rerun
Let>r=0
MDL>%DemoLocation.FilePath%%CRLF%Is not a ZIP or RAR file or it is larger than 8 Meg !!!
ResetDialogAction>DemoLocation
GoTo>ActionLoop
Label>BlankFields
MessageModal>You Have Left One Field Blank%CRLF%%CRLF%Please Check All Fields & Try Again
ResetDialogAction>DemoLocation
Goto>ActionLoop
Label>Continue
CloseDialog>DemoLocation
//Users IP Address
HTTPRequest>http://checkip.dyndns.org/,,GET,,HTMLResponse
MidStr>%HTMLResponse%,77,15,IPAddress
StringReplace>%IPAddress%,/,,IPAddress
StringReplace>%IPAddress%,<IPAddress>%IPAddress%, ,,IPAddress
StringReplace>%IPAddress%,b,,IPAddress
StringReplace>%IPAddress%,o,,IPAddress
StringReplace>%IPAddress%,d,,IPAddress
StringReplace>%DemoLocation.Name%,|,,DemoLocation.Name
StringReplace>%DemoLocation.Name%,<DemoLocation>%DemoLocation.Name%,>,,DemoLocation.Name
StringReplace>%DemoLocation.Name%,{,,DemoLocation.Name
StringReplace>%DemoLocation.Name%,},,DemoLocation.Name
StringReplace>%DemoLocation.Name%,[,,DemoLocation.Name
StringReplace>%DemoLocation.Name%,],,DemoLocation.Name
StringReplace>%DemoLocation.Name%,.,,DemoLocation.Name
StringReplace>%DemoLocation.Name%,:,,DemoLocation.Name
StringReplace>%DemoLocation.Name%,;,,DemoLocation.Name
StringReplace>%DemoLocation.Name%,',,DemoLocation.Name
StringReplace>%DemoLocation.Name%,",,DemoLocation.Name
StringReplace>%DemoLocation.Name%,/,,DemoLocation.Name
StringReplace>%DemoLocation.Name%,\,,DemoLocation.Name
StringReplace>%DemoLocation.Name%,-,,DemoLocation.Name
StringReplace>%DemoLocation.Name%,=,,DemoLocation.Name
Day>the_day
Month>the_month
Year>the_year
Sec>Seconds
Min>Minutes
Hour>Hour
Let>FTPFILE=%DemoLocation.Name%-%the_year%-%the_month%-%the_day%-%Hour%-%Minutes%-%Seconds%
WriteLn>%TEMP_DIR%%FTPFILE%.txt,result,Date: %the_day%/%the_month%/%the_year%%CRLF%Time: %Hour%:%Minutes%:%Seconds%%CRLF%Gamers Name: %DemoLocation.GamersName%%CRLF%Gamers SteamID: %DemoLocation.GamersSteamID%%CRLF%Server Name / IP Address: %DemoLocation.ServerName% - %DemoLocation.ServerLocation%%CRLF%Reason For Demo: %DemoLocation.BanReason%%CRLF%Game Type: %DemoLocation.GameType%%CRLF%Uploaders Name: %DemoLocation.Name%%CRLF%Uploaders Email Address: %DemoLocation.Email%%CRLF%File Uploaded: %FTPFILE%.%Ext%%CRLF%Uploaders IP-Address: %IPAddress%%CRLF%Original File Name: %DemoLocation.FilePath%%CRLF%%CRLF%### Comments ###%CRLF%%DemoLocation.Comments%
Let>FTP_STATUS=1
FTPPutFile>######,######,######,21,%DemoLocation.FilePath%,/public_html/hacker_demos/%FTPFILE%.%Ext%,I
Let>FTP_STATUS=0
FTPPutFile>######,######,######,21,%TEMP_DIR%%FTPFILE%.txt,/public_html/hacker_demos/%FTPFILE%.txt,I
DeleteFile>%TEMP_DIR%%FTPFILE%.txt
MessageModal>FTP Result: %FTP_RESULT%
//Increment Upload Count
Let>Count=Count+1
RegistryWriteKey>HKEY_CURRENT_USER,Software\EGN Ban Tool,Uploads,Count
RegistryWriteKey>HKEY_CURRENT_USER,Software\EGN Ban Tool,Name,%DemoLocation.Name%
RegistryWriteKey>HKEY_CURRENT_USER,Software\EGN Ban Tool,Email,%DemoLocation.Email%
Else
MessageModal>Daily Upload Limit Reached%CRLF%%CRLF%Please Try Again Tomorrow
Endif
Label>Exit
FIREFIGHTER
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
- CyberCitizen
- Automation Wizard
- Posts: 724
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia