Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript to Secure Copy files

Status
Not open for further replies.

ingerulandrei

Technical User
Aug 8, 2008
1
BE
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


 
You'll have to do a binary read of the first bytes of the file, and check the contents for markers the format is supposed to have.
For instance, a .gif starts with GIF, jpeg has TFIF in the first ten bytes etcetera. You'll have to find a list of file extensions and their marker end code that in.

Read this :

It talks about magic bytes, which is what I mean
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top