Mercurial > repo
view letersort @ 5967:9f67418e5043
<b_jonas> ` f=bin/w\xc3\xa4lc\xc3\xa5m\xc3\xa4; >"$f" echo $\'/bin/sh\\nwelcome | sed "s/E/\xc3\x84/g;s/O/\xc3\x85/g;s/e/\xc3\xa4/g;s/o/\xc3\xa5/g"\'; chmod a+x "$f"
author | HackBot |
---|---|
date | Thu, 10 Sep 2015 11:15:33 +0000 |
parents | a5ef8d072826 |
children |
line wrap: on
line source
#include <stdio.h> int compare(char *s,char *c){return*c-*s;}int main(){char w[40];int c,i=0;while( 1){c=getchar();if(c<=32||c==EOF){qsort(w,i,1,compare);w[i]=0;printf("%s",w);if(c ==EOF)break;putchar(c);i=0;}else{w[i++]=c;}}}