Last-URL – A command line python tool to reveal redirecting URLs

I have put together a super simple tool to extract the last URL from a redirecting URL. Threat actors utilize redirections to deliver malicious payloads or hide phishing URLs. In some scenarios, the attackers would use URL shortening tools (such as to bypass detection algorithms in emails, SMS messages, or on web pages.

The tool is not available on my github page on this link:

It can be used in the command line to show the last URL as shown in this example:


Or to show the whole history of redirections (if the link redirects more than once):

python -h

If the URL contains “&” sign, you’ll need to put the URL in quotations

python -h ""

Let me know in the comments if you face any trouble using the tool, or you have suggestions for improvements.