File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 143
143
< input type ="text " id ="searchInput " placeholder ="Search within HackTricks... " />
144
144
< div class ="buttons ">
145
145
< button type ="submit " name ="engine " value ="bing "> Search with Bing</ button >
146
- < button type ="submit " name ="engine " value ="google "> Search with Google </ button >
146
+ < button type ="submit " name ="engine " value ="hacktricks "> Search inside HackTricks </ button >
147
147
</ div >
148
148
</ form >
149
149
@@ -155,10 +155,12 @@ <h1>
155
155
const filter = 'site:hacktricks.xyz' ;
156
156
157
157
let actionUrl ;
158
- if ( engine === 'google' ) {
159
- actionUrl = 'https://www.google.com/search' ;
158
+ if ( engine === 'hacktricks' ) {
159
+ actionUrl = 'https://book.hacktricks.wiki/en/index.html' ;
160
+ input_name = 'search' ;
160
161
} else {
161
162
actionUrl = 'https://www.bing.com/search' ;
163
+ input_name = 'q' ;
162
164
}
163
165
164
166
// Create a hidden form to submit to the appropriate engine
168
170
169
171
const input = document . createElement ( 'input' ) ;
170
172
input . type = 'hidden' ;
171
- input . name = 'q' ;
173
+ input . name = input_name ;
172
174
input . value = filter + ' ' + userQuery ;
173
175
form . appendChild ( input ) ;
174
176
You can’t perform that action at this time.
0 commit comments