Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
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
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
b92e2ab6
Commit
b92e2ab6
authored
20 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
new daring features, not used by any current test
parent
05baf94b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/ftpserver.pl
+19
-3
19 additions, 3 deletions
tests/ftpserver.pl
tests/runtests.pl
+11
-0
11 additions, 0 deletions
tests/runtests.pl
with
30 additions
and
3 deletions
tests/ftpserver.pl
+
19
−
3
View file @
b92e2ab6
...
...
@@ -66,6 +66,7 @@ my $verbose=0; # set to 1 for debugging
my
$retrweirdo
=
0
;
my
$retrnosize
=
0
;
my
$srcdir
=
"
.
";
my
$nosave
=
0
;
my
$port
=
8921
;
# just a default
do
{
...
...
@@ -381,7 +382,10 @@ sub STOR_command {
my
$ulsize
=
0
;
while
(
defined
(
$line
=
<
SOCK
>
))
{
$ulsize
+=
length
(
$line
);
print
FILE
$line
;
print
FILE
$line
if
(
!
$nosave
);
}
if
(
$nosave
)
{
print
FILE
"
$ulsize
bytes would've been stored here
\n
";
}
close
(
FILE
);
close_dataconn
();
...
...
@@ -496,6 +500,9 @@ my %customcount;
my
%delayreply
;
sub
customize
{
undef
%customreply
;
$nosave
=
0
;
# default is to save as normal
open
(
CUSTOM
,
"
<log/ftpserver.cmd
")
||
return
1
;
...
...
@@ -504,23 +511,32 @@ sub customize {
while
(
<
CUSTOM
>
)
{
if
(
$_
=~
/REPLY ([A-Z]+) (.*)/
)
{
$customreply
{
$
1
}
=
$
2
;
logmsg
"
FTPD: set custom reply for $1
\n
";
}
if
(
$_
=~
/COUNT ([A-Z]+) (.*)/
)
{
# we blank the customreply for this command when having
# been used this number of times
$customcount
{
$
1
}
=
$
2
;
logmsg
"
FTPD: blank custom reply for $1 after $2 uses
\n
";
}
elsif
(
$_
=~
/DELAY ([A-Z]+) (\d*)/
)
{
$delayreply
{
$
1
}
=
$
2
;
logmsg
"
FTPD: delay reply for $1 with $2 seconds
\n
";
}
elsif
(
$_
=~
/RETRWEIRDO/
)
{
print
"
instructed to use RETRWEIRDO
\n
";
logmsg
"
FTPD:
instructed to use RETRWEIRDO
\n
";
$retrweirdo
=
1
;
}
elsif
(
$_
=~
/RETRNOSIZE/
)
{
print
"
instructed to use RETRNOSIZE
\n
";
logmsg
"
FTPD:
instructed to use RETRNOSIZE
\n
";
$retrnosize
=
1
;
}
elsif
(
$_
=~
/NOSAVE/
)
{
# don't actually store the file we upload - to be used when
# uploading insanely huge amounts
$nosave
=
1
;
logmsg
"
FTPD: NOSAVE prevents saving of uploaded data
\n
";
}
}
close
(
CUSTOM
);
}
...
...
This diff is collapsed.
Click to expand it.
tests/runtests.pl
+
11
−
0
View file @
b92e2ab6
...
...
@@ -1052,6 +1052,17 @@ sub singletest {
my
$dumped_core
;
my
$cmdres
;
my
@precommand
=
getpart
("
client
",
"
precommand
");
if
(
$precommand
[
0
])
{
# this is pure perl to eval!
my
$code
=
join
("",
@precommand
);
eval
$code
;
if
(
$@
)
{
print
"
perl:
$code
\n
";
print
"
precommand: $@
";
exit
;
}
}
if
(
$gdbthis
)
{
open
(
GDBCMD
,
"
>log/gdbcmd
");
...
...
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