Sitemap

The Shodan & FOFA Hack No One Wants You to Know About 👀

3 min readAug 1, 2025

💥 The Problem

  • Shodan limits non-members to just a couple of pages
  • FOFA restricts exports unless you have coins
  • Manual copy-pasting is slow and painful

I needed full access — fast, free, and on demand.

Press enter or click to view image in full size

🕳️ Shodan: The Hidden Endpoint

While inspecting traffic, I noticed something odd:

/search/facet
An endpoint quietly returning full result data without the usual pagination walls.

Once I spotted it, the rest was simple: extract everything using your browser.

Press enter or click to view image in full size

⚙️ How to Use It:

  1. Run your Shodan search
  2. Open DevTools → Console
  3. Paste this minified JS code:
const d=document.querySelectorAll('.facet-row .name a strong'),t=Array.from(d).map(e=>e.textContent.trim()).join('\n'),b=new Blob([t],{type:'text/plain'}),a=document.createElement('a');a.href=URL.createObjectURL(b);a.download='konan.txt';a.click();URL.revokeObjectURL(a.href);

✅ Instantly downloads the full set of domain data.

Press enter or click to view image in full size

⚔️ FOFA: Instant Export Without Coins

FOFA’s search UI is clean, but exporting data? Not so much.

So here’s a trick to grab every result link on the page in one shot.

⚙️ How to Use It:

  1. Run your FOFA query
  2. Set results to 50 per page
  3. Open DevTools → Console
  4. Paste this minified JS code:
var h=document.querySelectorAll('.hsxa-host'),r=[];h.forEach(e=>{e.querySelectorAll('a').forEach(a=>{if(a.href)r.push(a.href);})});var t=r.join('\n'),b=new Blob([t],{type:'text/plain'}),l=document.createElement('a');l.download='konan.txt';l.href=window.URL.createObjectURL(b);document.body.appendChild(l);l.click();document.body.removeChild(l);

⚡ Boom. Links from the entire page downloaded in seconds.

Repeat for each page and stitch the data together.

Press enter or click to view image in full size

📌 Key Takeaways

  • Shodan’s hidden endpoints leak full data with minimal effort
  • FOFA’s structured HTML makes scraping fast and easy
  • You don’t need to be rich — just resourceful

⚠️ Ethical Reminder

This guide is for educational and research purposes only.

  • Don’t abuse public platforms
  • Don’t violate ToS or scrape irresponsibly
  • Use your powers for good — not for spam or exploitation

🧘 Final Thoughts

In OSINT and recon, the biggest advantage isn’t paid tools — it’s knowing where to look and how to bend the rules (without breaking them).

Next time a platform locks your data behind coins or subscriptions?
Pop open DevTools and ask:

“What don’t they want me to see?”

--

--

KonaN
KonaN

Written by KonaN

Security Researcher | Pentester