Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Challenge:reimplement UNIX cat

Name: Anonymous 2015-02-23 16:31

Most elegant solution wins
reference bloated cats: https://gist.github.com/pete/665971

Name: Anonymous 2015-02-25 0:33

>>26
//ncpc.c https://gist.github.com/FrozenVoid/363b9098196d3173ab0c
#include "void.h"
//https://gist.github.com/FrozenVoid/87e6ad6212ac9ce496e0

/* Network Connection Privilege Check
Usage: ncpc pronoun domain|address
This software was developed on generous grant from Feminist Software Foundation.
NCPC - checks privilege of connection to host or ip address. Uses the user-supplied preferred pronoun to describe the connection.
Replaces phallocratic packet rape tool PING( short for PENIS INSERTION NETWORK GONAD).
Many progressive hosts refuse PINGs now, and filter UDP(Unix Dick Packets) and IGMP(Internet Gonad Manipulation Protocol) extensively.
timing is replaced by log10(log2 is binary and supports the oppressive gender binary distinction) privilege levels, which shows more privilege if the host is nearer and even more is connection is better.
It shows lower privilege levels for far,remote hosts, slower CPUs and poor latency/ISP subscription plans.
Host itself is never PINGed or packet-raped(flooded) and check is performed only once. Private host address information is respectfully not shown.*/

STDSTART
#define NCPCINFO "Syntax: ncpc pronoun domain|address"
#define getprivinfo getaddrinfo
struct addrinfo pronounhints={0};
pronounhints.ai_family = AF_UNSPEC,pronounhints.ai_socktype = SOCK_STREAM,pronounhints.ai_protocol = IPPROTO_TCP;

struct addrinfo* query_privilege=NULL;

if(argc<3){p(NCPCINFO);exit(1);}
u8 begincheck=tsc();
auto problematic=getprivinfo(argv[2],NULL,&pronounhints,&query_privilege) ;
u8 endcheck=tsc();f10 privlevel=1.0L/log10((((f10)u4max)/((f10)(endcheck-begincheck))));
if(problematic){p(argv[1]," connection to ",argv[2]," is problematic:",gai_strerror(problematic),crlf);exit(1); }

p(argv[1]," connection to ",argv[2]," privilege level is:",privlevel);

STDEND

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List