Skip to content

Commit 5aa601b

Browse files
authored
Update index.html
1 parent 579b160 commit 5aa601b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

index.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ <h1>
143143
<input type="text" id="searchInput" placeholder="Search within HackTricks..." />
144144
<div class="buttons">
145145
<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>
147147
</div>
148148
</form>
149149

@@ -155,10 +155,12 @@ <h1>
155155
const filter = 'site:hacktricks.xyz';
156156

157157
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';
160161
} else {
161162
actionUrl = 'https://www.bing.com/search';
163+
input_name = 'q';
162164
}
163165

164166
// Create a hidden form to submit to the appropriate engine
@@ -168,7 +170,7 @@ <h1>
168170

169171
const input = document.createElement('input');
170172
input.type = 'hidden';
171-
input.name = 'q';
173+
input.name = input_name;
172174
input.value = filter + ' ' + userQuery;
173175
form.appendChild(input);
174176

0 commit comments

Comments
 (0)