Re: How to take down a system to the point of requiring a newfs

看板FB_security作者時間18年前 (2008/02/18 23:08), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/6 (看更多)
Dag-Erling Sm鷨grav wrote: > Dag-Erling Sm鷨grav <des@des.no> writes: >> 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 (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=48;v<127;++v){f[i]=v; >> #define a(i) b(i,v##i) >> int main(void){char f[5]={'/'};a(1)a(2)a(3)truncate(f,0);}}}} > > Two bugs: > > 1) I forgot to include the correct version of the code > > 2) the version I had created a few files with '/' in their names; this > slightly nastier creates 10,648 files with only letters. > > #include <unistd.h> > #define b(i,v)for(int v=65;v<87;){i[f]=v++; > #define a(i)b(i,v##i) > int main(void){char f[4]={47};a(1)a(2)a(3)truncate(f,0);}}}} > > DES This version also omits the constructive comments on the actual problem that the original poster identified. Scott _______________________________________________ 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"
文章代碼(AID): #17kP-200 (FB_security)
討論串 (同標題文章)
文章代碼(AID): #17kP-200 (FB_security)