"h1b" is a HOSTS file entry for a localhost TLS-enabled forward proxy
"yy025" is a small program that generates HTTP.
Interestingly I think curl was modified in recent years to detect binary data on stdin. I just tested the following and it extracted the PDF automatically.
However, one thing that curl does _not_ do is HTTP/1.1 pipelining. I use pipelining on a daily basis. That is where these programs become useful for me.
cat > 052.l
/* PDF file carver */
/* PDFs can contain newlines */
/* yy045 removes them so dont use yy045 */
#define echo ECHO
#define jmp BEGIN
int fileno(FILE *);
xa "%PDF-"
xb "%%EOF"
%s xa
%option noyywrap nounput noinput
%%
{xa} echo;jmp xa;
<xa>{xb} echo;jmp 0;
<xa>.|\n|\r echo;
.|\n
%%
int main(){ yylex();exit(0) ;}
^D
Would you mind sharing some of that code?
Some of your recent comments on web browsers, text browsers and javascript [1 + its follow-up] are really interesting. Thanks for sharing.
1: https://news.ycombinator.com/item?id=32131901