Skip to content

Commit

Permalink
Set HTTP port, rename host to httpd, add http to the list of suppport…
Browse files Browse the repository at this point in the history
…ed protocol
  • Loading branch information
vpereira committed Nov 26, 2023
1 parent 989c1fd commit 8321123
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ services:
- tail
- -f
- /dev/null
http_basic_auth:
httpd:
build: docker/http_basic_auth
ports:
- "8881:8881"
- "80:80"
- "443:443"
ssh:
build: docker/ssh
ports:
Expand Down
2 changes: 1 addition & 1 deletion docker/http_basic_auth/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ events {}

http {
server {
listen 8881;
listen 80;
location / {
auth_basic "Restricted Content";
auth_basic_user_file /etc/nginx/.htpasswd;
Expand Down
2 changes: 2 additions & 0 deletions internal/util/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ var supportedProtocols = map[string]int{
"imap": 143,
"pop3s": 995,
"imaps": 993,
"http": 80,
"https": 443,
}

// PrintSupportedProtocols can be improved
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_invalid_parameters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ echo "Invalid set of arguments"
$BRUCUTU -u pop3://localhost -L samples/users.txt -l foo -p bar && exit 1

echo "False user and password for http basic auth"
$BRUCUTU -u http://http_basic_auth -l foo -p XXXX && exit 1
$BRUCUTU -u http://httpd -l foo -p XXXX && exit 1

exit 0
2 changes: 1 addition & 1 deletion scripts/test_valid_use_cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ $BRUCUTU -u ssh://ssh -a 2222 -l root -p superpassword || exit -1
$BRUCUTU -u ssh://ssh -a 2222 -L samples/users.txt -P samples/passwd.txt || exit -1
$BRUCUTU -u pop3://email -l foo -p thepassword || exit -1
$BRUCUTU -u pop3://email -L samples/users.txt -P samples/passwd.txt || exit -1
$BRUCUTU -u http://http_basic_auth -l foo -p bar || exit -1
$BRUCUTU -u http://httpd -l foo -p bar || exit -1

exit 0

0 comments on commit 8321123

Please sign in to comment.