get and save "1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg"

get and save "1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg"

Post by Max Bialys » Tue, 20 Feb 2007 11:30:32


Can this script be modified to get and save "1.jpg, 2.jpg, 3.jpg, 4.jpg,
5.jpg"?

'---------------
ssource = "http:// http://www.yqcomputer.com/ "
sDest = "C:\Users\User\Pictures\1.jpg"


set oHTTP = CreateObject("Microsoft.XMLHTTP")


oHTTP.open "GET", sSource, False
oHTTP.send


const adTypeBinary = 1
const adSaveCreateOverwrite = 2


set stream = createobject("adodb.stream")
stream.type = adTypeBinary
stream.mode = adModeReadWrite


stream.open
stream.write oHTTP.responseBody
stream.savetofile sDest, adSaveCreateOverwrite


stream.close


set oHTTP = nothing
set stream = nothing
 
 
 

get and save "1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg"

Post by Ravi » Tue, 20 Feb 2007 15:27:50


Have an array of all the image URIs and then do HTTP Send in a loop to
get each image. Something like
For Each image in ImageArray
sSource = "http:// http://www.yqcomputer.com/ " & image
sDest = "C:\Users\User\Pictures\" & image
oHTTP.open "GET", sSource, False
oHTTP.send
stream.open
stream.write oHTTP.responseBody
stream.savetofile sDest, adSaveCreateOverwrite
Next

Thanks
Ravikanth

 
 
 

get and save "1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg"

Post by Heinrich W » Tue, 20 Feb 2007 21:06:48

Ravi schrieb:


My virus scanner says there is a virus hidden in your message.
 
 
 

get and save "1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg"

Post by Ravi » Tue, 20 Feb 2007 21:58:12


Please use a web browser to read through google groups. Some E-mail
scanner block mails containing code snippets.

- Ravikanth
 
 
 

get and save "1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg"

Post by Tom Laveda » Tue, 20 Feb 2007 22:46:42


Or for this simple situation a FOR I=1 TO 5 loop works and is a bit
easier to write (no array of image names required) ...

For i = 1 to 5
sSource = "http:// http://www.yqcomputer.com/ " & i & ".jpg
sDest = "C:\Users\User\Pictures\" & i & ".jpg
oHTTP.open "GET", sSource, False
oHTTP.send
stream.open
stream.write oHTTP.responseBody
stream.savetofile sDest, adSaveCreateOverwrite
Next
 
 
 

get and save "1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg"

Post by Max Bialys » Wed, 21 Feb 2007 04:27:13

Tom,

That's terrific, thank you.

MB
 
 
 

get and save "1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg"

Post by Paul Randa » Wed, 21 Feb 2007 07:26:26

'Psyme' is a generic name for VBScript or JavaScript downloader Trojan which
exploits the
ADODB stream object vulnerabilty associated with Microsoft Internet Explorer
to silently download a file from a remote server to the local computer.

Your antivirus software can't know whether you are being exploited by this
script or
you want to see and use this script.

-Paul Randall