diff options
author | Epoch Qwert <epoch@53flpnlls43fcguy.onion> | 2014-10-23 01:20:02 -0500 |
---|---|---|
committer | Epoch Qwert <epoch@53flpnlls43fcguy.onion> | 2014-10-23 01:20:02 -0500 |
commit | 8c542d83091f9ba5ccb095fad730651f8e6c1eef (patch) | |
tree | ad26b5a7686d7b78888fa052226551255e3d8633 /src/libexec/peerip.c | |
parent | 12201178a5950eecd9537e642b1246011490b499 (diff) | |
download | misc-8c542d83091f9ba5ccb095fad730651f8e6c1eef.tar.gz misc-8c542d83091f9ba5ccb095fad730651f8e6c1eef.zip |
fixed gopherd's LFI and added excuting files.
httpd had flushing issues.
realpath is new! does what it says. gives absolute path of a file.
deddos, peerip, peerip.pl, were laying around elsewhere.
gethostbyname got a new trick. can do decimal addresses among other things.
hop0 is a shell script that gets what IP will be put on the source address of outgoing packets sent to $1. rtfs.
Diffstat (limited to 'src/libexec/peerip.c')
-rw-r--r-- | src/libexec/peerip.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libexec/peerip.c b/src/libexec/peerip.c new file mode 100644 index 0000000..d35aca7 --- /dev/null +++ b/src/libexec/peerip.c @@ -0,0 +1,13 @@ +#include <stdio.h> +#include <sys/socket.h> +#include <netdb.h> + +int main(int argc,char *argv[]) { + int i; + struct sockaddr sa; + int sl=sizeof(sa); + char host[256]; + getpeername(0,&sa,&sl); + getnameinfo(&sa,sl,host,256,0,0,NI_NUMERICHOST); + puts(host); +} |