Translated ['src/pentesting-web/account-takeover.md'] to pt

This commit is contained in:
Translator 2025-04-20 14:58:02 +00:00
parent 115d580dda
commit 9b386a9577
2 changed files with 61 additions and 11 deletions

View File

@ -61,7 +61,7 @@ xss-cross-site-scripting/
## **Mesma Origem + Cookies** ## **Mesma Origem + Cookies**
Se você encontrar um XSS limitado ou uma tomada de subdomínio, você poderia brincar com os cookies (fixando-os, por exemplo) para tentar comprometer a conta da vítima: Se você encontrar um XSS limitado ou uma tomada de subdomínio, pode brincar com os cookies (fixando-os, por exemplo) para tentar comprometer a conta da vítima:
{{#ref}} {{#ref}}
hacking-with-cookies/ hacking-with-cookies/

View File

@ -471,16 +471,66 @@ window.search = window.search || {};
showResults(true); showResults(true);
} }
var branch = lang === "en" ? "master" : lang (async function loadSearchIndex(lang = window.lang || 'en') {
fetch(`https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/refs/heads/${branch}/searchindex.json`) /* ───────── paths ───────── */
.then(response => response.json()) const branch = lang === 'en' ? 'master' : lang;
.then(json => init(json)) const baseRemote = `https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/${branch}`;
.catch(error => { // Try to load searchindex.js if fetch failed const remoteJson = `${baseRemote}/searchindex.json`;
var script = document.createElement('script'); const remoteJs = `${baseRemote}/searchindex.js`;
script.src = `https://raw.githubusercontent.com/HackTricks-wiki/hacktricks/refs/heads/${branch}/searchindex.js`; const localJson = './searchindex.json';
script.onload = () => init(window.search); const localJs = './searchindex.js';
document.head.appendChild(script); const TIMEOUT_MS = 5_000;
});
/* ───────── helpers ───────── */
const fetchWithTimeout = (url, opt = {}) =>
Promise.race([
fetch(url, opt),
new Promise((_, r) => setTimeout(() => r(new Error('timeout')), TIMEOUT_MS))
]);
const loadScript = src =>
new Promise((resolve, reject) => {
const s = document.createElement('script');
s.src = src;
s.onload = resolve;
s.onerror = reject;
document.head.appendChild(s);
});
/* ───────── 1. remote JSON ───────── */
try {
const r = await fetchWithTimeout(remoteJson);
if (!r.ok) throw new Error(r.status);
return init(await r.json());
} catch (e) {
console.warn('Remote JSON failed →', e);
}
/* ───────── 2. remote JS ───────── */
try {
await loadScript(remoteJs);
return init(window.search);
} catch (e) {
console.warn('Remote JS failed →', e);
}
/* ───────── 3. local JSON ───────── */
try {
const r = await fetch(localJson);
if (!r.ok) throw new Error(r.status);
return init(await r.json());
} catch (e) {
console.warn('Local JSON failed →', e);
}
/* ───────── 4. local JS ───────── */
try {
await loadScript(localJs);
return init(window.search);
} catch (e) {
console.error('Local JS failed →', e);
}
})();
// Exported functions // Exported functions
search.hasFocus = hasFocus; search.hasFocus = hasFocus;