Get the App
SLTechnology News&Howtos  ›  Network Security  › 

System() command injection

Shulou Source: shulou.com Published: 2022-06-01 06:27:37 10月04日 Update

# include "stdlib.h" # include "stdio.h" void main () {char s; while (1) {printf ("input cmd:"); scanf ("% s", s); system (s);}}

Enter cmd1 | pwd:cmd2 refers to the line

Enter cmd1&&cmd2:cmd1 to refer to the line, cmd2 to execute

Enter cmd1&cmd2:cmd2 to execute, and cmd1 refers to line and hang

Enter cmd1 & cmd2:cmd1 to execute, error report, cmd2 execute

Enter cmd1;cmd2:cmd1 to refer to the line, cmd2 to execute

Reference:

Http://blog.csdn.net/hitwangpeng/article/details/45716821

Tags: Input reference command Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Docker Shulou Information Xiaomi NVidia