2 ms·
1.sh uses two custom filters called yy045 and yy059. These are created with flex. flex -8iCrf 045.l cc -std=c89 -Wall -pedantic -pipe lex.yy.c -static
by 1vuio0pswjnm7 5y ago
1.sh uses two custom filters called yy045 and yy059. These are created with flex.
flex -8iCrf 045.l
cc -std=c89 -Wall -pedantic -pipe lex.yy.c -static -o yy045
flex -8iCrf 059.l
cc -std=c89 -Wall -pedantic -pipe lex.yy.c -static -o yy059
045.l:
/* decode chunked transfer */
int fileno (FILE *);
xa "\15"|"\12"
xb "\15\12"
%option noyywrap nounput noinput
%%
^[A-Fa-f0-9]+{xa}
{xa}+[A-Fa-f0-9]+{xa}
{xb}[A-Fa-f0-9]+{xb}
%%
int main(){ yylex();exit(0);}
059.l:
/* reformat json */
int fileno (FILE *);
#define echo do{if(fwrite(yytext,(size_t)yyleng,1,yyout)){}}while(0)
#define jmp (yy_start) = 1 + 2 *
#define pc(x) putchar(x)
%option nounput noinput noyywrap
%s xa xb
%%
\173 pc(10);pc(123);jmp xa;
<xa>\175 echo;jmp 0;
<xa>\40/[^\40] echo;
<xa>[^\175\n\40]+ echo;
\n|.
%%
int main(){ yylex();exit(0);}