-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·152 lines (124 loc) · 5.84 KB
/
test.sh
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
a#!/bin/bash
router_ip='http://192.168.1.254'
username=$(grep -w 'username' credentials.txt | sed 's_username=__' )
echo "username = $username"
password=$(grep -w 'password' credentials.txt | sed 's_password=__' )
echo "password = $password"
#### open login page
curl 'http://192.168.1.254/' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4655.0 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Accept-Language: en-US,en;q=0.9' \
--compressed \
--insecure
<html>
<head>
<title>Oxygen Configuration</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Refresh" content="0;url=./user/page.pl">
</head>
<body>
</body>
</html>
curl 'http://192.168.1.254/user/page.pl' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4655.0 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Referer: http://192.168.1.254/' \
-H 'Accept-Language: en-US,en;q=0.9' \
--compressed \
--insecure
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Refresh" content=0;url=/cgi-bin/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Please <a href='/cgi-bin/'>click here</a> if your browser does not redirect you automatically
</body>
</html>%
curl -u user:user 'http://192.168.1.254/cgi-bin/' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4655.0 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Referer: http://192.168.1.254/user/page.pl' \
-H 'Accept-Language: en-US,en;q=0.9' \
--compressed \
--insecure
<html>
<head>
<title>Oxygen Configuration</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Refresh" content="0;url=./page.pl">
</head>
<body>
</body>
</html>
curl -c cookies.txt 'http://192.168.1.254/cgi-bin/page.pl' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Authorization: Basic dXNlcjp1c2Vy' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4655.0 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Referer: http://192.168.1.254/cgi-bin/' \
-H 'Accept-Language: en-US,en;q=0.9' \
--compressed
curl -b cookies.txt 'http://192.168.1.254/cgi-bin/page.pl?type=system' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Authorization: Basic dXNlcjp1c2Vy' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4655.0 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Referer: http://192.168.1.254/cgi-bin/page.pl?type=status&page=about' \
-H 'Accept-Language: en-US,en;q=0.9' \
--compressed \
--insecure
curl -b cookies.txt 'http://192.168.1.254/cgi-bin/page.pl?type=system&page=restart' \
-H 'Connection: keep-alive' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Authorization: Basic dXNlcjp1c2Vy' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4655.0 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Referer: http://192.168.1.254/cgi-bin/page.pl?type=system' \
-H 'Accept-Language: en-US,en;q=0.9' \
--compressed \
--insecure
curl -b cookies.txt 'http://192.168.1.254/cgi-bin/page.pl?type=system&page=restart&set_mode=1&redirect_url=/&redirect_keepalive=10' \
-X 'POST' \
-H 'Connection: keep-alive' \
-H 'Content-Length: 0' \
-H 'Pragma: no-cache' \
-H 'Cache-Control: no-cache' \
-H 'Authorization: Basic dXNlcjp1c2Vy' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'Origin: http://192.168.1.254' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4655.0 Safari/537.36' \
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Referer: http://192.168.1.254/cgi-bin/page.pl?type=system&page=restart' \
-H 'Accept-Language: en-US,en;q=0.9' \
--compressed