Main Commands for Google Hacking
Below are the main commands we can use with Google. Keep in mind that all of them must be followed (without spaces) by the query you wish to perform:
define
- Displays definitions from web pages for the searched term.
filetype
- Restricts searches to pages whose names end with the specified term. Mainly used to determine the file extensions required. Note: the extcommand is used equivalently.
site
- Restricts results to those within the specified site or domain. Very useful for performing searches on sites that lack their own internal search engines.
link
- Shows pages that link to the URL defined. The quantity (and quality) of links to a page determines its relevance to search engines. Note: only pages with a PageRank of 5 or higher are displayed.
cache
- Displays the version of the page defined by the URL that Google has stored in its cache, i.e., the copy made by Google's crawler the last time it visited that page.
info
- Google presents information about the webpage corresponding to the URL.
related
- Google shows pages similar to the one specified by the URL. Note: it is difficult to understand what kind of relationship Google considers to display these pages. It is often not very useful.
allinanchor
- Google restricts searches to pages linked by anchor text containing the searched terms.
inanchor
- Restricts searches to pages linked by anchor text containing the specified term. Unlike allinanchor, this can be combined with regular search queries.
allintext
- Restricts searches to results that contain the terms in the page text.
intext
- Restricts results to those containing the term in the text. Unlike allintext, this can be combined with regular term searches.
allinurl
- Only presents results that contain the searched terms in the URL.
inurl
- Restricts results to those containing the term in the URL. Unlike allinurl, this can be combined with regular term searches.
allintitle
- Restricts results to those containing the terms in the title.
intitle
- Restricts results to documents containing the term in the title. Unlike allintitle, this can be combined with regular term searches.
Boolean Operators for Google Hacking
Google uses Boolean operators to perform combined searches of multiple terms. These operators are symbols recognized by Google that modify the search performed:
" " - Searches for exact phrases.
- - Excludes a word from the search. (e.g., gmail -hotmail
searches for pages where the word "gmail" appears, but "hotmail" does not).
OR (or |) - Searches for pages containing one term or another.
+ - Allows the inclusion of words that Google usually ignores due to their commonality (in Spanish: "de," "el," "la," etc.). It is also used to make Google distinguish accents, diaereses, and the letter "ñ," which it typically does not differentiate.
*** - Wildcard. Used to substitute a word. Often combined with the exact phrase operator (" "
).