Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: Securing file access |
|---|---|
| Date: | Thu, 30 Sep 2004 05:07:05 -0400 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
<?php
if (!function_exists ("mime_content_type")) {
~ function mime_content_type ($file) { return exec ("file -bikn \"" .
escapeshellcmd($file) . "\""); }
}
if (!user_is_logged_in() || !user_has_access_to_doc($doc_id)) { print
"error"; exit; }
if ($doc_id) {
~ $query = "select name from docs where doc_id=$doc_id";
~ $result = db_query($query);~ if (db_numrows($result) < 1) { print "error"; exit; }
~ else { $row = db_fetch_array($result); }~ $mimt = mime_content_type($FILES_DIR.$row['name']);
~ if (!$mimt) { $mimt = "application/octet-stream"; }
~ header("Content-Type: $mimt");
~ header('Content-disposition: inline');
~ $fexist = readfile($FILES_DIR.$row['name']);
} else { exit_error("No document data.","No document to display -
invalid or inactive document number."); }
?>robbin wrote:
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBW8y3BtvwQGcl/zERAn6OAJ4qBlIC96PtUFXvAIKHv6WAR9LIAACdGeJZ x8kYrEV1CsS2dIFvvotLrYs= =7FBt -----END PGP SIGNATURE-----
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | List of Movies with security emphasis (in reply to: Hacking/security in main-stream media), saphyr |
|---|---|
| Next by Date: | Re: Hacking/security in main-stream media, Andrew Sledge |
| Previous by Thread: | Re: Securing file access, robbin |
| Next by Thread: | Re: Securing file access, robbin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |