Skip to content
Related Articles

Related Articles

Subjs – Fetches javascript file from a list of URLS or subdomains

View Discussion
Improve Article
Save Article
  • Last Updated : 01 May, 2022
View Discussion
Improve Article
Save Article

The web-based application is the collection of various hosted files like CSS, HTML, JS, etc. JS files are the core or essential files which can contain some secrets of the web application. Undocumented endpoints information is also crucial, and it can be available in the form of JS files. Subjs is an automated tool used to fetch the JavaScript files from the target domain. Subjs tool is an open-source and free-to-use tool. Subjs tool is designed and developed in the Golang language.

Note: As Subjs is a Golang language-based tool, so we need to have a Golang environment on our system. So check this link to Install Golang in our system. – Installation of Go Lang in Linux

Installation of Subjs Tool on Kali Linux

Step 1: If we have downloaded Golang to our system, verify the installation by checking the version of Golang, use the following command.

go version

 

Step 2: Open up our Kali Linux terminal and move to Desktop using the following command.

cd Desktop

 

Step 3: We are on the Desktop now creating a new directory called Subjs using the following command. In this directory, we will complete the installation of the Subjs tool.

mkdir Subjs

 

Step 4: Now switch to the Subjs directory using the following command.

cd Subjs

 

Step 5: Now we have to install the tool. We have to clone the tool from GitHub.

git clone https://github.com/lc/subjs.git

 

Step 6: The tool has been downloaded successfully in the Subjs directory. Now we will be listing out the files and directories using the ls command.

ls

 

Step 7: We can observe that there is a new directory created for the Subjs tool that has been generated while we were installing the tool. Navigate to the subjs directory using the cd command,

cd subjs

 

Step 8: List out the contents of the directory. Use the following command

ls

 

Step 9: Build the tool using the following command.

sudo go build

 

Step 10: Move the tool in /bin directory for quick usage from anywhere.

sudo mv subjs /usr/local/bin

 

Step 11: We are done with the installation. So now we will display the help page or help section of the tool.

subjs -h

 

Working with Subjs Tool on Kali Linux

Example 1: Simple Scan

echo "http://geeksforgeeks.org" | subjs

In this example, We are performing a simple Scan or Crawling scan on our target domain http://geeksforgeeks.org.

 

Example 2: Number of concurrent workers

echo "http://geeksforgeeks.org" | subjs -c 15

In this example, We are changing the concurrent worker’s value by using the -c tag.

 

Example 3: Timeout (in seconds) for HTTP client

echo "http://geeksforgeeks.org" | subjs -t 3

In this example, We are changing the timeout value by using the -t tag. We can see that we have specified a very less timeout value so we have not got any output. But In Example 1, We have got the output.

 

Example 4: Show version number

subjs -version

In this example, We will be printing the version of the Subjs tool using the -version tag.

 


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!