-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwpvuln
executable file
·58 lines (49 loc) · 974 Bytes
/
wpvuln
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# query wpvuln db for vulnerabilities
function plugin
{
curl https://wpvulndb.com/api/v2/plugins/$1 2> /dev/null | \
python -m json.tool
}
function theme
{
curl https://wpvulndb.com/api/v2/themes/$1 2> /dev/null | \
python -m json.tool
}
function all
{
curl https://wpvulndb.com/api/v2/wordpresses/$1 2> /dev/null | \
python -m json.tool
}
function usage
{
echo """Usage: $(basename $0) <options> <plugin/theme/wpversion>
options:
--help display this help page
--plugin query api for a specific plugin
--theme query api for specific theme
--all retrieve all vulnerabilities in a specific wp version numberi"""
}
if [ -z $1 ]; then
usage
exit
elif [ $# -gt 2 ]; then
echo "too many arguments"
echo " "
usage
exit
fi
case "$1" in
'--help')
usage
;;
'--plugin')
plugin $2
;;
'--theme')
theme $2
;;
'--all')
all $2
;;
esac