Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Passing a String to System Command
metalx1000
Jun 12th, 2016
698
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
C
0.16 KB
| None
|
0
0
raw
download
clone
embed
print
report
#include<stdlib.h>
#include<unistd.h>
#include<stdio.h>
int
main
(
)
{
char
cmd
[
100
]
;
sprintf
(
cmd
,
"ls -lha"
)
;
printf
(
"%s
\n
"
,
cmd
)
;
system
(
cmd
)
;
}
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
+218,600$ in 3 days
CSS | 1 min ago | 0.94 KB
Free Crypto Method
CSS | 1 min ago | 0.94 KB
Free Crypto Method
CSS | 3 min ago | 0.91 KB
2026 AI MONEY MACHINE
CSS | 10 min ago | 0.91 KB
FREE BTC STRATEGY
CSS | 17 min ago | 0.91 KB
+45,600$ in 3 days
CSS | 25 min ago | 0.91 KB
Free Crypto Method
CSS | 32 min ago | 0.91 KB
Secrets.psafe3
35 min ago | 236.43 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!