home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 3476
Discussions: 188,359, Posts: 2,243,327, Members: 232,587
Old October 8th, 2007, 12:37 PM   Digg it!   #1 (permalink)
Mobile Member
 
ShuckyD's Avatar
 
Join Date: Apr 2005
Location: S. Central PA
Posts: 3,541
reading a .bat file

I have a .bat file here which is very well "un-documented" if i can say so myself

Anyway its something that a certain dept. knows to run everyday and is simply called t.bat, so someone came over to me today and said can you write something up in case this breaks, we have no idea what it does, and see the thing is the person who wrote it (awhile back) has left the company

So here goes the code, i think i got some of it, but I wanted to know what you guys may get from it that I am missing.
Code:
SET TMP=tmp_ftp_script
SET URL=ftp.unnamedsite.com
SET USR=anonymous
SET PAS=info@mydomain.com

echo open %URL%>%TMP%
echo %USR%>>%TMP%
echo %PAS%>>%TMP%
echo put \\servername\directory\newfiles\custom.txt%1>>%TMP%
echo quit>>%TMP%
ftp -s:%TMP%
pause
What does the "1" mean after the UNC path of the servername and filename also what is the tmp_ftp_script used for? Is it only to hold a temp file of the things that happened when the bat file ran?
__________________
Thinkpad T61 14.1 wide | WinXP Pro | Intel C2D T8300 2.4ghz CPU | 3GB DDR2
AGN WiFi, BT, WWAN | 256mb NVS140 graphics | 160GB 7200RPM HDD

ShuckyD is online now   Reply With Quote
Old October 8th, 2007, 01:55 PM     #2 (permalink)
Ultimate Member
 
Steve R Jones's Avatar
 
Join Date: Oct 2001
Location: Dallas, TX
Posts: 6,973
When I see files like this I zap it and start scanning for viruses.....

SET USR=anonymous
SET PAS=info@mydomain.com

Look like it's making it easier for someone/anyone to FTP into the machine in question.

Steve R Jones is offline   Reply With Quote
Old October 8th, 2007, 03:35 PM     #3 (permalink)
Mobile Member
 
ShuckyD's Avatar
 
Join Date: Apr 2005
Location: S. Central PA
Posts: 3,541
i know

The usr i guess is the FTP username and Pas is the password... its an FTP site for a big organization to, they run this program and it uploads the file to them for reporting purposes... How can i see what its doing better and document it more.. I know FTP via a .bat file is scary, especially since I didnt know about it

ShuckyD is online now   Reply With Quote
Old October 8th, 2007, 04:06 PM     #4 (permalink)
Banned
 
Keymaker's Avatar
 
Join Date: Jan 2005
Location: Loveland, CO
Posts: 5,492
Blog Entries: 2
Send a message via ICQ to Keymaker Send a message via Yahoo to Keymaker
Looks like a way of logging passwords. Hench the temp directory used.
Keymaker is offline   Reply With Quote
Old October 8th, 2007, 05:21 PM     #5 (permalink)
Member
 
Join Date: Dec 2001
Posts: 407
Well looks like it's uploading this file \\servername\directory\newfiles\custom.txt to the ftp site. Can you check the server specified and see what's inside custom.txt?
Ebisoba is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need bat file or script... BBA Webmastering and Programming 3 April 16th, 2007 01:07 AM
Help with writing .bat file MitaDC Applications and Operating Systems 1 June 21st, 2006 03:50 PM
Create a .bat file shotokan General Tech Discussion 10 May 28th, 2003 10:13 AM
autoexec.bat file isup General Tech Discussion 16 October 24th, 2002 04:20 PM
how do I get a .bat file to run in whatever directory it's in? zskillz Technical Support 18 October 17th, 2002 12:59 AM

Most Active Discussions
Is It Just Me? (2862)
Obama plans to CUT taxes (48)
I think I just killed my computer w.. (24)
Folderchat Weekday thread (432)
Antec 300 bulk purchase? (11)
Worth the upgrade?? (14)
Dual Modem Connection for Internet? (6)
Titan quest and Immortal Throne, an.. (17)
FolderChat: Weekend time again! (375)
Recent Discussions
Upgrading RAM (2)
Dual booting problem (2)
CS/COND ZERO AGAIN (2)
Best Graphic card under 110£ (2)
Screensavers in Vista (6)
Artifact problem (2)
hp compaq nc6000 problems (137)
Need Help with a excel formual (1)
Genuine Broadband Connection my.. (11)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 02:04 PM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28