Sitemap

Elite trick on GitHub to get all repos via inspect element / console at once

2 min readDec 18, 2023
Press enter or click to view image in full size
How to get all the git repo links off of one user without manual work!

Greetings,

After a nice gentleman posted that I was not helping that much by jumping around in my ideas and assuming people know what I am talking about, I will take a different approach.

Lets say you find a kick a$$ github repo, and you want all of the repos that the genius who made them has. Lets take this repo for example:

Press enter or click to view image in full size
User: testanull / gitrepo

Link: https:// github.com/testanull/ — Visit this (safe) link.

Right Click — Inspect / Console —

Press enter or click to view image in full size
Doesnt really matter which GUI browser your using

You can type at the > prompt

Press enter or click to view image in full size

Paste in the following:

(async () => { let username = location.pathname.split('/')[1]; let response = await fetch(`https://api.github.com/users/${username}/repos`); let repos = await response.json(); console.log(`Repositories for ${username}:`); repos.forEach(repo => console.log(repo.name, repo.html_url)); })();

It will detect the user and display the repos if it worked right:

Press enter or click to view image in full size
This should give you an idea of what is possible with console ;)

Hopefully this is straight to the point and helpful

subz

--

--

DJ SUBSTANCE
DJ SUBSTANCE

Written by DJ SUBSTANCE

twenty years professionally as a Network Engineer, more recently I have focused on red teaming mostly, but I am always up for learning and exchanging info

No responses yet