Date: Mon, 18 Feb 2008 08:57:46 -0500 From: Speedtoys <speedtoys.racing@gmail.com> To: Kurt Buff <kurt.buff@gmail.com> Cc: "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>, =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>, "FreeBSD-bugs@freebsd.org" <FreeBSD-bugs@freebsd.org>, "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>, "freebsd-security@freebsd.org" <freebsd-security@freebsd.org> Subject: Re: How to take down a system to the point of requiring a newfs with one line of C (userland) Message-ID: <BFAB04BE-4A31-4112-A026-85138DF58DFF@gmail.com> In-Reply-To: <a9f4a3860802180527k6fcfbdaeuf235540075b263b5@mail.gmail.com> References: <47B90868.7000900@electron-tube.net> <86odae5rgr.fsf@ds4.des.no> <a9f4a3860802180527k6fcfbdaeuf235540075b263b5@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Time for the idiot(proof) function call. Got brakes? =3D=3D=3D=3D=3D=3D 25hrs or one season with one pad set is possible. Save money and pit =20= time, compromise nothing. Ask how. TXT or Tone: 8414546712@txt.att.net http://www.speedtoys.com On Feb 18, 2008, at 8:27 AM, "Kurt Buff" <kurt.buff@gmail.com> wrote: > Patient: Doctor, it hurts when I do this! > > Doctor: Don't do that... > > On Feb 18, 2008 1:23 PM, Dag-Erling Sm=C3=B8rgrav <des@des.no> wrote: >> Jim Bryant <freebsd@electron-tube.net> writes: >>> #include <stdio.h> >>> #include <stdlib.h> >>> >>> int main(int argc, char **argv) { int i; char buf[1024]; bzero=20 >>> (buf, 1024); for(i =3D 0; i < 10000; i++) { sprintf(buf, "touch %s%=20= >>> 05d\n", argv[1], i); system((const char *)buf);} return(0);} >> >> Subject should be "how to take down a system [...] with three lines =20= >> of >> badly written C, provided you have root privileges already and are =20= >> too >> lazy to just dd if=3D/dev/zero of=3D/dev/ad0s1 count=3D100", which = would >> accomplish the job much faster. >> >> Purely in the interest of showing off, here is my version. It is 81 >> bytes shorter than yours, it is valid C99 with POSIX extensions =20 >> (yours >> is not), and it produces 11,450 files in about 0.2% of the time yours >> takes to produce 10,000. >> >> #include <unistd.h> >> #define b(i,v) for(int v=3D48;v<127;++v){f[i]=3Dv; >> #define a(i) b(i,v##i) >> int main(void){char f[5]=3D{'/'};a(1)a(2)a(3)truncate(f,0);}}}} >> >> DES >> -- >> Dag-Erling Sm=C3=B8rgrav - des@des.no >> >> _______________________________________________ >> freebsd-security@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-security >> To unsubscribe, send any mail to = "freebsd-security-unsubscribe@freebsd.org=20 >> " >> > _______________________________________________ > freebsd-security@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-security > To unsubscribe, send any mail to = "freebsd-security-unsubscribe@freebsd.org=20 > " > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" _______________________________________________ freebsd-security@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-security To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BFAB04BE-4A31-4112-A026-85138DF58DFF>