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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VBScript to Secure Copy files

Reply to Message Icon

Name: ingerulandrei
Date: August 8, 2008 at 01:10:49 Pacific
OS: xp, 2003
CPU/Ram: 1
Product: 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



Sponsored Link
Ads by Google

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

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


0

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

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,


0

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

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...)


0

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

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







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


Sponsored links

Ads by Google


Results for: VBScript to Secure Copy files

VBScript to delete duplicate files www.computing.net/answers/programming/vbscript-to-delete-duplicate-files/17889.html

vbscript to parse text file and com www.computing.net/answers/programming/vbscript-to-parse-text-file-and-com/16691.html

script to find path and copy files www.computing.net/answers/programming/script-to-find-path-and-copy-files-/15276.html