Run the downloaded file by double clicking (you need to have virtual machine ).

3. Anonymity when checking the site for SQL injections

Setting up Tor and Privoxy in Kali Linux

[Section under development]

Setting up Tor and Privoxy on Windows

[Section under development]

jSQL Injection proxy settings

[Section under development]

4. Checking the site for SQL injection with jSQL Injection

Working with the program is extremely simple. Just enter the site address and press ENTER.

The following screenshot shows that the site is vulnerable to three types of SQL injections at once (information about them is indicated in the lower right corner). By clicking on the names of the injections, you can switch the method used:

Also, we have already displayed the existing databases.

You can see the contents of each table:

Usually, the most interesting part of the tables is the administrator credentials.

If you are lucky and you found the administrator's data, then it's too early to rejoice. You also need to find the admin panel, where to enter these data.

5. Search for admins with jSQL Injection

To do this, go to the next tab. Here we are met by a list of possible addresses. You can select one or more pages to check:

The convenience is that you do not need to use other programs.

Unfortunately, there are not very many careless programmers who store passwords in clear text. Quite often in the password string we see something like

8743b52063cd84097a65d1633f5c74f5

This is a hash. You can decrypt it with brute force. And… jSQL Injection has a built-in brute-forcer.

6. Brute-forcing hashes with jSQL Injection

Undoubted convenience is that you do not need to look for other programs. There is support for many of the most popular hashes.

This is not the best option. In order to become a guru in deciphering hashes, the book "" in Russian is recommended.

But, of course, when there is no other program at hand or there is no time to study, jSQL Injection with a built-in brute-force function will come in handy.

There are settings: you can set which characters are included in the password, the password length range.

7. File operations after SQL injection detection

In addition to operations with databases - reading and modifying them, if SQL injections are detected, the following file operations can be performed:

  • reading files on the server
  • uploading new files to the server
  • uploading shells to the server

And all this is implemented in jSQL Injection!

There are limitations - the SQL server must have file privileges. Reasonable system administrators they are disabled and access to file system cannot be obtained.

The presence of file privileges is easy enough to check. Go to one of the tabs (reading files, creating a shell, uploading a new file) and try to perform one of the indicated operations.

Another very important note - we need to know the exact absolute path to the file with which we will work - otherwise nothing will work.

Look at the following screenshot:

Any attempt to operate on a file is answered by: No FILE privilege(no file privileges). And nothing can be done here.

If instead you have another error:

Problem writing into [directory_name]

This means that you incorrectly specified the absolute path where you want to write the file.

In order to assume an absolute path, one must at least know operating system on which the server is running. To do this, switch to the Network tab.

Such an entry (string Win64) gives us reason to assume that we are dealing with Windows OS:

Keep-Alive: timeout=5, max=99 Server: Apache/2.4.17 (Win64) PHP/7.0.0RC6 Connection: Keep-Alive Method: HTTP/1.1 200 OK Content-Length: 353 Date: Fri, 11 Dec 2015 11:48:31 GMT X-Powered-By: PHP/7.0.0RC6 Content-Type: text/html; charset=UTF-8

Here we have some Unix (*BSD, Linux):

Transfer-Encoding: chunked Date: Fri, 11 Dec 2015 11:57:02 GMT Method: HTTP/1.1 200 OK Keep-Alive: timeout=3, max=100 Connection: keep-alive Content-Type: text/html X- Powered-By: PHP/5.3.29 Server: Apache/2.2.31 (Unix)

And here we have CentOS:

Method: HTTP/1.1 200 OK Expires: Thu, 19 Nov 1981 08:52:00 GMT Set-Cookie: PHPSESSID=9p60gtunrv7g41iurr814h9rd0; path=/ Connection: keep-alive X-Cache-Lookup: MISS from t1.hoster.ru:6666 Server: Apache/2.2.15 (CentOS) X-Powered-By: PHP/5.4.37 X-Cache: MISS from t1.hoster.ru Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Date: Fri, 11 Dec 2015 12:08:54 GMT Transfer-Encoding: chunked Content-Type: text/html; charset=WINDOWS-1251

On Windows, a typical site folder is C:\Server\data\htdocs\. But, in fact, if someone "thought" of making a server on Windows, then, very likely, this person has not heard anything about privileges. Therefore, you should start trying directly from the C: / Windows / directory:

As you can see, everything went perfectly the first time.

But the jSQL Injection shells themselves raise my doubts. If you have file privileges, then you may well upload something with a web interface.

8. Bulk checking sites for SQL injections

And even jSQL Injection has this feature. Everything is extremely simple - upload a list of sites (can be imported from a file), select those that you want to check and click the appropriate button to start the operation.

Output by jSQL Injection

jSQL Injection is a good, powerful tool for finding and then using SQL injections found on sites. Its undoubted advantages: ease of use, built-in related functions. jSQL Injection can be a beginner's best friend when analyzing websites.

Of the shortcomings, I would note the impossibility of editing databases (at least I did not find this functionality). As with all tools with a graphical interface, the inability to use in scripts can be attributed to the disadvantages of this program. Nevertheless, some automation is possible in this program too - thanks to the built-in mass site check function.

jSQL Injection is much more convenient to use than sqlmap . But sqlmap supports more kinds of SQL injection, has file firewall options, and some other features.

Bottom line: jSQL Injection - best friend novice hacker.

You can find help for this program in the Kali Linux Encyclopedia on this page: http://kali.tools/?p=706

This time I will try to tell you what dorks should not be. Since you often have to work with clients whose dorks look completely crazy. And after talking a little, it turns out that they also paid for these dorks. Infuriates, in general) I myself, out of my own stupidity, bought Dorks, both for 300 rubles and for 20 rubles. But I have not yet met a competent person who will make dorks that will be good and the search engine will give out what I need from them. Not trying to offend anyone, and then just a personal opinion. First, before buying, always ask for 10-15 roads to check, just visually evaluate them. I hope after this guide you will be able to identify more or less sharpened dorks for your request from those that cannot even be called public. Go! It's easier for me to work with examples, so I'll try to jot down a list of "game" roads that sometimes come across, and tell you what to look for:
Code: mistake.php?gta_5= frame

Parsing the dork into parts: mistake.php - here, it is assumed that this word should be present in the link. In fact, it's a little different. In order for a word to be present in the link, it must be applied to the inurl: or allinurl operator:

Suppose we come across some links with this word. But, it is this part (judging by the dork) that should refer to the title of the page. I don't know what coder would make the mistake.php page on their gaming site. Certainly, there will be. But it will be a very small percentage.

