Katana - A Python Tool for Google Hacking - ByteScout
  • Home
  • /
  • Blog
  • /
  • Katana – A Python Tool for Google Hacking

Katana – A Python Tool for Google Hacking

There are numerous Python tools used for various purposes. Google hacking, often, called Google Dorking, is an information gathering method employed to apply state-of-the-art Google searching. This article is all about one such tool called Katana that can be used effectively for the Google hacking process. Let’s take a look at it in more detail.

What is Katana?

Katana is a straightforward python tool that delivers Google Hacking/Dorking commands and backs the browser Tor. The precept behind Katana is uncomplicated. Google ranks web pages and appropriate details linked with them. But often Google ranks more of the web page that is not discovered by a common user. The ranked web pages or other useful information can also include sensitive data. One can use such refined queries to find this information.

How to Install Katana and What is Its Usage?

To install Katana you can use the package manager pip to install the prerequisites. Fire the following command:

cd Katana
python3 -m pip install -r requirements.txt
python3 kds.py

Now its usage is given below:

cd Katana
python3 kds.py -h (for help)
Options :
-g :for google mode
-s :for scada mode
-t :for tor mode
-p :for proxy mode

The above command is displaying its usage and various modes. For example, there are four modes. The Katana has four modes like google mode, SCADA mode, tor mode, and proxy mode. Each mode can be used for different purposes of Dorking. The latest version is Katana-ds V1.5.3 and the new attributes are as follows:

  • No requirement to put the TLD in google Mode
  • No necessity to put the TLD in Scada Mode
  • More additional Scada Outcomes (after counting More additional dorks)
  • Partially fixed the HTTP Fallacies
  • Proxy Mode will exhibit 100 proxy servers each time.

Katana is actually a disseminated computational set that has been developed to deliver straightforward access to computational aids for parties operating with non-sensitive data. It includes around 6,000 CPU centers, 8 GPU calculating nodes (V100 and A100), and 6Pb of disk storage. Katana supplies an adaptable computing atmosphere where users can execute jobs that wouldn’t be viable or applicable on their desktop or laptop.

How to Use Different Modes?

Google Mode

Google mode presents 2 commands the “Dork” and the “TLD” (Top Level Domain) that delivers the power to explore distinct nations.

For example, com for Uk/ and much more.

Scada Mode

Scada mode hunt in google utilizes numerous submissions so the IP will be intercepted by Google so altering the TLD will fix the issue and the script supplies information for that.

Tor Mode

Tor mode offers users one command which is the search command, but prior to that, you should maintain a tor proxy executing on port 9050. In this case, there is no IP intercepting the command. Tor is a browser for hiding transmissions on the internet. Tor’s specialized technique is established on “onion routing,” in which transmissions on the internet are obscured via diverse and inconsistent routes.

Proxy Mode

A proxy mode is Katana intercedes relationships between two or more machines, working to improve both safety and solitude in the network. The proxy can either work as a trustworthy server executing particular software or as just an application executing on a common machine. There are numerous methods to set a proxy server, and an executive can utilize them to secure content to a network, cache information to improve transfer swiftness or evade filters. Proxy mode locates proxy servers and marks them. It will publish 25 various Proxy servers each time.

Python Search Path using Katana

Katana’s Python module quest course is set as given below, exiting the PYTHONPATH setting variable intact for child functions.

<Katana internal Python paths> :
PYTHONPATH and site customizations :

This permits Katana to start its conditions securely, bypassing unintentional loading of unsubstantiated modules. You may insert it to the quest course by utilizing Python site configurations or by configuring the KATANA_POST_ PYTHONPATH setting variable. Also, the KATANA_DEBUG_PRE_PYTHONPATH conditions is delivered, for debugging objectives only, as it may direct to unpredictable application demeanor due to non-supported modules packing in the area of the application.

When starting Katana, a momentary folder is constructed in the common directory of temporary files and folders. This is utilized to keep data, such as stashes for example, for the existing session. The title of the Katana temporary manual utilizes the following pattern:


The Katana temporary folder is created in the folder as constructed by the tempfile.gettempdir() function from the tempfile module in the Python Standard Library. You can bypass the folder by putting the TMPDIR setting variable in a particular file system area. Users can obtain the exact file system location that Katana uses through the KATANA_TMPDIR setting variable, which, when examined from within a functioning Katana session, may include values like the: /tmp/katana_tmpdir_24356

The batch mode in Katana permits users to generate a series of frames from a Katana set all at one time. It is created via a command line, where users define the file path, frame content, and any other required choices. Batch mode is reasonable if users hold a considerable number of frames to generate as it will yield out each separate file in the surroundings. Users can persist functioning on a Katana setting file whilst it is being batch generated as the command utilizes the latest committed version.

Before creating a batch, provide the render environments and the render banner is all configured accurately in Katana. To configure the render flag, pick the node you expect you generate from and press V on the keyboard. The render flag can be specified via the command line, yet, configuring it up early facilitates the string required to handle Batch mode and undervalues any room for mistake.

Katana applies renderers’ help for recursive procedures, where random location data can be produced on request. The Katana technique is to maintain one procedural that is strong enough to manage random creation and filtering. Basically, this is a procedural provided configurable schedule in the state of a tree-based definition of filters. In this way, Katana can be efficiently used for Google Dorking or hacking techniques.


About the Author

ByteScout Team ByteScout Team of Writers ByteScout has a team of professional writers proficient in different technical topics. We select the best writers to cover interesting and trending topics for our readers. We love developers and we hope our articles help you learn about programming and programmers.