How to use CURL command to convert any short URL to a long URL

This tutorial will show you how to use the curl command to convert any short URL to a long URL.

How to use CURL command to convert any short URL to a long URL

The first thing to keep in mind is that while shortened URLs like bit.ly and goo.gl make it easy to fill in a web address quickly, it is impossible to know where the web browser will actually lead you. Shortened URLs can be used by cybercriminals to trick you into visiting dangerous websites or downloading malware. think twice before you click to protect yourself from cybercriminals. Only URLs from trusted senders should be clicked. If you're unsure, please use the below method to unshorten any short URL to a long URL.

Let's quickly jump into the tutorial.

First Method:-

Note: I don't recommend web-based short URLs that aren't shortened because they might record logs, and your shortened URL website might record private information.

1. Open any browser and go to https://urlex.org/; type or copy-paste the full URL, for example, https://bit.ly/Apollov

Web based unshorten any short URL to a long URL
2. The website https://urlex.org/ process the short URL to the complete URL. Click the clipboard copy icon or right-click to copy the full URL 

Full URL output:https://healthlibrary.askapollo.com/adult-vaccination-why-it-matters/?utm_source=CRM&utm_medium=SMS&utm_campaign=Adult+Vaccination.

Web based unshorten any short URL to a long URL output

Second Method or Hacker Mode:

Again, we are going to play with the curl command.

Let's get to the command prompt and use the Windows Command Prompt or a Linux Terminal to find out what your public IP address is.

I am using a Windows computer for demonstration.

1. Press the Win+R key on your keyboard.

How to open a run search bar win+R

2. In the RUN search box, type cmd and hit the enter key.

how to open command prompt

3. A black terminal box will open.

4. In the command prompt, the below command

Syntax: curl -vf [Your Shortened URL]

Examples:

curl -vf https://bit.ly/Apollov

curl -vf https://ref.vnetes.com/ccna

Screenshot:-

output of curl -vf https://bit.ly/Apollov

Some shortened URL doesn't show the location: to locate your full URL  example: curl -vf https://ref.vnetes.com/ccna scroll down into HTML content and analyze the URL to find the full URL[Refer to the second screenshot]


full URL  example: curl -vf https://ref.vnetes.com/ccna

full URL  example: curl -vf https://ref.vnetes.com/ccna html content

Note:- Curl should be installed by default on Linux computers, and for Windows, the curl command will be available on Windows 10 and later.

About CURL:-

A curl is a command-line tool that lets you transmit HTTP requests and receive responses from the command line or a shell script. It is available for Linux distributions, Mac OS X, and Windows. To use Curl to run your REST web API call, use the Curl command syntax to construct the command.

For more detailed documentation, please refer to the following documentation or use help command on cmd

C:\>curl --help

Usage: curl [options...] <url>

 -d, --data <data>          HTTP POST data

 -f, --fail                 Fail fast with no output on HTTP errors

 -h, --help <category>      Get help for commands

 -i, --include              Include protocol response headers in the output

 -o, --output <file>        Write to file instead of stdout

 -O, --remote-name          Write output to a file named as the remote file

 -s, --silent               Silent mode

 -T, --upload-file <file>   Transfer local FILE to destination

 -u, --user <user:password> Server user and password

 -A, --user-agent <name>    Send User-Agent <name> to server

 -v, --verbose              Make the operation more talkative

 -V, --version              Show version number and quit


This is not the full help, this menu is stripped into categories.

Use "--help category" to get an overview of all categories.

For all options use the manual or "--help all".


I hope this information is useful for you. Please forgive any typos or incomplete sentences.




Post a Comment (0)
Previous Post Next Post