As for me, the page should be more or less with a popular name used by php coders. A couple more pages that are not desirable in dorks (often dork sellers use random words): Code: gta5.php - no one will call the page farcry_primal.php farcry_primal.cfm - the .cfm extension is used in ASP.NET, yes, on it they write, but not as often as in php. And to run into a page with this name, it's a great success kramble.php how_to_work.php catch "in.php - special characters should not be in the page name jzooo.php - in general, understand what the hell is this page game_of_trone.php - a rare page , + does not apply to games, but most likely to the title of the movie I hope you understand the approximate logic.

The page should have a logical title, this is the main thing. It doesn't really matter if the title has something related to the gaming theme or not. Which pages are mainly used by coders, and in general the more popular ones that can be used in dorks:

Index.php
private.php
pm.php
user.php
members.php
area.php
config.php
search.php
redirect.php
r.php (same redirect)
s.php (same search)
mail.php forum.php
post.php account.php
exit.php
query.php
q.php (same query), etc.

More or less like this.

The name of the page in the dork (if any) should be monosyllabic, convenient for use on the site, and carry some kind of logical connotation. It's not scary that we don't have names like steam.php or steam_keys.php or roulette.php here, it's important for us to find more links. And the more often a query word is used on websites, the better. More or less necessary for us on the subject, we will select with the help of the rest of the dork We figured out the names of the pages, but this is not the most important thing.

Let's move on to the second part.

Meet this GET request: ?gta_5 - I must say right away that there are no such requests. (I remind you that this is my personal opinion) GET request, ideally, which we need, should contact the database, and in the case SQL injection, cause an output error from the database. This is what we need. However, finding a request that would be called gta_5 - again, great luck. And if we find him, we need to make him vulnerable. This again discards most of the links we are interested in. A couple more examples of bad, not good requests:

Groove=
?paypal=
?qiwi_wallet=
?my_money=
?dai_webmoney=
?skdoooze=
?sadlkjadlkjswq=
?213123=
?777=

Why is paypal a bad request? Because it is assumed that with this request we want to access the database with a paypal selection. No one keeps the paypal database, except perhaps for the company itself. Again, I'm cheating.

Examples of good queries, good ones that everyone loves to use because they are short, convenient, easy to remember, and have at least some logic:
?id=
?cat=
?cat_id=
?get=
?post=
?frame=
?r=
?redirect= (you get the idea)
?banner=
?go=
?leave=
?login=
?pass=
?password=
?username=
?user=
?search=
?s=
?wallet=
?acc=
?balance=
?do=
?page=
?page_id=
?topic=
?forum=
?thread=
?download=
?free=
?message=
Of course, you can continue indefinitely.
But these are universal requests that can perfectly suit mix dorks, gaming, cash, and any other. We will come across forums, torrent sites, and everything else. For example, a couple of queries that may come in handy, let's say for game queries:
?game=
?game_id=
?battle=
?log=
?team=
?weapon=
?inv= (inventory)
?gamedata=
?player=
?players=
?play= (came across sites with video clips)
?playtag=
?match=

Approximately the same query logic should be applied to other topics, ideally. At least you need to understand English a little, and realize what dorks you buy. In general, it is enough to look at 10-20 doors and it will immediately become clear what kind of mega privat you bought, and whether it is worth contacting this seller in the future. Or in general, to make a refund through black, if you see that your dorks contain sex.php? or? photo= and you ordered dorks for shops. Hands under the train to such figures

And so, finally, the most important part of the dork (which is sometimes absent altogether). If we have just considered the name of the GET request (not the request itself), now we are just moving on to the request, which can help us find exactly what we need. From our test dork, this is the part - frame

I won’t say that this is a bad request, but given that we are looking for gaming sites, the effectiveness of such a request is about 15-20%. For a mix of roads, or just for the number of links (just to merge something), it will do. The name of the request can include, as many dork tutorials and manuals correctly say, any words related to our topic. We will not deviate from game requests, so I will give an example of good, suitable requests for games:
game
gaming
exp
player
level
players
dota
counter-strike
AWP | Aziimov
M19
NAVI
play free
free games
download game
game forum
about game
screenshot game
game guide

It should be clear what the theme of your roads is. If you have something like the following in the purchased dorks (and we bought game dorks): Code: watch freedom text dsadaswe 213123321 ledy gaga fuck america bla bla girl tits free XXX porn futurama s01e13 Then again, feel free to send the seller's nafik and throw out your dorks. You can’t see gaming sites :) One more thing, with these requests you can use the operators - intitle: , allintitle: , intext: , allintext: Where, after the colon, there will be the game request itself from the list a little higher (intitle: game, allintext: play free )

It seems to be everything that I wanted to convey. Basically, I hope the article will be useful at least somehow for beginners (it would be useful for me and help save a few hundred rubles, and help put in place dishonest sellers dorok). Well, if you more or less understood how to make dorks yourself, I will only be happy. Train, fill your eye / hand, there is nothing particularly complicated in the dorks. And lastly, I don’t know how in the dumper, but the a-parser calmly eats and looks for many links with requests in Russian. Why not, I thought. Tested, the effect pleased me. You can laugh))

Frame.php?name= free games
get.php?query= download cs
search.php?ok= game servers

Any search for vulnerabilities on web resources begins with reconnaissance and information gathering.
Intelligence can be either active - brute force of files and directories of the site, launching vulnerability scanners, manually viewing the site, or passive - searching for information in different search engines. Sometimes it happens that a vulnerability becomes known even before the opening of the first page of the site.

How is this possible?
Search robots, constantly roaming the Internet, in addition to information useful to an ordinary user, often fix what can be used by attackers when attacking a web resource. For example, script errors and files with sensitive information (from configuration files and logs to files with authentication data and database backups).
From the point of view of a search robot, an sql query execution error message is plain text, inseparable, for example, from the description of the goods on the page. If suddenly the search robot stumbled upon a file with the .sql extension, which for some reason ended up in working folder site, it will be treated as part of the content of the site and will also be indexed (including, possibly, the passwords specified in it).

Such information can be found by knowing strong, often unique, keywords that help separate "vulnerable pages" from pages that do not contain vulnerabilities.
Huge database of special requests using keywords(so-called dorks) exists at exploit-db.com and is known as the Google Hack Database.

Why google?
Dorks are targeted primarily at google for two reasons:
− the most flexible syntax for keywords (given in Table 1) and special characters (given in Table 2);
- the google index is still more complete than that of other search engines;

Table 1 - Key google keywords

