From 14d4fda0c2fd0a4ddde0eaeda271a2c012249cd1 Mon Sep 17 00:00:00 2001 From: Bill Marquette Date: Fri, 15 Jul 2011 14:01:46 -0500 Subject: use constants for all paths, add responder support --- config/imspector-wip/imspector.inc | 40 ++++++++++++++++++++++------ config/imspector-wip/imspector.xml | 54 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 8 deletions(-) (limited to 'config/imspector-wip') diff --git a/config/imspector-wip/imspector.inc b/config/imspector-wip/imspector.inc index 2151755e..36cf7bec 100644 --- a/config/imspector-wip/imspector.inc +++ b/config/imspector-wip/imspector.inc @@ -230,30 +230,31 @@ if(isset($imspector_config["ssl_ca_cert"]) && $imspector_config["ssl_ca_cert"] != "none" && isset($imspector_config["ssl_server_cert"]) && $imspector_config["ssl_server_cert"] != "none") { $conf['ssl'] = "on"; - if(!is_dir("/usr/local/etc/imspector/ssl")) - mkdir("/usr/local/etc/imspector/ssl"); + if(!is_dir(IMSPECTOR_ETC . "/ssl")) + mkdir(IMSPECTOR_ETC . "/ssl"); $ca_cert = lookup_ca($imspector_config["ssl_ca_cert"]); if ($ca_cert != false) { if(base64_decode($ca_cert['prv'])) { - file_put_contents("/usr/local/etc/imspector/ssl/ssl_ca_key.pem", + file_put_contents(IMSPECTOR_ETC . "/ssl/ssl_ca_key.pem", base64_decode($ca_cert['prv'])); - $conf['ssl_ca_key'] = '/usr/local/etc/imspector/ssl/ssl_ca_key.pem'; + $conf['ssl_ca_key'] = IMSPECTOR_ETC . '/ssl/ssl_ca_key.pem'; } if(base64_decode($ca_cert['crt'])) { - file_put_contents("/usr/local/etc/imspector/ssl/ssl_ca_cert.pem", + file_put_contents(IMSPECTOR_ETC . "/ssl/ssl_ca_cert.pem", base64_decode($ca_cert['crt'])); - $conf['ssl_ca_key'] = "/usr/local/etc/imspector/ssl/ssl_ca_cert.pem"; + $conf['ssl_ca_cert'] = IMSPECTOR_ETC . "/ssl/ssl_ca_cert.pem"; } $svr_cert = lookup_cert($imspector_config["ssl_server_cert"]); if ($svr_cert != false) { if(base64_decode($svr_cert['prv'])) { - file_put_contents("/usr/local/etc/imspector/ssl/ssl_server_key.pem", + file_put_contents(IMSPECTOR_ETC . "/ssl/ssl_server_key.pem", base64_decode($svr_cert['prv'])); - $conf['ssl_key'] = '/usr/local/etc/imspector/ssl/ssl_server_key.pem'; + $conf['ssl_key'] = IMSPECTOR_ETC . '/ssl/ssl_server_key.pem'; } } + $conf['ssl_cert_dir'] = IMSPECTOR_ETC . '/ssl'; } } else { // SSL Not enabled. Make sure Jabber-SSL is not processed. @@ -261,6 +262,29 @@ unset($conf['ssl']); } + if (isset($imspector_config['resonder']) && $imspector_config['resonder'] == 'on') { + $conf['responder_filename'] = IMSPECTOR_ETC . "/responder.db"; + if (isset($imspector_config['prefix_message']) && $imspector_config['prefix_message'] != '' ) { + $conf['response_prefix'] = base64_decode($imspector_config['prefix_message']); + } + if (isset($imspector_config['notice_days']) && is_numeric($imspector_config['notice_days'])) { + if ($imspector_config['notice_days'] != 0) { + $conf['notice_days'] = $imspector_config['notice_days']; + } + } else { + $conf['notice_days'] = 1; + } + $conf['notice_response'] = "Your activities are being logged"; + if (isset($imspector_config['filtered_minutes']) && is_numeric($imspector_config['filtered_minutes'])) { + if ($imspector_config['filtered_minutes'] != 0) { + $conf['filtered_mins'] = $imspector_config['filtered_minutes']; + } + } else { + $conf['filtered_mins'] = 15; + } + $conf['filtered_response'] = "Your message has been filtered"; + } + $conftext = ''; foreach($conf as $var => $key) $conftext .= "{$var}={$key}\n"; diff --git a/config/imspector-wip/imspector.xml b/config/imspector-wip/imspector.xml index 20c661cd..e0e37ac9 100644 --- a/config/imspector-wip/imspector.xml +++ b/config/imspector-wip/imspector.xml @@ -194,6 +194,60 @@ Replace characters of matched bad word with *. checkbox + + Enable response messages + resonder + + Inform the users (both local and remote) that the conversation they are having is being recorded. This might be needed for legal reasons. + Inform the sender that a file (or message) was blocked. This is useful because the sender will know a block occured, instead of the transfer simply failing. + checkbox + + + Notification frequency + notice_days + input + Frequency in number of days for notifying users they are being logged. Default 1 day if responses are enabled, set to 0 to disable + + + Filtered frequency + filtered_minutes + input + The time between sending “filtered” in minutes. Default 15 minutes if responses are enabled, set to 0 to disable + + + Custom message prefix + prefix_message + + Message to prepend to all IMSpector generated messages. The default is "Message from IMSpector" + + textarea + base64 + 5 + 40 + + + Custom recorded message response + recorded_message + + Message to send to users to let them know they are being recorded. The default is "Your activities are being logged" + + textarea + base64 + 5 + 40 + + + Custom filtered message response + filtered_message + + Message to send to users to let them know about filtered messages. + + textarea + base64 + 5 + 40 + + Bad words list badwords_list -- cgit v1.2.3