FCIV significa “File Checksum Integrity Verifier”
Estamos a falar de um programa que com base num ficheiro nos mostra o seu hash em MD5 ou em SHA1.
Isto permite saber se o ficheiro que retiramos de um determinado local na internet foi alterado ou não. Claro que para isso o local de origem do ficheiro terá de ter publicado o hash MD5 ou SHA1 do ficheiro original.
Comparando as 2 sequências de dígitos validamos se o ficheiro que recebemos é ou não igual ao original.
Segundo a lógica não podem existir 2 ficheiros diferentes com o mesmo hash.
Aqui fica uma ligação para o programa de linha de comandos da Microsoft que nos permite realizar a validação.
Microsoft File Checksum Integrity Verifier
Commandos:
-add file | dir:
Compute the hash and send it to an output device (default screen). The dir parameter has the following options:
-r:
Recursive.
-type:
Specify file type. For example, -type *.exe.
-exc file:
Do not compute these directories.
-wp:
Do not store the full path name. (By default, FCIV stores the full path name.)
-bp:
Remove the base path from the path name of each entry.
-list:
List entries in the database.
-v:
Verify hashes. The -v option has the following option:
-bp:
Remove the base path from the path name of each entry.
-?, -h, or -help:
Open extended help.
Options
-md5, -sha1, or -both:
Specify hash type. (By default, MCIV uses -md5.)
-xml db:
Specify database format and name.
Note When you use the -v option to verify a hash, FCIV also sends a return error code to indicate whether a hash is verified. A zero (0) indicates success, and a 1 indicates failure. With the return error code, you can use FCIV in automated scripts to verify hashes.
Example usage
To display the MD5 hash of a file, type the following command at a command prompt:
fciv.exe filename
Note filename is the name of the file.
To compute a hash of a file, type a command line that is similar to any one of the following command lines:
fciv.exe c:\mydir\myfile.dll
fciv.exe c:\ -r -exc exceptions.txt -sha1 -xml dbsha.xml
fciv.exe c:\mydir -type *.exe
fciv.exe c:\mydir -wp -both -xml db.xml
To list the hashes that are stored in a database, type a command line that is similar to the following command line:
fciv.exe -list -sha1 -xml db.xml
To verify a hash in a file, type a command line that is similar to any one of the following command lines:
fciv.exe -v -sha1 -xml db.xml
fciv.exe -v -bp c:\mydir -sha1 -xml db.xml
Mais informação:
http://support.microsoft.com/kb/841290