


Block SQL Server injection vulnerability in three simple steps_PHP tutorial
What is SQL injection?
When writing many website programs, they do not judge the legality of user input data, causing security risks in the application. Users can submit a database query code (usually in the browser address bar, accessed through the normal www port), and obtain certain data they want to know based on the results returned by the program. This is the so-called SQL Injection, that is, SQL injection. .
SQL injection modifies the website database through web pages. It is able to add users with administrator rights directly in the database, thereby ultimately gaining system administrator rights. Hackers can use the obtained administrator rights to arbitrarily obtain files on the website or add Trojan horses and various malicious programs to the web page, causing great harm to the website and the netizens who visit the website.
There is a wonderful way to prevent SQL injection
Step 1: Many novices download the SQL universal anti-injection system program from the Internet, and use it in the header of the page that needs to prevent injection to prevent others from performing manual injection testing.
But if you use SQL injection analyzer, you can easily skip the anti-injection system and automatically analyze its injection points. Then it only takes a few minutes for your administrator account and password to be analyzed.
The second step: Regarding the prevention of injection analyzers, the author discovered a simple and effective prevention method through experiments. First we need to know how the SQL injection analyzer works. During the operation, I found that the software was not directed to the "admin" administrator account, but to the permissions (such as flag=1). In this way, no matter how your administrator account changes, you cannot escape detection.
Step 3: Since we can’t escape detection, we will create two accounts, one is an ordinary administrator account, and the other is an account to prevent injection. Why do we say this? The author thinks that if you find an account with the highest authority to create a false impression and attract detection by the software, and the content in this account is more than 1,000 Chinese characters, it will force the software to enter a full load state and even use resources when analyzing this account. Exhausted and crashed. Let's modify the database next.
1. Modify the table structure. Modify the data type of the administrator's account field, changing the text type to the maximum field of 255 (actually it is enough, if you want to make it larger, you can choose the note type), and set the password field in the same way.
2. Modify the table. Set the account with administrator rights in ID1, and enter a large number of Chinese characters (preferably more than 100 characters).
3. Put the real administrator password in any position after ID2 (such as ID549).
We have completed the modification of the database through the above three steps.
Is the modification finished now? In fact, it is not the case. You must understand that the ID1 account you created is actually an account with real permissions. Nowadays, computer processing speed is so fast. If you encounter a software that must calculate it, this is also unsafe. I think most people have already thought of a way at this time. Yes, just write the character limit in the page file where the administrator logs in! Even if the other party uses this account password with thousands of characters, it will be blocked, but the real password can be unrestricted.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











The default map on the iPhone is Maps, Apple's proprietary geolocation provider. Although the map is getting better, it doesn't work well outside the United States. It has nothing to offer compared to Google Maps. In this article, we discuss the feasible steps to use Google Maps to become the default map on your iPhone. How to Make Google Maps the Default Map in iPhone Setting Google Maps as the default map app on your phone is easier than you think. Follow the steps below – Prerequisite steps – You must have Gmail installed on your phone. Step 1 – Open the AppStore. Step 2 – Search for “Gmail”. Step 3 – Click next to Gmail app

The import steps are as follows: Copy the MDF file to SQL Server's data directory (usually C:\Program Files\Microsoft SQL Server\MSSQL\DATA). In SQL Server Management Studio (SSMS), open the database and select Attach. Click the Add button and select the MDF file. Confirm the database name and click the OK button.

HQL and SQL are compared in the Hibernate framework: HQL (1. Object-oriented syntax, 2. Database-independent queries, 3. Type safety), while SQL directly operates the database (1. Database-independent standards, 2. Complex executable queries and data manipulation).

Is the clock app missing from your phone? The date and time will still appear on your iPhone's status bar. However, without the Clock app, you won’t be able to use world clock, stopwatch, alarm clock, and many other features. Therefore, fixing missing clock app should be at the top of your to-do list. These solutions can help you resolve this issue. Fix 1 – Place the Clock App If you mistakenly removed the Clock app from your home screen, you can put the Clock app back in its place. Step 1 – Unlock your iPhone and start swiping to the left until you reach the App Library page. Step 2 – Next, search for “clock” in the search box. Step 3 – When you see “Clock” below in the search results, press and hold it and

If you accidentally delete a SQL Server database, you can take the following steps to recover: stop database activity; back up log files; check database logs; recovery options: restore from backup; restore from transaction log; use DBCC CHECKDB; use third-party tools. Please back up your database regularly and enable transaction logging to prevent data loss.

When the SQL Server service fails to start, here are some steps to resolve: Check the error log to determine the root cause. Make sure the service account has permission to start the service. Check whether dependency services are running. Disable antivirus software. Repair SQL Server installation. If the repair does not work, reinstall SQL Server.

If the SQL Server installation fails, you can clean it up by following these steps: Uninstall SQL Server Delete registry keys Delete files and folders Restart the computer

Are you getting "Unable to allow access to camera and microphone" when trying to use the app? Typically, you grant camera and microphone permissions to specific people on a need-to-provide basis. However, if you deny permission, the camera and microphone will not work and will display this error message instead. Solving this problem is very basic and you can do it in a minute or two. Fix 1 – Provide Camera, Microphone Permissions You can provide the necessary camera and microphone permissions directly in settings. Step 1 – Go to the Settings tab. Step 2 – Open the Privacy & Security panel. Step 3 – Turn on the “Camera” permission there. Step 4 – Inside, you will find a list of apps that have requested permission for your phone’s camera. Step 5 – Open the “Camera” of the specified app
