Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Dir-dumper for Linux

Name: Anonymous 2007-09-01 16:50 ID:wsG5AKEa

Why has no one coded a 4chan directory dumper for Linux yet? Are there that few people with *nix?

Name: Anonymous 2007-09-01 16:51 ID:Heaven

Write one if you feel the need for it.

Name: Anonymous 2007-09-01 16:53 ID:wsG5AKEa

just use curl amirite?

Name: Anonymous 2007-09-01 16:59 ID:6m6veRxI

Name: Anonymous 2007-09-01 17:11 ID:Heaven

Rape.sh gets you banned... 4chan knows its a script somehow

Name: Anonymous 2007-09-01 17:47 ID:wsG5AKEa

curl http://nov.4chan.org/h/imgboard.php -F "com=hi there" -F submit=Submit -F upfile=@*.* -F mode=regist -F resto=%1 -A "Mozilla/4.0"

Thread over

Name: Anonymous 2007-09-01 17:51 ID:1tgx904n

>>6
What the fuck is %1?

Name: Anonymous 2007-09-01 17:55 ID:Q9R7kp1e

>>7
First argument on command line

Name: [Razor] !SHjzCSZsqE 2007-09-01 17:57 ID:Heaven

rape.sh/cURL is banned. There is a workaround but I forgot to ask what it was.

Name: Anonymous 2007-09-01 18:25 ID:fNAIVCm7

>>9
Change the user agent

Name: Anonymous 2007-09-01 18:34 ID:F55Q5Vbg

Not sure if cUrl has the same option that wget has to randomise the wait time between downloads, but if so it would probably be worth doing too.

Name: Anonymous 2007-09-01 18:35 ID:Heaven

>>8
Go back to Windows, you fucking script kiddie.

Name: Anonymous 2007-09-01 18:41 ID:Heaven

Changing the useragent does nothing... must be a curl specific header that or something

it has nothing to do with wait times. If you use curl to upload an image youre instantly autobanned permanently, period.

Name: Anonymous 2007-09-01 20:01 ID:rzKOzwKR

>>8
Lol winfag, enjoy getting raped in the ass by the mafiaa, Microshaft is their bitch.

Name: Anonymous 2007-09-01 21:21 ID:Heaven

>>13
IT IS BECAUSE CURL IS HOMOSEXUAL

Name: Anonymous 2007-09-02 0:14 ID:GufxpCZx

>>13
How about tcpdump it's http headers?
>>15
GTFO you dense fucktoad.

Name: Anonymous 2007-09-02 8:08 ID:Heaven

>>16
MAYBE YOU ARE HOMOSEXUAL TOO

Name: Anonymous 2007-09-02 12:30 ID:fOrwcs2n

>>17
oh noes

Name: Anonymous 2007-09-02 12:40 ID:dATqxgfm

LOLWUT

#!/usr/bin/php
<?
/*

    :: 4chan image stripper ::
    ---------------------------
    Type: PHP script
    Version: 0.5-suave
    Requires: wget and PHP (recommended 5>, should work most anywhere PHP4 is accepted)
    Written By: Anonymous (>^_^)>=[]
   
    Usage
    -----------
    Run from the command line, i.e.
   
    $ php ./4cis.php
   
        The above line would use the config in this file to determine what
        forum and thread to strip
   
    Also, it accepts parameters!
   
    $ php ./4cis.php --sauce=http://some/thread/on/r/ --forum=r --mode=onebigwget --exec=false
   
        The above line would override the internal config, thus the sauce thread
        would be --sauce, the target forum --forum and the mode (see below) as
        --mode.

    Of course, try --help if you're stuck ;)

    Bugs
    -----------
     - Having trouble with /r/. Something isn't wget'ing properly.
    
     - Some users experience the following with PHP-CLI
        PHP Warning: mime_magic:
        type regex BEGIN[[:space:]]*[{] application/x-awk invalid in Unknown on line 0
       This is a bug in certain 4.x version of PHP, so not my fault :)
       Uncomment the error_reporting() statement below or upgrade your PHP!

    Notes
    -----------
    Some of you had trouble with this, but I'll give you a hint:
    READ THE COMMENTS. yarly

    Changelog
    -----------
     0.5-suave
        - Default for $doexec is now 'true'

     0.4-kawaii
        - Support for most forums as well as full support of command-line arguments
         ( --sauce, --forum, --mode and --help ).
        - Better support for image formats (png and such)
                
     0.3-dogmongler
         - Added more forum support as well as preliminary functions for command-line args
    
     0.2-/b/tard
         - Added support for more forums: /h/, /k/ (for those weapon threads!), and /wg/.
   
    Todo
    -----------
     - Currently all config is done in here, cli args later
        
    Special Thanks
    ---------------
    To anonymous for posting so many womens that I felt compelled to write
    a PHP script. Also to anonymous for AIDs. Thank you.
   
    -Anon
*/

Name: Anonymous 2007-09-02 12:41 ID:dATqxgfm



# PHP developers [uncomment the next line to] hide errors!
#error_reporting( E_NONE );

# CONFIG
# These are config things
# Note that any config directives set in the command line will override these!

# Currently supported foums are /k/, /h/, /wg/, /s/ and /b/ ;)
# Feel free to try other forums too - I'm just a lazy anon
# Command-Line Equivelant: --forum
$FORUM = 'b'; //which forum?

# Which mode? valid modes are: onebigwget, listwget and list and all
#  - onebigwget - returns one big wget statement with header forged
#  - listwget - a list of wget commands, each with forged header
#  - list - a list of URLs, line break (\n) seperated
#  - all - do each one
# Command-Line Equivelant: --mode
$MODE = 'onebigwget';

# sauce.txt should be the source HTML of the target thread page -
# can also be a URL to a thread
#
#$sauce = "sauce.txt";
# Command-Line Equivelant: --sauce

# forge the headers for wget XD
$header = " --header='User-Agent: Mozilla/5.0 (X11) Gecko/20060601 Firefox/2.0.0.2'";

# prep som vars
$wgetlist = $list = '';
$onebigwget = "wget" . $header;
$imgtypes = array( 'jpg', 'png', 'gif', 'bmp' );
$doexec = true; //default as of 0.5-suave

Name: Anonymous 2007-09-02 12:41 ID:dATqxgfm


if( $_REQUEST['sauce'] || array_filter( $argv, "is_sauce" ) )
{
    $sauce = $_REQUEST['sauce'] ? $_REQUEST['sauce'] :     $sarray = array_filter( $argv, "is_sauce" );
   
    if( is_array( $sauce ) )
    {
        sort( $sarray );
        $sarray = $sarray[ 0 ];
        $sarray = explode( "=", $sarray );
        $sauce = $sarray[1];
    }
}else
    $sauce = "http://img.4chan.org/b/res/22834898.html#22834898";;

if( array_filter( $argv, "is_mode" ) )
{
    $marray = array_filter( $argv, "is_mode" );
   
    sort( $marray );
    $marray = $marray[ 0 ];
    $marray = explode( "=", $marray );
   
    $MODE = $marray[1];
}

if( array_filter( $argv, "is_forum" ) )
{
    $farray = array_filter( $argv, "is_forum" );
   
    sort( $farray );
    $farray = $farray[ 0 ];
    $farray = explode( "=", $farray );
    $FORUM = $farray[1];
}

if( array_filteR( $argv, 'is_exec' ) )
{
    $doexec = true;
}

if( array_filter( $argv, "is_help" ) )
{
$version = '0.5-suave';
echo "
4chan Image Stripper ({$version})
Usage:
 php ./4cis.php [--sauce=URL] [--forum=TARGETFORUM] [--mode=MODE] [--exec=[true[false]]]
 php ./4cis.php [--help]

 --sauce - Use this instead of source in config

 --forum - Target 4chan forum

 --mode     - Valid modes are: list, wgetlist, onebigwget or all
    list - Display results as a list of URLs, \\n seperated
    wgetlist - Display results with wget commands on each line
    onebigwget - Display results as one long wget string
    all - Display each of the aforementioned

 --exec    - Set this =[true[false]] to turn on/off automatic download (only with wget options)

 --help - Display this message

";

die;

}

Name: Anonymous 2007-09-02 12:42 ID:dATqxgfm


################ DON'T NEED TO CONFIGURE BELOW THIS LINE LULZ ##################

switch( $FORUM )
{
    default:   
    case 'b':
        $template = "http://img.4chan.org/{$FORUM}/src/";
        break;

    case 'k':
        $template = "http://zip.4chan.org/{$FORUM}/src.cgi/";
        break;

    case 'h':
    case 's':
        $template = "http://cgi.4chan.org/{$FORUM}/src/";
        break;

    case 'hr':
                $template = "http://orz.4chan.org/{$FORUM}/src/";
                break;
   
    case 'r':
        $template = "http://cgi.4chan.org/{$FORUM}/src.cgi/";
        break;
       
    case 'wg':
        $template = "http://orz.4chan.org/{$FORUM}/src.cgi/";
        break;
       
}

$sauce = file( $sauce );

