Git.io is the URL Shortener provided by GitHub, which can only be used to shorten GitHub URLs (gist.github.com and github.com)…or it supposed to be.
With some simple tricks you can create a shortened link with any URL you want.
- Visit https://git.io/
- Press F12, navigate to “Console”
- Enter the following code
var mylink=new FormData();
- Replace the url and YourCustomPath, remember to use “\\” to replace “/”
- Run the code, if it does not return any error, you have succeeded!
Here is how it works.
- The git.io parser recognizes “github.com” as host and the “qwq.moe\\tag\\about\\\u0000AnythingHere” as HTTP Basic Auth credentials
- So github.com is a valid github URL
- Git.io insert “https://qwq.moe\\tag\\about\\\u0000AnythingHere@github.com"- “YourCustomPath” into the database
- When you visit this page, gitio tries to return this URL as the redirect path
- But \u0000 in the URL truncated the following characters
- Now you are being redirected to https://qwq.moe\tag\about\
Enjoy it :)