summaryrefslogtreecommitdiff
path: root/src/libexec
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexec')
-rw-r--r--src/libexec/deddos.c8
-rw-r--r--src/libexec/httpd.c2
-rw-r--r--src/libexec/peerip.c12
3 files changed, 7 insertions, 15 deletions
diff --git a/src/libexec/deddos.c b/src/libexec/deddos.c
index 245ba41..0af7414 100644
--- a/src/libexec/deddos.c
+++ b/src/libexec/deddos.c
@@ -1,4 +1,4 @@
-
+#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
@@ -13,11 +13,9 @@ int main(int argc,char *argv[]) {
struct sockaddr sa;
signal(SIGALRM,exit);
alarm(10);
- int sl=sizeof(sa);
+ unsigned int sl=sizeof(sa);
char host[256];
char serv[256];
- char cmd[256];
- char line[256];
char iface[256];
char *name[16];
getpeername(0,&sa,&sl);
@@ -49,5 +47,5 @@ int main(int argc,char *argv[]) {
name[8]="UDP";
name[9]=0;
execv(name[0],name);
- printf("shit fucked.\n");
+ return printf("shit fucked.\n");
}
diff --git a/src/libexec/httpd.c b/src/libexec/httpd.c
index 22d9b2b..812e051 100644
--- a/src/libexec/httpd.c
+++ b/src/libexec/httpd.c
@@ -4,6 +4,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <syslog.h>
+#include <sys/wait.h>
#define VHOST_ROOT "/var/www/vhosts"
#define SITES_ROOT "/var/www/sites"
@@ -19,7 +20,6 @@ int main(int argc,char *argv[]) {
int fd;
char *name[10];
int s,n;
- short in;
char *method;
char *page;
char *version;
diff --git a/src/libexec/peerip.c b/src/libexec/peerip.c
index 6bcf1f1..43d64d0 100644
--- a/src/libexec/peerip.c
+++ b/src/libexec/peerip.c
@@ -4,17 +4,11 @@
#include <netinet/in.h>
int main(int argc,char *argv[]) {
- int i;
struct sockaddr_in6 sa6;
- int err;
- int sl=sizeof(sa6);
+ unsigned int sl=sizeof(sa6);
char h[NI_MAXHOST], s[NI_MAXSERV];
- if(getpeername(0,(struct sockaddr *)&sa6,&sl) == -1) {
- return 1;
- }
- if(err=getnameinfo((struct sockaddr *)&sa6,sl,h,sizeof(h),s,sizeof(s),NI_NUMERICHOST|NI_NUMERICSERV)) {
- return 2;
- }
+ if(getpeername(0,(struct sockaddr *)&sa6,&sl) == -1) return 1;
+ if(getnameinfo((struct sockaddr *)&sa6,sl,h,sizeof(h),s,sizeof(s),NI_NUMERICHOST|NI_NUMERICSERV)) return 2;
puts(h);
puts(s);
return 0;