Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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 copiedcopy *Mypic*.jpg

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,

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

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

![]() |
![]() |
![]() |

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