Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
2182aa66
Commit
2182aa66
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Now supports a command debug mode (echos transmitted commands).
'help' now displays help menu (same as '?').
parent
bfeed29d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
exec/ftp.src
+30
-3
30 additions, 3 deletions
exec/ftp.src
with
30 additions
and
3 deletions
exec/ftp.src
+
30
−
3
View file @
2182aa66
...
...
@@ -11,11 +11,11 @@
int sock port i
str addr user pass src dest fname
str pasv_mode hash_mode ascii_mode
str pasv_mode hash_mode ascii_mode
debug_mode
set _ftp_mode FTP_ECHO_RSP|FTP_HASH|FTP_PASV
print "\r\n\1h\1ySynchronet \1wFTP Client v1.
0
0 \1y- Copyright 200
1
Rob Swindell\1n\r\n\r\n"
print "\r\n\1h\1ySynchronet \1wFTP Client v1.
1
0 \1y- Copyright 200
2
Rob Swindell\1n\r\n\r\n"
compare str ""
if_false
...
...
@@ -34,6 +34,11 @@ if_equal
continue
end_if
compare_word "help" # pseudonym for ?
if_true
set str "?"
end_if
compare_word "?"
if_true
compare_all_bits _ftp_mode FTP_HASH
...
...
@@ -43,6 +48,13 @@ if_true
set hash_mode OFF
end_if
compare_all_bits _ftp_mode FTP_ECHO_CMD
if_true
set debug_mode ON
else
set debug_mode OFF
end_if
compare_all_bits _ftp_mode FTP_PASV
if_true
set pasv_mode ON
...
...
@@ -63,9 +75,10 @@ if_true
print "\1h\1ydir \1w: \1cprint a directory listing\r\n"
print "\1h\1ypwd \1w: \1cprint working directory\r\n"
print "\1h\1ycd \1w: \1cchange working directory\r\n"
printf "\1h\1yhash \1w: \1ctoggle hash printing during transfer (currently %s\1c)\r\n" hash_mode
printf "\1h\1ypasv \1w: \1ctoggle passive mode transfers (currently %s\1c)\r\n" pasv_mode
printf "\1h\1yascii \1w: \1ctoggle ASCII (CR/LF) mode transfers (currently %s\1c)\r\n" ascii_mode
printf "\1h\1yhash \1w: \1ctoggle hash printing during transfer (currently %s\1c)\r\n" hash_mode
printf "\1h\1ydebug \1w: \1ctoggle command debugging (currently %s\1c)\r\n" debug_mode
print "\1h\1yget \1w: \1cretrieve (download) file\r\n"
print "\1h\1yput \1w: \1csend (upload) file\r\n"
print "\1h\1ydelete \1w: \1cdelete (erase) file\r\n"
...
...
@@ -112,6 +125,20 @@ if_true
continue
end_if
compare_str "debug"
if_true
xor _ftp_mode FTP_ECHO_CMD
compare_all_bits _ftp_mode FTP_ECHO_CMD
print "\1h\1cCommand/response debugging: "
if_true
print ON
else
print OFF
end_if
crlf
continue
end_if
compare_str "ascii"
if_true
xor _ftp_mode FTP_ASCII
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment