Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
传
传输层实验之五: TCP连接器实现
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
计算机网络-协议实现
传输层实验之五
传输层实验之五: TCP连接器实现
Commits
879cf562
Commit
879cf562
authored
Jan 04, 2022
by
张三
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+x
parent
0dfa4b76
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
tests/webget_t.sh
tests/webget_t.sh
+7
-4
No files found.
tests/webget_t.sh
View file @
879cf562
#!/bin/bash
#!/bin/bash
WEB_HASH
=
`
./apps/webget cs144.keithw.org /hasher/xyzzy |
tee
/dev/stderr |
tail
-n
1
`
/headless/sponge/tun.sh start
/headless/sponge/tap.sh start
service apache2 start
service apache2 start
echo
"QWx0NhMPkoM/bJr/ohvHXlviFhOyYrYb+qqdOnwLYo4"
>
/var/www/html/xyzzy
echo
"QWx0NhMPkoM/bJr/ohvHXlviFhOyYrYb+qqdOnwLYo4"
>
/var/www/html/xyzzy
WEB_HASH
=
`
./apps/webget 1
69.254.1
0.1 /xyzzy |
tee
/dev/stderr |
tail
-n
1
`
WEB_HASH
=
`
./apps/webget 1
27.0.
0.1 /xyzzy |
tee
/dev/stderr |
tail
-n
1
`
CORRECT_HASH
=
"QWx0NhMPkoM/bJr/ohvHXlviFhOyYrYb+qqdOnwLYo4"
CORRECT_HASH
=
"QWx0NhMPkoM/bJr/ohvHXlviFhOyYrYb+qqdOnwLYo4"
if
[
"
${
WEB_HASH
}
"
!=
"
${
CORRECT_HASH
}
"
]
;
then
if
[
"
${
WEB_HASH
}
"
!=
"
${
CORRECT_HASH
}
"
]
;
then
\ No newline at end of file
echo
ERROR: webget returned output that did not match the
test
\'
s expectations
exit
1
fi
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment