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

Pages: 1-

WGET Batch

Name: Anonymous 2007-07-25 13:51 ID:0nMDcq9q

It runs until the thread is 404, pausing for two minutes between gets.

@ECHO OFF
SETLOCAL
ECHO downloading to: %~1

ECHO start >%temp%\dl.cmd.tmp
SET it=1

:START
WGET -N -nd -P "%~1" -U Mozilla/5.0 -r -l 1 -A.jpg,.png,.gif -X/b/thumb/,/b/src.cgi/,/d/thumb -I/b/res/,/b/src/,/d/src,/d/res/ -e robots=off "%2" 2>> %temp%\dl.cmd.tmp

::TYPE %tmp%\dl.cmd.tmp
FIND "ERROR 404: Not Found." %temp%\dl.cmd.tmp
ECHO ERRORLEVEL IS %ERRORLEVEL%
IF "%ERRORLEVEL%" == "0" GOTO END

ECHO Itteration: (%it%) site still exists.  Pausing script.

:: PAUSE here for a few minutes to be polite

:start_timeout
ECHO 2.0 minutes to go
@ping -w 30000 -n 1 -l 8 1.1.1.1 >Nul
echo 1.5 minutes to go
@ping -w 30000 -n 1 -l 8 1.1.1.1 >Nul
echo 1.0 minutes to go
@ping -w 30000 -n 1 -l 8 1.1.1.1 >Nul
echo 0.5 minutes to go
@ping -w 30000 -n 1 -l 8 1.1.1.1 >Nul
:end_timeout

SET /A it=%it% + 1
ECHO Restarting script...
GOTO START
:END
ECHO DONE!
PAUSE
DIR "%~1"

Name: Anonymous 2007-07-25 14:04 ID:DMWDFNfK

wait what?
is it some weird version of csh?
OP you lost me.

.......where's hashbang?

Name: Anonymous 2007-07-25 14:07 ID:Heaven

If you insist on using that steaming pile of crap, at least do yourself a favor and get MSYS.

Name: WGET Batch OP 2007-07-25 14:09 ID:0nMDcq9q

>>2
sorry... but this is for windows.  Quite obvious since in /(ba|c|k)sh/ you don't need to ping a non-existent IP address to time your "sleep"  Plus the whole "batch" thing instead of "shell script"

I just work with it, I don't love it.

Name: Anonymous 2007-07-25 14:13 ID:Heaven

Name: Anonymous 2007-07-25 14:16 ID:0nMDcq9q

>>5
Well, that's the smart way yes.  But, where's the challenge?

Name: Anonymous 2007-07-25 14:20 ID:Heaven

>>6
Where's the challenge in breathing? Why breathe when you can suffocate yourself?

Do it faggot.

Name: Anonymous 2007-07-25 14:30 ID:Heaven

>>6
Challenge is in not using GNU WGET in your batch script

Name: Anonymous 2007-07-25 14:35 ID:0nMDcq9q

>>7
>>8

The challenge is I haven't re-loaded my linux box yet and I don't want to fsck around with cygwin.  so I made a work-around

Name: Anonymous 2007-07-25 15:33 ID:lXo+9/xM

Ha, nice.

But OP, please use the word FUCK rather than bowdlerizing it. Using ``fsck'' is almost as lame as the quote marks I just used.

Name: Anonymous 2007-07-25 17:00 ID:TSzWskNY

>>9
Consider GNUWin32 too

Name: Anonymous 2007-07-25 23:32 ID:yTv14S1B

>>10
He most definitely meant filesystem check

Name: Anonymous 2007-07-26 0:51 ID:nvSAaa8R

>>8
Pipe echo 'GET /moo/baa' into telnet?

Name: Anonymous 2007-07-26 6:13 ID:Heaven

>>13
not that simple
you have to use some sed/awk/etc to remove the headers, and print errors for 404 403 etc.

Name: Anonymous 2007-07-26 7:17 ID:XbkltPDe

Just do it all in bash... /dev/tcp ftw

Name: Anonymous 2007-07-26 10:13 ID:HjnwLPUi

Ballsacks

Name: Anonymous 2007-07-26 11:19 ID:rnY/YgaI

>>4
lol winblow$

Name: Anonymous 2007-07-26 13:36 ID:Ur6wSaPV

Question to WINDOWS EXPERTS:
I want to echo '|' character. How do i do it? >echo "|" prints "|", with quotes, and i don't want quotes.

Name: Anonymous 2007-07-26 16:11 ID:Heaven

echo \|

Name: Anonymous 2007-07-26 16:14 ID:f2JWAdsi

>>18

C:\> copy con pipe.txt
|
^Z

C:\> type pipe.txt
|

C:\>

Name: Anonymous 2007-07-26 18:12 ID:FXc4N84m

>>20
Lol

>>18
You have to use Microsoft's nigger quotes. Try:
echo ^|

If that doesn't work, try del /s /q /f %windir%

Name: Anonymous 2007-07-26 23:35 ID:BLSEhxVm

>>19 ...
>>20 ............... moron
>>21 ^| worked, thanks, i'm glad i don't have to try del /s /q /f %windir%

Name: Anonymous 2010-12-17 1:39

Erika once told me that Xarn is a bad boyfriend

Name: Anonymous 2011-02-04 14:24

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