Topic: poolf, yet another URL dumper for direct file links of e621 pools

Posted under e621 Tools and Applications

https://github.com/Muffindrake/poolf

I was somewhat dismayed at the lack of programs that do this one thing and nothing else, also that most require some huge virtual runtime or interpreter to even execute, so I wrote one in C in about 4 hours.

The program dumps the direct file links of the URLs inside an entire pool in sequence to standard output. A shell script poolfdl is provided that fetches all files to the current directory and prefixes them with the page index that they have inside the pool (00001_ for the first, 00002_ for the second and so on).

Usage:

poolfdl <pool ID or URL>

The program waits a second between each request (as is the rule on this website), so fetching pool URLs takes increments of one second for every 24 posts inside a pool (because that's the page size).

Installation instructions are provided in the README.md file - prior to that you have to install a recent C compiler, as well as development headers and runtime libraries for a new enough libcurl that has the new new URL API (sorry debian stable users) and libjansson.

Windows users can probably get away with compiling this under Cygwin, though I have not tried myself.

Updated

poolf failed to compile under Debian ARM-HF (Raspberry Pi 3B)
GhostBin Error Log

I'll give it a shot under Windows Subsystem Linux (Ubuntu 18.04), see if I have any luck since my only system running native Ubuntu 18.04 is down for the count.

Updated by anonymous

21-Shades-of-Faux-Pa said:
poolf failed to compile under Debian ARM-HF (Raspberry Pi 3B)
GhostBin Error Log

I'll give it a shot under Windows Subsystem Linux (Ubuntu 18.04), see if I have any luck since my only system running native Ubuntu 18.04 is down for the count.

poolf.c:143:9: error: unknown type name ‘CURLU’
         CURLU *h;
         ^~~~~
poolf.c:144:9: error: unknown type name ‘CURLUcode’
         CURLUcode err;
         ^~~~~~~~~

You need at least libcurl 7.62 or later, as stated above and in the README. Alternatively, you could edit that function to remove the parts that use the URL API introduced in that release, which will effectively remove URL validation, but will let you compile it.

Updated by anonymous

Muffindrake said:

poolf.c:143:9: error: unknown type name ‘CURLU’
         CURLU *h;
         ^~~~~
poolf.c:144:9: error: unknown type name ‘CURLUcode’
         CURLUcode err;
         ^~~~~~~~~

You need at least libcurl 7.62 or later, as stated above and in the README. Alternatively, you could edit that function to remove the parts that use the URL API introduced in that release, which will effectively remove URL validation, but will let you compile it.

Is the OpenSSL flavour of libcurl not good enough? I installed it directly from my package manager, and it didn't throw any kind of errors.

Edit: I even tried installing the GNU-TLS flavour of libcurl4 (the only version available to me), and it didn't work.

Edit 2: I see that LibCurl4 v7.62 is only available to Debian Buster and Sid.

Updated by anonymous

21-Shades-of-Faux-Pa said:
Is the OpenSSL flavour of libcurl not good enough? I installed it directly from my package manager, and it didn't throw any kind of errors.

Edit: I even tried installing the GNU-TLS flavour of libcurl4 (the only version available to me), and it didn't work.

The current code requires that pkg-config libcurl --modversion outputs 7.62.0 or later. It doesn't matter what underlying TLS implementation your libcurl uses, but it does matter that the libcurl installed has the (new) URL API only present in newer releases. The jab at debian stable above wasn't for nothing.

If you really need it working and don't care whether someone might try owning you and grabbing a shell remotely with malformed URLs, try this patch.

https://gist.github.com/Muffindrake/a4b8940e07e1f3cfc4b2c35cf73b4747

> cd poolf
> wget https://gist.github.com/Muffindrake/a4b8940e07e1f3cfc4b2c35cf73b4747/raw/e9d8b39855607b2dd60a0183e3041184edc24e17/nothingrunsondebianstable.patch
> git apply ./nothingrunsondebianstable.patch

Updated by anonymous

  • 1