Permalink
Please sign in to comment.
Showing
with
116 additions
and 104 deletions.
- +1 −1 lib/ConfigInspector.py
- +13 −15 lib/CreateListingByCmd.py
- +20 −18 profile/debian/v6/kernel.py
- +11 −9 profile/debian/v6/mysql.py
- +10 −8 profile/debian/v6/php.py
- +10 −9 profile/debian/v6/ssh.py
- +20 −18 profile/rhel/v6/kernel.py
- +11 −9 profile/rhel/v6/mysql.py
- +10 −8 profile/rhel/v6/php.py
- +10 −9 profile/rhel/v6/ssh.py
@@ -1,18 +1,16 @@ | ||
import sys, os | ||
class CreateListingByCmd: | ||
- | ||
- def __init__(self, files_cmd_pairs): | ||
- | ||
- for out_file, cmd in files_cmd_pairs.items(): | ||
- self.os_cmd(cmd + " > ./inspection/"+out_file) | ||
- | ||
- def os_cmd(self, cmd): | ||
- result = os.system(cmd) | ||
- | ||
- if result <> 0: | ||
- print "Commander Error:", cmd, result | ||
- sys.exit(1) | ||
- | ||
- | ||
- | ||
+ | ||
+ def __init__(self, files_cmd_pairs): | ||
+ | ||
+ for out_file, cmd in files_cmd_pairs.items(): | ||
+ self.os_cmd(cmd + " > ./inspection/"+out_file) | ||
+ | ||
+ def os_cmd(self, cmd): | ||
+ result = os.system(cmd) | ||
+ | ||
+ if result <> 0: | ||
+ print "Commander Error:", cmd, result | ||
+ sys.exit(1) | ||
+ |
@@ -1,20 +1,22 @@ | ||
config = "/etc/sysctl.conf" | ||
-parameters={"net.ipv4.ip_forward":"0", | ||
- "net.ipv4.conf.all.send_redirects":"0", | ||
- "net.ipv4.conf.default.send_redirects":"0", | ||
- "net.ipv4.tcp_max_syn_backlog":"1280", | ||
- "net.ipv4.icmp_echo_ignore_broadcasts":"1", | ||
- "net.ipv4.conf.all.accept_source_route":"0", | ||
- "net.ipv4.conf.all.accept_redirects":"0", | ||
- "net.ipv4.conf.all.secure_redirects":"0", | ||
- "net.ipv4.conf.all.log_martians":"1", | ||
- "net.ipv4.conf.default.accept_source_route":"0", | ||
- "net.ipv4.conf.default.accept_redirects":"0", | ||
- "net.ipv4.conf.default.secure_redirects":"0", | ||
- "net.ipv4.icmp_echo_ignore_broadcasts":"1", | ||
- "net.ipv4.icmp_ignore_bogus_error_responses":"1", | ||
- "net.ipv4.tcp_syncookies":"1", | ||
- "net.ipv4.conf.all.rp_filter":"1", | ||
- "net.ipv4.conf.default.rp_filter":"1", | ||
- "net.ipv4.tcp_timestamps":"0"} | ||
+parameters = { | ||
+ "net.ipv4.ip_forward":"0", | ||
+ "net.ipv4.conf.all.send_redirects":"0", | ||
+ "net.ipv4.conf.default.send_redirects":"0", | ||
+ "net.ipv4.tcp_max_syn_backlog":"1280", | ||
+ "net.ipv4.icmp_echo_ignore_broadcasts":"1", | ||
+ "net.ipv4.conf.all.accept_source_route":"0", | ||
+ "net.ipv4.conf.all.accept_redirects":"0", | ||
+ "net.ipv4.conf.all.secure_redirects":"0", | ||
+ "net.ipv4.conf.all.log_martians":"1", | ||
+ "net.ipv4.conf.default.accept_source_route":"0", | ||
+ "net.ipv4.conf.default.accept_redirects":"0", | ||
+ "net.ipv4.conf.default.secure_redirects":"0", | ||
+ "net.ipv4.icmp_echo_ignore_broadcasts":"1", | ||
+ "net.ipv4.icmp_ignore_bogus_error_responses":"1", | ||
+ "net.ipv4.tcp_syncookies":"1", | ||
+ "net.ipv4.conf.all.rp_filter":"1", | ||
+ "net.ipv4.conf.default.rp_filter":"1", | ||
+ "net.ipv4.tcp_timestamps":"0" | ||
+} |
@@ -1,11 +1,13 @@ | ||
config = "/etc/mysql/my.cnf" | ||
-parameters = { "socket":"/var/run/mysqld/mysqld.sock", | ||
- "user":"mysql", | ||
- "port":"3306", | ||
- "basedir":"/usr", | ||
- "datadir":"/var/lib/mysql", | ||
- "tempdir":"/tmp", | ||
- "bind-address":"127.0.0.1", | ||
- "skip-networking":"#", | ||
- "symbolic-links":"0"} | ||
+parameters = { | ||
+ "socket":"/var/run/mysqld/mysqld.sock", | ||
+ "user":"mysql", | ||
+ "port":"3306", | ||
+ "basedir":"/usr", | ||
+ "datadir":"/var/lib/mysql", | ||
+ "tempdir":"/tmp", | ||
+ "bind-address":"127.0.0.1", | ||
+ "skip-networking":"#", | ||
+ "symbolic-links":"0" | ||
+} |
@@ -1,11 +1,13 @@ | ||
#config = "/etc/php5/apache2/php.ini" | ||
config = "/etc/php5/cli/php.ini" | ||
-parameters = { "safe_mode":"On", | ||
- "expose_php":"Off", | ||
- "open_basedir":"/sftp", | ||
- "register_globals":"Off", | ||
- "display_errors":"Off", | ||
- "log_errors":"On", | ||
- "allow_url_fopen":"Off", | ||
- "disable_functions":"exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source"} | ||
+parameters = { | ||
+ "safe_mode":"On", | ||
+ "expose_php":"Off", | ||
+ "open_basedir":"/sftp", | ||
+ "register_globals":"Off", | ||
+ "display_errors":"Off", | ||
+ "log_errors":"On", | ||
+ "allow_url_fopen":"Off", | ||
+ "disable_functions":"exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source" | ||
+} |
@@ -1,11 +1,12 @@ | ||
config = "/etc/ssh/sshd_config" | ||
-parameters = { "PermitRootLogin":"no", | ||
- "PermitEmptyPasswords":"no", | ||
- "Protocol":"2", | ||
- "StrictModes":"yes", | ||
- "LoginGraceTime":"30", | ||
- "IgnoreRhosts":"yes", | ||
- "ServerKeyBits":"768", | ||
- "MaxAuthTries":"3"} | ||
- | ||
+parameters = { | ||
+ "PermitRootLogin":"no", | ||
+ "PermitEmptyPasswords":"no", | ||
+ "Protocol":"2", | ||
+ "StrictModes":"yes", | ||
+ "LoginGraceTime":"30", | ||
+ "IgnoreRhosts":"yes", | ||
+ "ServerKeyBits":"768", | ||
+ "MaxAuthTries":"3" | ||
+} |
@@ -1,20 +1,22 @@ | ||
config = "/etc/sysctl.conf" | ||
-parameters={"net.ipv4.ip_forward":"0", | ||
- "net.ipv4.conf.all.send_redirects":"0", | ||
- "net.ipv4.conf.default.send_redirects":"0", | ||
- "net.ipv4.tcp_max_syn_backlog":"1280", | ||
- "net.ipv4.icmp_echo_ignore_broadcasts":"1", | ||
- "net.ipv4.conf.all.accept_source_route":"0", | ||
- "net.ipv4.conf.all.accept_redirects":"0", | ||
- "net.ipv4.conf.all.secure_redirects":"0", | ||
- "net.ipv4.conf.all.log_martians":"1", | ||
- "net.ipv4.conf.default.accept_source_route":"0", | ||
- "net.ipv4.conf.default.accept_redirects":"0", | ||
- "net.ipv4.conf.default.secure_redirects":"0", | ||
- "net.ipv4.icmp_echo_ignore_broadcasts":"1", | ||
- "net.ipv4.icmp_ignore_bogus_error_responses":"1", | ||
- "net.ipv4.tcp_syncookies":"1", | ||
- "net.ipv4.conf.all.rp_filter":"1", | ||
- "net.ipv4.conf.default.rp_filter":"1", | ||
- "net.ipv4.tcp_timestamps":"0"} | ||
+parameters = { | ||
+ "net.ipv4.ip_forward":"0", | ||
+ "net.ipv4.conf.all.send_redirects":"0", | ||
+ "net.ipv4.conf.default.send_redirects":"0", | ||
+ "net.ipv4.tcp_max_syn_backlog":"1280", | ||
+ "net.ipv4.icmp_echo_ignore_broadcasts":"1", | ||
+ "net.ipv4.conf.all.accept_source_route":"0", | ||
+ "net.ipv4.conf.all.accept_redirects":"0", | ||
+ "net.ipv4.conf.all.secure_redirects":"0", | ||
+ "net.ipv4.conf.all.log_martians":"1", | ||
+ "net.ipv4.conf.default.accept_source_route":"0", | ||
+ "net.ipv4.conf.default.accept_redirects":"0", | ||
+ "net.ipv4.conf.default.secure_redirects":"0", | ||
+ "net.ipv4.icmp_echo_ignore_broadcasts":"1", | ||
+ "net.ipv4.icmp_ignore_bogus_error_responses":"1", | ||
+ "net.ipv4.tcp_syncookies":"1", | ||
+ "net.ipv4.conf.all.rp_filter":"1", | ||
+ "net.ipv4.conf.default.rp_filter":"1", | ||
+ "net.ipv4.tcp_timestamps":"0" | ||
+} |
@@ -1,11 +1,13 @@ | ||
config = "/etc/mysql/my.cnf" | ||
-parameters = { "socket":"/var/run/mysqld/mysqld.sock", | ||
- "user":"mysql", | ||
- "port":"3306", | ||
- "basedir":"/usr", | ||
- "datadir":"/var/lib/mysql", | ||
- "tempdir":"/tmp", | ||
- "bind-address":"127.0.0.1", | ||
- "skip-networking":"#", | ||
- "symbolic-links":"0"} | ||
+parameters = { | ||
+ "socket":"/var/run/mysqld/mysqld.sock", | ||
+ "user":"mysql", | ||
+ "port":"3306", | ||
+ "basedir":"/usr", | ||
+ "datadir":"/var/lib/mysql", | ||
+ "tempdir":"/tmp", | ||
+ "bind-address":"127.0.0.1", | ||
+ "skip-networking":"#", | ||
+ "symbolic-links":"0" | ||
+} |
@@ -1,10 +1,12 @@ | ||
config = "/etc/php.ini" | ||
-parameters = { "safe_mode":"On", | ||
- "expose_php":"Off", | ||
- "open_basedir":"/sftp", | ||
- "register_globals":"Off", | ||
- "display_errors":"Off", | ||
- "log_errors":"On", | ||
- "allow_url_fopen":"Off", | ||
- "disable_functions":"exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source"} | ||
+parameters = { | ||
+ "safe_mode":"On", | ||
+ "expose_php":"Off", | ||
+ "open_basedir":"/sftp", | ||
+ "register_globals":"Off", | ||
+ "display_errors":"Off", | ||
+ "log_errors":"On", | ||
+ "allow_url_fopen":"Off", | ||
+ "disable_functions":"exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source" | ||
+} |
@@ -1,11 +1,12 @@ | ||
config = "/etc/ssh/sshd_config" | ||
-parameters = { "PermitRootLogin":"no", | ||
- "PermitEmptyPasswords":"no", | ||
- "Protocol":"2", | ||
- "StrictModes":"yes", | ||
- "LoginGraceTime":"30", | ||
- "IgnoreRhosts":"yes", | ||
- "ServerKeyBits":"768", | ||
- "MaxAuthTries":"3"} | ||
- | ||
+parameters = { | ||
+ "PermitRootLogin":"no", | ||
+ "PermitEmptyPasswords":"no", | ||
+ "Protocol":"2", | ||
+ "StrictModes":"yes", | ||
+ "LoginGraceTime":"30", | ||
+ "IgnoreRhosts":"yes", | ||
+ "ServerKeyBits":"768", | ||
+ "MaxAuthTries":"3" | ||
+} |
0 comments on commit
c19a3df