Keyword
Meaning
Example
site
Search only on the specified site. Considers only url
site:somesite.ru - finds all pages on the given domain and subdomains
inurl
Search by words present in uri. Unlike cl. words “site”, searches for matches after the site name
inurl:news - finds all pages where the given word occurs in the uri
intext
Search in the body of the page
intext:"traffic" - completely similar to the usual query "traffic"
title
Search in the title of the page. Text between tags <br></td> <td width="214">intitle:”index of” - finds all pages with a directory listing <br></td> </tr><tr><td width="214">ext <br></td> <td width="214">Search for pages with the specified extension <br></td> <td width="214">ext:pdf - finds all pdf files <br></td> </tr><tr><td width="214">filetype <br></td> <td width="214">At present, it is completely analogous to class. the word "ext" <br></td> <td width="214">filetype:pdf - similar <br></td> </tr><tr><td width="214">related <br></td> <td width="214">Search for sites with similar topics <br></td> <td width="214">related:google.ru - will show its analogues <br></td> </tr><tr><td width="214">link <br></td> <td width="214">Search for sites that link to this <br></td> <td width="214">link:somesite.ru - finds all sites that have a link to this <br></td> </tr><tr><td width="214">define <br></td> <td width="214">Show word definition <br></td> <td width="214">define:0day - definition of the term <br></td> </tr><tr><td width="214">cache <br></td> <td width="214">Show cached page content (if available) <br></td> <td width="214">cache:google.com - open page from cache <br></td> </tr></tbody></table><p>Table 2 - Google Query Special Characters <br></p><table><tbody><tr><td width="214"><b>Symbol</b><br></td> <td width="214"><b>Meaning</b><br></td> <td width="214"><b>Example</b><br></td> </tr><tr><td width="214">“<br></td> <td width="214">Exact Phrase <br></td> <td width="214">intitle:"RouterOS router configuration page" - search for routers <br></td> </tr><tr><td width="214">*<br></td> <td width="214">Any text <br></td> <td width="214">inurl:"bitrix*mcart" - search for sites on bitrix with a vulnerable mcart module <br></td> </tr><tr><td width="214">.<br></td> <td width="214">Any character <br></td> <td width="214">Index.of - similar to the index of query <br></td> </tr><tr><td width="214">-<br></td> <td width="214">Delete word <br></td> <td width="214">error -warning - show all pages with error but no warning <br></td> </tr><tr><td width="214">..<br></td> <td width="214">Range <br></td> <td width="214">cve 2006..2016 - show vulnerabilities by year starting from 2006 <br></td> </tr><tr><td width="214">|<br></td> <td width="214">Logical "or" <br></td> <td width="214">linux | windows - show pages where either the first or second word occurs <br></td> </tr></tbody></table><br>It should be understood that any request to a search engine is a search only by words. <br>It is useless to look for meta-characters on the page (quotes, brackets, punctuation marks, etc.). Even searching for an exact phrase in quotation marks is a word search, followed by an exact match already in the results. <p>All <a href="https://bar812.ru/en/trans-intitle-vse-publikacii-polzovatelya-guglohaking-poisk-kriticheskoi-informacii-s-pomoshchyu-googl.html">Google dorks</a> Hack Database are logically divided into 14 categories and are presented in Table 3. <br>Table 3 - Google Hack Database Categories <br></p><table><tbody><tr><td width="168"><b>Category</b><br></td> <td width="190"><b>What makes it possible to find</b><br></td> <td width="284"><b>Example</b><br></td> </tr><tr><td width="168">footholds <br></td> <td width="190">Web shells, public file managers <br></td> <td width="284">Find all hacked sites containing the listed webshells: <br>(intitle:"phpshell" OR intitle:"c99shell" OR intitle:"r57shell" OR intitle:"PHP Shell" OR intitle:"phpRemoteView") `rwx` "uname" <br></td> </tr><tr><td width="168">Files containing usernames <br></td> <td width="190">registry files, <a href="https://bar812.ru/en/kak-sozdat-cd-rom-razdel-na-fleshke-pereproshivka-fleshki-v-dvd-privod-so.html">configuration files</a>, logs, files containing the history of entered commands <br></td> <td width="284">Find all registry files containing account information: <br><i>filetype:reg reg +intext:"internet account manager"</i><br></td> </tr><tr><td width="168">Sensitive Directories <br></td> <td width="190">Directories with various information (personal documents, vpn configs, hidden repositories, etc.) <br></td> <td width="284">Find all directory listings containing files related to vpn: <br><i>"Config" intitle:"Index of" intext:vpn</i><br>Sites containing git repositories: <br><i>(intext:"index of /.git") ("parent directory")</i><br></td> </tr><tr><td width="168">Web Server Detection <br></td> <td width="190">Version and other information about the web server <br></td> <td width="284">Find the administrative consoles of the JBoss server: <br><i>inurl:"/web-console/" intitle:"Administration Console"</i><br></td> </tr><tr><td width="168">Vulnerable Files <br></td> <td width="190">Scripts containing known vulnerabilities <br></td> <td width="284">Find sites that use a script that allows you to upload an arbitrary file from the server: <br><i>allinurl:forcedownload.php?file=</i><br></td> </tr><tr><td width="168">Vulnerable Servers <br></td> <td width="190">Installation scripts, web shells, open administrative consoles, etc. <br></td> <td width="284">Find open PHPMyAdmin consoles run as root: <br><i>intitle:phpMyAdmin "Welcome to phpMyAdmin ***" "running on * as root@*"</i><br></td> </tr><tr><td width="168">error messages <br></td> <td width="190">Various errors and warnings often revealing <a href="https://bar812.ru/en/programma-dlya-vosstanovleniya-formatirovannyh-dannyh-chto-delat-esli.html">important information</a>- from CMS version to passwords <br></td> <td width="284">Sites with errors in executing sql queries to the database: <br><i>"Warning: mysql_query()" "invalid query"</i><br></td> </tr><tr><td width="168">Files containing juicy info <br></td> <td width="190">Certificates, backups, emails, logs, sql scripts, etc. <br></td> <td width="284">Find initialization sql scripts: <br><i>filetype:sql and " <a href="https://bar812.ru/en/sql-zaprosy-insert-sql-zapros-insert-into-napolnit-bazu-dannyh-informaciei.html">insert into</a>-site:github.com</i><br></td> </tr><tr><td width="168">Files containing passwords <br></td> <td width="190">Everything that can contain passwords - logs, sql scripts, etc. <br></td> <td width="284">Logs mentioning passwords: <br><i>filetype:</i><i>log</i><i>intext:</i><i>password |</i><i>pass |</i><i>pw</i><br>sql scripts containing passwords: <br><i>ext:</i><i>sql</i><i>intext:</i><i>username</i><i>intext:</i><i>password</i><br></td> </tr><tr><td width="168">Sensitive Online Shopping Info <br></td> <td width="190">Information related to online shopping <br></td> <td width="284">Find pincodes: <br><i>dcid=</i><i>bn=</i><i>pin</i><i>code=</i><br></td> </tr><tr><td width="168">Network or vulnerability data <br></td> <td width="190">Information that is not directly related to the web resource, but affects the network or other non-web services <br></td> <td width="284">Find scripts <a href="https://bar812.ru/en/avtomaticheskaya-nastroika-pk-setevye-nastroiki-otklyuchenie-parkovki.html">auto tuning</a> proxies containing information about the internal network: <br><i>inurl:proxy | inurl:wpad ext:pac | ext:dat findproxyforurl</i><br></td> </tr><tr><td width="168">Pages containing portals <br></td> <td width="190">Pages containing login forms <br></td> <td width="284">saplogon webpages: <br><i>intext:"2016 SAP AG. All rights reserved.” intitle:"login"</i><br></td> </tr><tr><td width="168">Various Online Devices <br></td> <td width="190">Printers, routers, monitoring systems, etc. <br></td> <td width="284">Find the printer configuration panel: <br><i>title:"</i><i>hp</i><i>laserjet"</i><i>inurl:</i><i>SSI/</i><i>Auth/</i><i>set_</i><i>config_</i><i>deviceinfo.</i><i>htm</i><br></td> </tr><tr><td width="168">Advisories and Vulnerabilities <br></td> <td width="190">Sites on vulnerable versions of CMS <br></td> <td width="284">Find vulnerable plugins through which you can upload an arbitrary file to the server: <br><i>inurl:fckeditor -intext:"ConfigIsEnabled = False" intext:ConfigIsEnabled</i><br></td> </tr></tbody></table><br>Dorks are more often focused on searching all sites on the Internet. But nothing prevents you from limiting the search area on any site or sites. <br>Each request to google can be focused on a specific site by adding the keyword "site:somesite.com" to the request. This keyword can be appended to any dork. <p><b>Vulnerability Search Automation</b><br>So the idea was born to write a simple utility that automates the search for vulnerabilities using <a href="https://bar812.ru/en/poiskovye-sistemy-rossii-i-lidiruyushchie-poiskoviki-interneta-kakaya.html">search engine</a>(google) and based on the Google Hack Database.</p><p>The utility is a script written in nodejs using phantomjs. To be precise, the script is interpreted by phantomjs itself. <br>Phantomjs is a complete web browser without <a href="https://bar812.ru/en/v-prilozhenii-graficheskii-interfeis-sistemy-proizoshla-oshibka.html">GUI</a>, managed using js code and having a convenient API. <br>The utility received a quite understandable name - dorks. Launching it in <a href="https://bar812.ru/en/kak-zapustit-exe-fail-s-parametrami-kak-zapustit-programmu-s.html">command line</a>(without options) we get a short help with a few examples of use:</p><p>Figure 1 - List of basic dorks options</p><p>The general syntax of the utility is: dork "command" "list of options". <br>A detailed description of all options is presented in Table 4.</p><p>Table 4 - Syntax dorks <br></p><table border="1"><tbody><tr><td width="214"><b>Team</b><br></td> <td width="214"><b>Option</b><br></td> <td width="214"><b>Description</b><br></td> </tr><tr><td rowspan="4" width="214">ghdb <br></td> <td width="214">-l <br></td> <td width="214">Display numbered list of dork categories Google Hack Database <br></td> </tr><tr><td width="214">-c "category number or name" <br></td> <td width="214">Download dorks of the specified category by number or name <br></td> </tr><tr><td width="214">-q "phrase" <br></td> <td width="214">Download dorks found on request <br></td> </tr><tr><td width="214">-o "file" <br></td> <td width="214">Save result to file (only with -c|-q options) <br></td> </tr><tr><td rowspan="8" width="214">google <br></td> <td width="214">-d "dork" <br></td> <td width="214">Specify arbitrary dork (option can be used many times, combination with -D option is allowed) <br></td> </tr><tr><td width="214">-D "file" <br></td> <td width="214">Use dorks from a file <br></td> </tr><tr><td width="214">-s "site" <br></td> <td width="214">Set site (option can be used multiple times, combination with -S option is allowed) <br></td> </tr><tr><td width="214">-S "file" <br></td> <td width="214">Use sites from a file (dorks will be searched for each site independently) <br></td> </tr><tr><td width="214">-f "filter" <br></td> <td width="214">Set additional keywords (will be added to each dork) <br></td> </tr><tr><td width="214">-t "number of ms" <br></td> <td width="214">Interval between requests to google <br></td> </tr><tr><td width="214">-T "number of ms" <br></td> <td width="214">Timeout if captcha encountered <br></td> </tr><tr><td width="214">-o "file" <br></td> <td width="214">Save the result to a file (only those dorks for which something was found will be saved) <br></td> </tr></tbody></table><br>Using the ghdb command, you can get all the dorks from exploit-db on an arbitrary request, or specify the entire category. If you specify category 0, then the entire database will be unloaded (about 4.5 thousand dorks). <p>List of categories available on <a href="https://bar812.ru/en/podrobnyi-obzor-i-testirovanie-apple-iphone-se-apple-iphone-se-2017-dizain.html">this moment</a> shown in Figure 2. <br><br><img src='https://i2.wp.com/habrastorage.org/getpro/habr/post_images/b8f/b11/ffe/b8fb11ffeaced5066fd2fd9e43be67fb.jpg' width="100%" loading=lazy loading=lazy></p><p>Figure 2 - List of available categories of GHDB dorks</p><p>The google command will substitute each dork in <a href="https://bar812.ru/en/yandeks-pipl-mgnovennyi-poisk-lyudei-po-vsem-socsetyam-srazu-shest.html">google search engine</a> and analyzed the result for matches. Dorks for which something was found will be saved to a file. <br>The utility supports <a href="https://bar812.ru/en/vhod-v-rekaveri-android-kak-pereiti-v-rezhim-recovery-na-raznyh-android-ustroistvah.html">different modes</a> search: <br>1 dork and 1 site; <br>1 dork and many sites; <br>1 site and many dorks; <br>many sites and many dorks; <br>The list of dorks and sites can be specified both through an argument and through a file.</p><p><b>Demonstration of work</b><br>Let's try to look for any vulnerabilities using the example of searching for error messages. The command: dorks ghdb –c 7 –o errors.dorks will load all known dorks of the “Error Messages” category as shown in Figure 3. <br><br><img src='https://i1.wp.com/habrastorage.org/getpro/habr/post_images/28c/386/641/28c386641d1528652f7f8e8b8089097a.jpg' width="100%" loading=lazy loading=lazy><br>Figure 3 - Loading all known dorks of the “Error Messages” category</p><p>Dorks loaded and saved to a file. Now it remains to "set" them on some site (see Figure 4). <br><br><img src='https://i2.wp.com/habrastorage.org/getpro/habr/post_images/8e0/a8a/3af/8e0a8a3af4f26544da1faa584813dbff.jpg' width="100%" loading=lazy loading=lazy><br>Figure 4 - Search for vulnerabilities of the site of interest in the google cache</p><p>After some time, several pages containing errors are found on the site under study (see Figure 5).</p><p><img src='https://i0.wp.com/habrastorage.org/getpro/habr/post_images/10b/e83/ba3/10be83ba38f172213ba06b3f9ad05a58.jpg' width="100%" loading=lazy loading=lazy><br>Figure 5 - Found error messages</p><p>The result, in the file result.txt we get <a href="https://bar812.ru/en/polnyi-spisok-ussd-zaprosov-dlya-abonentov-a1-velcom-poryadok-predostavleniya.html">full list</a> dorks leading to the error. <br>Figure 6 shows the result of searching for site errors. <br><br>Figure 6 - The result of the search for errors</p><p>In the cache for this dork, a full backtrace is displayed, revealing the absolute paths of the scripts, the content management system of the site, and the type of database (see Figure 7). <br><br><img src='https://i0.wp.com/habrastorage.org/getpro/habr/post_images/0a9/455/588/0a9455588496d6609f5e13d598cb5a48.jpg' width="100%" loading=lazy loading=lazy><br>Figure 7 - disclosure of information about the site structure</p><p>However, it should be borne in mind that not all dorks from GHDB give a true result. Also, google may not find an exact match and show a similar result.</p><p>In this case, it is wiser to use your personal list of dorks. For example, it is always worth looking for files with “unusual” extensions, examples of which are shown in Figure 8. <br><br><img src='https://i1.wp.com/habrastorage.org/getpro/habr/post_images/d7f/865/693/d7f865693f7fcf13137598eeed0ecb58.jpg' width="100%" loading=lazy loading=lazy><br>Figure 8 - List of file extensions that are not typical for a regular web resource</p><p>As a result, at the command dorks google -D extensions.txt -f bank, from the very first request, google starts returning sites with "unusual" file extensions (see Figure 9). <br><br><img src='https://i1.wp.com/habrastorage.org/getpro/habr/post_images/107/e1f/a2f/107e1fa2f41c4169bcc254cba2f2f4b6.jpg' width="100%" loading=lazy loading=lazy><br>Figure 9 - Search for "bad" file types on banking sites</p><p>Keep in mind that Google does not accept requests longer than 32 words.</p><p>With dorks google –d intext:”error|warning|notice|syntax” –f university <br>You can look for PHP interpreter errors on educational sites (see Figure 10). <br><br><img src='https://i1.wp.com/habrastorage.org/getpro/habr/post_images/717/74f/e36/71774fe3656bfc058c42d43262fdec4a.jpg' width="100%" loading=lazy loading=lazy><br>Figure 10 - Finding PHP Runtime Errors</p><p>Sometimes it is not convenient to use one or two categories of dorks. <br>For example, if you know that the site is running on the wordpress engine, then you need dorks specifically for wordpress. In this case, it is convenient to use the Google Hack Database search. dorks ghdb –q wordpress –o wordpress_dorks.txt will download all wordpress dorks, as shown in Figure 11: <br><br><img src='https://i0.wp.com/habrastorage.org/getpro/habr/post_images/dcb/ac9/a4e/dcbac9a4eb12f6ec775d9cccc2fdee87.jpg' width="100%" loading=lazy loading=lazy><br>Figure 11 - Search for dorks related to Wordpress</p><p>Let's go back to banks again and with the command dorks google -D wordpress_dords.txt -f bank we will try to find something interesting related to wordpress (see Figure 12). <br><br><img src='https://i1.wp.com/habrastorage.org/getpro/habr/post_images/042/0c2/c43/0420c2c435931704288b171f725ccc6a.jpg' width="100%" loading=lazy loading=lazy><br>Figure 12 - Searching for Wordpress vulnerabilities</p><p>It is worth noting that Google Hack Database search does not accept words shorter than 4 characters. For example, if the site's CMS is not known, but the language is known - PHP. In this case, you can filter what you need manually using the pipe and the dorks system search utility –c all | findstr /I php > php_dorks.txt (see figure 13): <br><br><img src='https://i0.wp.com/habrastorage.org/getpro/habr/post_images/4c1/2f8/6e1/4c12f86e111074293c14d6a939c6ebab.jpg' width="100%" loading=lazy loading=lazy><br>Figure 13 - Search through all dorks where there is a mention of PHP</p><p>Searching for vulnerabilities or some sensitive information in a search engine should be searched only if there is a significant index on this site. For example, if a site has 10-15 pages indexed, then it is stupid to search for something in this way. Checking the index size is easy - just enter "site:somesite.com" into the google search bar. An example of a site with an insufficient index is shown in Figure 14. <br><br><img src='https://i2.wp.com/habrastorage.org/getpro/habr/post_images/78e/1db/b4f/78e1dbb4fc78cd422cec311fc2ca9d33.jpg' width="100%" loading=lazy loading=lazy><br>Figure 14 - Checking the site index size</p><p>Now about the unpleasant... From time to time, google may request a captcha - there's nothing to be done - it will have to be entered. For example, when sorting through the “Error Messages” category (90 dorks), the captcha fell out only once.</p><p>It is worth adding that phantomjs also supports work through a proxy, both through http and through the socks interface. To enable proxy mode, uncomment the corresponding line in dorks.bat or dorks.sh.</p><p>The tool is available as source code</p> <p>This article will be primarily useful for novice optimizers, because more advanced ones should already know everything about them. In order to use this article with maximum efficiency, it is desirable to know exactly which words need to be raised to <a href="https://bar812.ru/en/sozdat-krasivoe-menyu-joomla-3-kak-sozdat-menyu-v-joomla-vyvod-modulya.html">desired positions</a>. If you're not sure about the word list yet, or use a keyword suggestion service, it's a bit confusing, but you can figure it out.</p> <p>Important! Rest assured, Google is well aware that <a href="https://bar812.ru/en/zakon-o-zaprete-anonimaizerov-nakazanie-sushchestvuet-li-shtraf-za-vpn-v.html">ordinary users</a> will not use them and only promotion specialists resort to their help. Therefore, Google may slightly distort the information provided.</p> <h2>Intitle operator:</h2> <p><b>Usage:</b> intitle: word <br><b>Example:</b> intitle: site promotion <br><b>Description:</b> When using this operator, you will receive a list of pages that contain the word you are interested in in the title (title), in our case, this is the phrase "website promotion" in its entirety. Note that there should not be a space after the colon. The title of the page is important in ranking, so take your headings seriously. When using this variable, you can estimate the approximate number of competitors who also want to be in the top positions for this word.</p> <h2>Inurl operator:</h2> <p><b>Usage:</b> inurl:phrase <br><b>Example:</b> inurl: search engine optimization cost calculation <br><b>Description:</b> This command shows sites or pages that have the original keyword in their URL. Note that there should not be a space after the colon.</p> <h2>Inanchor operator:</h2> <p><b>Usage:</b> inanchor:phrase <br><b>Example:</b> inanchor:seo books <br><b>Description:</b> Using this operator will help you see the pages that are linked to with the keyword being used. This is a very important command, but, unfortunately, <a href="https://bar812.ru/en/kak-otkryt-zablokirovan-kak-oboiti-it-zaprety-na-rabote-kesh-poiskovyh.html">search engines</a> are reluctant to share this information with optimizers for obvious reasons. There are services, Linkscape and Majestic SEO, who are willing to provide you with this information for a fee, but rest assured, the information is worth it.</p> <p>Also, it is worth remembering that now Google is paying more and more attention to the “trust” of the site and less and less to the link mass. Of course, links are still one of the most important factors, but “trust” is playing an increasingly important role.</p> <p>A combination of two variables gives good results, for example intitle:inanchor promotion:website promotion. And what do we see, the search engine will show us the main competitors, the page title of which contains the word “promotion” and incoming links with the anchor “website promotion”.</p> <p>Unfortunately, this combination does not allow you to find out the "trust" of the domain, which, as we have already said, is a very important factor. For example, a lot of older corporate sites don't have as many links as their younger competitors, but they do have a lot of old links that pull those sites to the top of the search results.</p> <h2>Site operator:</h2> <p><b>Usage:</b> site: site address <br><b>Example:</b> site: www.aweb.com.ua <br><b>Description:</b> With this command, you can see a list of pages that are indexed by the search engine and that it knows about. It is mainly used to learn about the pages of competitors and analyze them.</p> <h2>cache statement:</h2> <p><b>Usage:</b> cache:page address <br><b>Example:</b> cache:www.aweb.com.ua <br><b>Description:</b> This command shows a “snapshot” of the page since the last time the robot visited the site and in general how it sees the content of the page. By checking the page cache date, you can determine how often robots visit the site. The more authoritative the site, the more often the robots visit it and, accordingly, the less authoritative (according to Google) the site, the less often the robots take pictures of the page.</p> <p>Cache is very important when buying links. The closer the page caching date is to the link purchase date, the faster your link will be indexed by the Google search engine. Sometimes it turned out to find pages with a cache age of 3 months. By buying a link on such a site, you will only waste your money, because it is quite possible that the link will never be indexed.</p> <h2>Link operator:</h2> <p><b>Usage:</b> link:url <br><b>Example:</b> link:www.aweb.com.ua <br><b>Description:</b> link operator: searches for and shows pages that link to <a href="https://bar812.ru/en/voiti-v-feisbuk-bez-registracii-feisbuk-moya-stranica-vhod-chto-delat-esli.html">specified address</a> url. It could be like <a href="https://bar812.ru/en/kak-nastroit-glavnuyu-stranicu-yandeksa-po-umolchaniyu-kak-izmenit.html">main page</a> site, and internal.</p> <h2>Related operator:</h2> <p><b>Usage:</b> related:url <br><b>Example:</b> related:www.aweb.com.ua <br><b>Description:</b> The related: statement displays pages that the search engine thinks are similar to the specified page. For a human, all the resulting pages may not have anything similar, but for a search engine, they do.</p> <h2>Info operator:</h2> <p><b>Usage:</b> info:url <br><b>Example:</b> info: www.aweb.com.ua <br><b>Description:</b> When using this operator, we will be able to get information about the page that is known to the search engine. This can be the author, publication date, and more. Additionally, on the search page, Google offers several actions at once that it can do with this page. Or, more simply, it will suggest using some of the operators that we described above.</p> <h2>Allintitle operator:</h2> <p><b>Usage:</b> allintitle:phrase <br><b>Example:</b> allintitle:aweb promotion <br><b>Description:</b> If we start a search query with this word, we'll get a list of pages that have the entire phrase in their title. For example, if we try to search for the word allintitle:aweb promotion, we get a list of pages that have both of these words in their titles. And it is not at all necessary that they should go one after another, they can be located in <a href="https://bar812.ru/en/sbor-s-drugih-pochtovyh-yashchikah-kak-sobrat-pisma-iz-raznyh-yashchikov-v.html">different places</a> header.</p> <h2>Allintext operator:</h2> <p><b>Usage:</b> allintext:word <br><b>Example:</b> allintext:optimization <br><b>Description:</b> This operator searches for all pages that contain the specified word in the text body. If we try to use allintext:aweb optimization, we will see a list of pages in the text of which these words occur. That is, not the entire phrase is “aweb optimization”, but both words are “optimization” and “aweb”.</p> <p>Search operators ( <a href="https://bar812.ru/en/kak-vvodit-alt-kody-kak-nabrat-specialnye-simvoly-na-klaviature-kak.html">Special symbols</a>, which add to <a href="https://bar812.ru/en/servis-dlya-gruppirovki-klyuchevyh-zaprosov-klasterizaciya.html">search query</a>) help to get <a href="https://bar812.ru/en/kak-ispravit-belyi-ekran-na-modx-posle-pereezda-ustanovka-modx.html">great amount</a> <a href="https://bar812.ru/en/chto-takoe-ansi-chto-takoe-ansi-lyumen-lm-lm-edinica-izmereniya.html">useful information</a> About the site. With their help, you can significantly narrow the search range and find <a href="https://bar812.ru/en/ne-vidit-fleshku-transcend-32-gb-onlain-pereproshivka-fleshki.html">necessary information</a>. Basically, the operators in different search engines are the same, but there are differences. Therefore, we will consider operators for Google and Yandex separately.</p> <h2>Google Operators</h2> <p><b>Consider first the simplest operators</b>:</p> <p><b>+ </b>- the plus operator is used to find words in the same sentence, just insert this symbol between words. For example, by making a query like “winter + tires + for + nissan”, you will receive in the search results those sites that have offers with <a href="https://bar812.ru/en/chto-takoe-k-lait-kodek-pak-k-lite-codec-pack-gde-skachat-kak-ustanovit-k-lite-codec-pack-full.html">full set</a> all words from the query.</p> <p><b>- </b>- the "minus" operator will help to exclude unwanted words from the query. For example, if you make a request "The Godfather -online", then you will be given sites with information about the film, review, review, etc., but exclude sites with online viewing.</p> <p><b>.. </b>- will help to search for results containing numbers in the specified range.</p> <p><b>@ and #</b>- symbols for searching by tags and hashtags of social networks.</p> <p><img src='https://i2.wp.com/1ps.ru/files/blog/2016/operatory_2.jpg' width="100%" loading=lazy loading=lazy></p> <p><b>OR</b>- the "or" operator, with its help you can find pages on which at least one of several words occurs.</p> <p><img src='https://i1.wp.com/1ps.ru/files/blog/2016/operatory_3.jpg' width="100%" loading=lazy loading=lazy></p> <p><b>« » </b>- quotes tell the search engine that you need to find sites where the entered words are in the specified order - exact match.</p> <p><b>Complex operators</b>:</p> <p><b>site:</b> will help you find the information you need on a particular site.</p> <p><img src='https://i1.wp.com/1ps.ru/files/blog/2016/operatory_4.jpg' width="100%" loading=lazy loading=lazy></p> <p><b>cache:</b> <a href="https://bar812.ru/en/bystryi-nomer-operatora-bilain-poleznye-sovety-abonentam-kak-napryamuyu.html">useful operator</a> if the content of any page has changed or been blocked. Will show the cached version. Example: cache:site</p> <p><b>info:</b> serves to display all information about the address.</p> <p><img src='https://i2.wp.com/1ps.ru/files/blog/2016/operatory_5.jpg' width="100%" loading=lazy loading=lazy></p> <p><b>related:</b> a great operator for finding sites with similar content.</p> <p><img src='https://i0.wp.com/1ps.ru/files/blog/2016/operatory_6.jpg' width="100%" loading=lazy loading=lazy></p> <p><b>allintitle:</b> pages are displayed that have the words specified in the query in the title tag</p> <p><b>allinurl:</b> excellent operator with which you can really find <a href="https://bar812.ru/en/zachem-nuzhen-validnyi-kod-i-kak-ustranit-oshibki-validacii-url-adresa-v.html">desired pages</a>. Shows sites containing the specified words in the page address. Unfortunately, there are still few sites in the Russian segment of the Internet that use Cyrillic, so you will have to use either transliteration, for example, allinurl:steklopakety, or Latin.</p> <p><img src='https://i2.wp.com/1ps.ru/files/blog/2016/operatory_7.jpg' width="100%" loading=lazy loading=lazy></p> <p><b>inurl:</b> does the same as the operator above, but the selection occurs only for one word.</p> <p><b>allintext:</b> Pages are selected based on page content. It can be useful if you are looking for some information, but you simply forgot the site address.</p> <p><img src='https://i0.wp.com/1ps.ru/files/blog/2016/operatory_8.jpg' width="100%" loading=lazy loading=lazy></p> <p><b>intext:</b> the same for just one word.</p> <p><b>allinanchor:</b> the operator shows pages that have keywords in the description. For example: allinanchor: wrist watch.</p> <p><b>inanchor:</b> the same for only one keyword.</p> <h2>Operators Yandex</h2> <p><b>Simple Operators</b>:</p> <p><b>! </b>- is placed in front of the keyword and in the search results pages are displayed where exactly the same word is indicated (without changing the word form).</p> <p><b>+ </b>- just like Google, pages with all the words between the plus are displayed.</p> <p><b>« » </b>- shows the exact match of the phrase.</p> <p><b>() </b>- used to group words in complex queries.</p> <p><b>& </b>- is needed to search for pages in which the words combined by this operator occur in one sentence.</p> <p><b>* </b>- serves to search for missing words in quotes. For example: Russia * soul. One * operator replaces one word.</p> <p>The following operators are already built into the Yandex advanced search, so there is no point in memorizing them, but still we will explain what each of them does.</p> <p><b>title:</b> search by page titles</p> <p><b>url:</b> search through pages located at a given address, for example url:site/blog/*</p> <p><b>host:</b> searches the entire host.</p> <p><b>site:</b> here the search is already performed on all subdomains and pages of the site.</p> <p><b>inurl:</b> search through the pages of only this domain using keywords. For example, inurl:site blog</p> <p><b>mime:</b> search for documents of a given type, for example mime:xls.</p> <p><img src='https://i2.wp.com/1ps.ru/files/blog/2016/operatory_9.jpg' width="100%" loading=lazy loading=lazy></p> <p><b>cat:</b> search for sites that are present in Yandex.Catalogue, as well as the region and category of which matches the specified one. For example: car cat:category_id</p> <p>Here is how these operators look in the search engine itself:</p> <p><img src='https://i1.wp.com/1ps.ru/files/blog/2016/operatory_10.jpg' width="100%" loading=lazy loading=lazy></p> <p>Thus, by correctly selecting and using the operators of the search engines Google and Yandex, you can independently compose <a href="https://bar812.ru/en/kak-vyglyadit-semanticheskoe-yadro-semanticheskoe-yadro-kak.html">semantic core</a> for the site, find shortcomings and errors in the work, analyze competitors, and also find out where and what <a href="https://bar812.ru/en/kontakty-index-php-board-powered-by-smf-pervye-shagi-v-poiskovoi-optimizacii-simple-machines-forum.html">external links</a> go to your site.</p> <p>If you use some other operators in your work that we have not taken into account, share in the comments. Let's discuss =)</p> <script>document.write("<img style='display:none;' src='//counter.yadro.ru/hit;artfast_after?t44.1;r"+ escape(document.referrer)+((typeof(screen)=="undefined")?"": ";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth? screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+";h"+escape(document.title.substring(0,150))+ ";"+Math.random()+ "border='0' width='1' height='1' loading=lazy loading=lazy>");</script> </div> </div> </div> <div class="td-pb-span4 td-main-sidebar" role="complementary"> <div class="td-ss-main-sidebar"> </div> </div> </div> </div> </article> <script type="text/javascript"> try { var sbmt = document.getElementById('submit'), npt = document.createElement('input'), d = new Date(), __ksinit = function() { sbmt.parentNode.insertBefore(npt, sbmt); }; npt.value = d.getUTCDate() + '' + (d.getUTCMonth() + 1) + 'uniq9065'; npt.name = 'ksbn_code'; npt.type = 'hidden'; sbmt.onmousedown = __ksinit; sbmt.onkeypress = __ksinit; } catch (e) {} </script> <div class="td-sub-footer-container td-container-wrap "> <div class="td-container "> <div class="td-pb-row "> <div class="td-pb-span td-sub-footer-menu "></div> <div class="td-pb-span td-sub-footer-copy ">2022 bar812.ru. Just about the complex. Programs. Iron. Internet. Windows</div> </div> </div> </div> </div> <script data-cfasync="false" type="text/javascript"> if (window.addthis_product === undefined) { window.addthis_product = "wpwt"; } if (window.wp_product_version === undefined) { window.wp_product_version = "wpwt-3.1.2"; } if (window.wp_blog_version === undefined) { window.wp_blog_version = "4.9.1"; } if (window.addthis_share === undefined) { window.addthis_share = {}; } if (window.addthis_config === undefined) { window.addthis_config = { "data_track_clickback": true, "ui_language": "ru", "ui_atversion": "300" }; } if (window.addthis_plugin_info === undefined) { window.addthis_plugin_info = { "info_status": "enabled", "cms_name": "WordPress", "plugin_name": "Website Tools by AddThis", "plugin_version": "3.1.2", "plugin_mode": "AddThis", "anonymous_profile_id": "wp-f2d21fd70bfc0c32605b4e5e1e4ff912", "page_info": { "template": "posts", "post_type": "" }, "sharing_enabled_on_post_via_metabox": false }; } (function() { var first_load_interval_id = setInterval(function() { if (typeof window.addthis !== 'undefined') { window.clearInterval(first_load_interval_id); if (typeof window.addthis_layers !== 'undefined' && Object.getOwnPropertyNames(window.addthis_layers).length > 0) { window.addthis.layers(window.addthis_layers); } if (Array.isArray(window.addthis_layers_tools)) { for (i = 0; i < window.addthis_layers_tools.length; i++) { window.addthis.layers(window.addthis_layers_tools[i]); } } } }, 1000) }()); </script> <script type='text/javascript'> var tocplus = { "smooth_scroll": "1", "visibility_show": "\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c", "visibility_hide": "\u0441\u043a\u0440\u044b\u0442\u044c", "width": "Auto" }; </script> <script type='text/javascript' src='https://bar812.ru/wp-content/plugins/disqus-comment-system/media/js/disqus.js?ver=bbebb9a04042e1d7d3625bab0b5e9e4f'></script> <script> (function() { var html_jquery_obj = jQuery('html'); if (html_jquery_obj.length && (html_jquery_obj.is('.ie8') || html_jquery_obj.is('.ie9'))) { var path = '/wp-content/themes/Newspaper/style.css'; jQuery.get(path, function(data) { var str_split_separator = '#td_css_split_separator'; var arr_splits = data.split(str_split_separator); var arr_length = arr_splits.length; if (arr_length > 1) { var dir_path = '/wp-content/themes/Newspaper'; var splited_css = ''; for (var i = 0; i < arr_length; i++) { if (i > 0) { arr_splits[i] = str_split_separator + ' ' + arr_splits[i]; } //jQuery('head').append('<style>' + arr_splits[i] + '</style>'); var formated_str = arr_splits[i].replace(/\surl\(\'(?!data\:)/gi, function regex_function(str) { return ' url(\'' + dir_path + '/' + str.replace(/url\(\'/gi, '').replace(/^\s+|\s+$/gm, ''); }); splited_css += "<style>" + formated_str + "</style>"; } var td_theme_css = jQuery('link#td-theme-css'); if (td_theme_css.length) { td_theme_css.after(splited_css); } } }); } })(); </script> <div id="tdw-css-writer" style="display: none" class="tdw-drag-dialog tdc-window-sidebar"> <header> <a title="Editor" class="tdw-tab tdc-tab-active" href="#" data-tab-content="tdw-tab-editor">Edit with Live CSS</a> <div class="tdw-less-info" title="This will be red when errors are detected in your CSS and LESS"></div> </header> <div class="tdw-content"> <div class="tdw-tabs-content tdw-tab-editor tdc-tab-content-active"> <script> (function(jQuery, undefined) { jQuery(window).ready(function() { if ('undefined' !== typeof tdcAdminIFrameUI) { var $liveIframe = tdcAdminIFrameUI.getLiveIframe(); if ($liveIframe.length) { $liveIframe.load(function() { $liveIframe.contents().find('body').append('<textarea class="tdw-css-writer-editor" style="display: none"></textarea>'); }); } } }); })(jQuery); </script> <textarea class="tdw-css-writer-editor td_live_css_uid_1_5a5dc1e76f1d6"></textarea> <div id="td_live_css_uid_1_5a5dc1e76f1d6" class="td-code-editor"></div> <script> jQuery(window).load(function() { if ('undefined' !== typeof tdLiveCssInject) { tdLiveCssInject.init(); var editor_textarea = jQuery('.td_live_css_uid_1_5a5dc1e76f1d6'); var languageTools = ace.require("ace/ext/language_tools"); var tdcCompleter = { getCompletions: function(editor, session, pos, prefix, callback) { if (prefix.length === 0) { callback(null, []); return } if ('undefined' !== typeof tdcAdminIFrameUI) { var data = { error: undefined, getShortcode: '' }; tdcIFrameData.getShortcodeFromData(data); if (!_.isUndefined(data.error)) { tdcDebug.log(data.error); } if (!_.isUndefined(data.getShortcode)) { var regex = /el_class=\"([A-Za-z0-9_-]*\s*)+\"/g, results = data.getShortcode.match(regex); var elClasses = {}; for (var i = 0; i < results.length; i++) { var currentClasses = results[i] .replace('el_class="', '') .replace('"', '') .split(' '); for (var j = 0; j < currentClasses.length; j++) { if (_.isUndefined(elClasses[currentClasses[j]])) { elClasses[currentClasses[j]] = ''; } } } var arrElClasses = []; for (var prop in elClasses) { arrElClasses.push(prop); } callback(null, arrElClasses.map(function(item) { return { name: item, value: item, meta: 'in_page' } })); } } } }; languageTools.addCompleter(tdcCompleter); window.editor = ace.edit("td_live_css_uid_1_5a5dc1e76f1d6"); // 'change' handler is written as function because it's called by tdc_on_add_css_live_components (of wp_footer hook) // We did it to reattach the existing compiled css to the new content received from server. window.editorChangeHandler = function() { //tdwState.lessWasEdited = true; window.onbeforeunload = function() { if (tdwState.lessWasEdited) { return "You have attempted to leave this page. Are you sure?"; } return false; }; var editorValue = editor.getSession().getValue(); editor_textarea.val(editorValue); if ('undefined' !== typeof tdcAdminIFrameUI) { tdcAdminIFrameUI.getLiveIframe().contents().find('.tdw-css-writer-editor:first').val(editorValue); // Mark the content as modified // This is important for showing info when composer closes tdcMain.setContentModified(); } tdLiveCssInject.less(); }; editor.getSession().setValue(editor_textarea.val()); editor.getSession().on('change', editorChangeHandler); editor.setTheme("ace/theme/textmate"); editor.setShowPrintMargin(false); editor.getSession().setMode("ace/mode/less"); editor.setOptions({ enableBasicAutocompletion: true, enableSnippets: true, enableLiveAutocompletion: false }); } }); </script> </div> </div> <footer> <a href="#" class="tdw-save-css">Save</a> <div class="tdw-more-info-text">Write CSS OR LESS and hit save. CTRL + SPACE for auto-complete.</div> <div class="tdw-resize"></div> </footer> </div> <script type="text/javascript" defer src="https://bar812.ru/wp-content/cache/autoptimize/js/autoptimize_d85127d8732b44d62e81e0455b3d3cb7.js"></script> </body> </html>