3.8 KiB
Debugging Client Side JS
Debugging Client Side JS
{% hint style="success" %}
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Check the subscription plans!
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @hacktricks_live.
- Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.
Kurekebisha JS upande wa mteja kunaweza kuwa shida kwa sababu kila wakati unabadilisha URL (ikiwemo mabadiliko katika vigezo vilivyotumika au thamani za vigezo) unahitaji kuweka upya breakpoint na kupakia tena ukurasa.
debugger;
Ikiwa utaweka mstari debugger;
ndani ya faili la JS, wakati browsa inatekeleza JS itasimamisha debugger mahali hapo. Hivyo, njia moja ya kuweka breakpoints za kudumu itakuwa kupakua faili zote kwenye kompyuta na kubadilisha kuweka breakpoints katika msimbo wa JS.
Overrides
Mabadiliko ya browsa yanaruhusu kuwa na nakala ya ndani ya msimbo ambayo itatekelezwa na kutekeleza hiyo badala ya ile kutoka kwa seva ya mbali.
Unaweza kufikia mabadiliko katika "Dev Tools" --> "Sources" --> "Overrides".
Unahitaji kuunda folda tupu ya ndani itakayotumika kuhifadhi mabadiliko, hivyo tengeneza tu folda mpya ya ndani na uweke kama mabadiliko katika ukurasa huo.
Kisha, katika "Dev Tools" --> "Sources" chagua faili unayotaka kubadilisha na kwa kubonyeza kulia chagua "Save for overrides".
Hii it nakala faili la JS kwenye kompyuta na utaweza kubadilisha nakala hiyo katika browsa. Hivyo ongeza tu amri debugger;
popote unapotaka, hifadhi mabadiliko na pakiwa tena ukurasa, na kila wakati unapoingia kwenye ukurasa huo wa wavuti nakala yako ya ndani ya JS itakuwa inapakuliwa na amri yako ya debugger itabaki mahali pake:
References
{% hint style="success" %}
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
Support HackTricks
- Check the subscription plans!
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @hacktricks_live.
- Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.