# get img URLs - GO!
foreach( $sauce as $line )
{
    if( strpos( $line, $template ) !== FALSE )
    {
        $start = strpos( $line, $template );
        $line = substr( $line, $start );
       
        $end = $dont = false;
       
        foreach( $imgtypes as $tkey => $type )
        {
            if( strpos( $line, $type ) !== FALSE && ( strpos( $line, $type ) < $end || !$end ) )
            {
                $end = strpos( $line, $type );
            }
       
        }
       
        if( !$dont )
        {
            reset( $imgtypes );
           
            $line = substr( $line, 0, $end+3 );

            if( $MODE == 'wgetlist' || $MODE == 'all' )
                $wgetlist .= 'wget ' . $line . $header . "\n";
           
            if( $MODE == 'onebigwget' || $MODE == 'all' )
                $onebigwget .= " " . $line;
           
            if( $MODE == 'list' || $MODE == 'all' )
                $list .= $line . "\n";
        }
    }
}

$sep = "-------------------------------------\n";

# which mode? OUTPUT GO!
if( $MODE == 'list' || $MODE == 'all' )
{
    echo $sep;
    echo "url list\n";
    echo $sep;
    echo $list . "\n";
}

if( $MODE == 'wgetlist' || $MODE == 'all' )
{
    echo $sep;
    echo "wget list\n";
    echo $sep;
    echo $wgetlist . "\n";
}

if( $MODE == 'onebigwget' || $MODE == 'all' )
{
    echo $sep;
    echo "one big wget\n";
    echo $sep;
    echo $onebigwget . "\n";
   
    if( $doexec )
    {
        exec( $onebigwget );
        exec( "rm -vf ./*.1" );
    }
}

# we're done here.
# anon

Name: Anonymous 2007-09-02 12:43 ID:dATqxgfm


//FUNCTIONS
function is_exec( $var )
{
    if( strpos( $var, '--exec=true' ) !== FALSE )
        return true;
    else
        return false;
}

function is_help( $var )
{
    if( strpos( $var, '--help' ) !== FALSE )
        return true;
    else
        return false;
}

function is_sauce( $var )
{
    if( strpos( $var, '--sauce=' ) !== FALSE )
        return true;
    else
        return false;
}

function is_mode( $var )
{
    if( strpos( $var, '--mode=' ) !== FALSE )
        return true;
    else
        return false;
}

function is_forum( $var )
{
    if( strpos( $var, '--forum=' ) !== FALSE )
        return true;
    else
        return false;
}

?>

Name: Anonymous 2007-09-02 12:46 ID:DqhsJzI2

$ php crapflood.php -t dis dis.4chan.org/prog "ONE WORD, THE FORCED CRAPFLOOD, THREAD FLOODED"

Name: Lord Fagginton 2007-09-02 12:46 ID:Heaven

php? Meh, would've been more efficient with perl.

Name: Anonymous 2007-09-02 12:47 ID:Heaven

php outside of webshit

rofl

kill yourself

Name: Anonymous 2007-09-02 12:48 ID:fOrwcs2n

LOL PHP

Name: Anonymous 2007-09-02 12:54 ID:dATqxgfm

>>25
>>26
>>27
Hey, it works (and rather well)

Name: Anonymous 2007-09-02 12:55 ID:Heaven

>>23
LOL PHP PROGRAMMERS. Did the word ``copypasta'' spring into your mind when you ``wrote'' those ``functions''?

Also,

function is_sauce( $var )
{
    return (strpos( $var, '--sauce=' ) !== FALSE);
}

Name: Anonymous 2007-09-02 12:56 ID:fOrwcs2n

I still prefer curl... but fuck it.

Name: Anonymous 2007-09-02 13:41 ID:Ib6fLclY

fail php script is made of fail and can't upload shit

Name: Anonymous 2007-09-02 13:45 ID:HgfNySsS

$ yo.pl
Usage: yo.pl COMMAND [OPTION]...
Allows to post and do other cruel things to 4chan's
boards. Use 'yo.pl COMMAND' for help on specific commands
Available commands are:
    post - floods 4chan's boards with images
    smile - smile :)
    sstorm - Ghost-bumps threads from last page, less blatant version
    unk1 - flood board with weird smiley
    whoa - posts image of nanohafan person to specific thread
$

Name: Anonymous 2007-09-02 13:48 ID:BUIrRq74

% yo.pl smile

Name: God 2007-09-02 13:52 ID:Heaven

>>32
GTFO cunt.

Name: Anonymous 2007-09-02 14:00 ID:DqhsJzI2

Name: Anonymous 2007-09-02 15:01 ID:izBjkGd2

/r/ yo.pl

Name: Anonymous 2007-09-02 15:02 ID:Heaven

>>32
Allows to post and do other cruel things to 4chan's boards.
Like we needed a perl script for that.

Name: Anonymous 2007-09-02 15:31 ID:Heaven

>>32
Fake shit is fake

Name: Anonymous 2007-09-02 23:47 ID:gR8XOyq0

10 GOTO 10

Name: Anonymous 2007-09-03 0:00 ID:kCjyhMjp


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List