Computing.Net > Forums > Programming > VBScript to Secure Copy files

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

VBScript to Secure Copy files

Reply to Message Icon

Original Message
Name: ingerulandrei
Date: August 8, 2008 at 01:10:49 Pacific
Subject: VBScript to Secure Copy files
OS: xp, 2003
CPU/Ram: 1
Model/Manufacturer: 1
Comment:

Hello

My name is Andrei, and I need some help please. Note that my knowledge about VBscript is very limited.
My problem: I have to copy some jpg/xls files from one location to another (automated script/batch).
But security is essential: I want to make sure that what is copied is actually what it is supposed to be (jpg or xls, not a .exe file renamed, or other files).

Any sort of information is highly appreciated,

Thank you very much,

Andrei


Report Offensive Message For Removal


Response Number 1
Name: Hans Henrik
Date: August 8, 2008 at 01:48:24 Pacific
Reply: (edit)

im not sure how to do this in VBScript but in batch, you can use "*.jpg" or "*FileName*.jpg"
and i guess VBScript is similar (tho i don't really know)

heres an example
files:
Mypic.jpg.exe << Wont be copied!
Mypic.exe.jpg << Will be copied (but jpg ext isn't executable)
mypic.jpg << Will be copied

copy *Mypic*.jpg


Report Offensive Follow Up For Removal

Response Number 2
Name: ingerulandrei
Date: August 8, 2008 at 01:54:32 Pacific
Reply: (edit)

Thanks for your quick reply.
I am actually more interested to be sure that the actual file type is a picture or excel file and not something else.

So, if I have I smart guy that wants to copy over "malware.exe" and it renames it to house.jpg, the script will be able to see that the copied file is not a picture.

Therefore I need something that probably opens the file and checks what kind of file it is.

Thanks,


Report Offensive Follow Up For Removal

Response Number 3
Name: Hans Henrik
Date: August 8, 2008 at 02:12:27 Pacific
Reply: (edit)

ehm... that will be almost impossible, i know the system-admins on my school once tried something like this, i got past it by like a 100 ways

1 way was to Winrar it with encryption
1 oter way was to use a hex-editor, and add the top of a "COM" file in the first parts of exe (i could just remove that l8r), and i guess theres a bounch of oter ways 2..
they used a "command-line hex-editor" program, but i dont really remember its name, sorry :/ (but as said ^ thats gonna be very hard to make good security on...)


Report Offensive Follow Up For Removal

Response Number 4
Name: Razor2.3
Date: August 12, 2008 at 00:46:37 Pacific
Reply: (edit)

If you're worried about people sneaking programs onto your systems, you should be looking at other alternatives, like white listing.


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home








Do you have your own blog?

Yes
No
I did before
I will soon


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge
Poll History




Data Recovery Software