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

DJ SUBSTANCE
2 min readDec 18, 2023

--

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:

User: testanull / gitrepo

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

Right Click — Inspect / Console —

Doesnt really matter which GUI browser your using

You can type at the > prompt

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:

This should give you an idea of what is possible with console ;)

Hopefully this is straight to the point and helpful

subz

--

--

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