=========================================================== .___ __ __ _________________ __ __ __| _/|__|/ |_ / ___\_` __ \__ \ | | \/ __ | | \\_ __\ / /_/ > | \// __ \| | / /_/ | | || | \___ /|__| (____ /____/\____ | |__||__| /_____/ \/ \/ grep rough audit - static analysis tool v2.8 written by @Wireghoul =================================[justanotherhacker.com]=== sqlgrey-1.8.0/sqlgrey.ebuild-209- einfo "Creating SQLgrey PostgreSQL database \"${SQLgrey_DB_NAME}\" and user \"${SQLgrey_DB_USER_NAME}\"" sqlgrey-1.8.0/sqlgrey.ebuild:210: /usr/bin/psql -h ${SQLgrey_DB_HOST} -d template1 -U postgres -c "CREATE USER ${SQLgrey_DB_USER_NAME} WITH PASSWORD '${SQLgrey_DB_USER_PWD}' NOCREATEDB NOCREATEUSER; CREATE DATABASE ${SQLgrey_DB_NAME}; GRANT ALL PRIVILEGES ON DATABASE ${SQLgrey_DB_NAME} TO ${SQLgrey_DB_USER_NAME}; GRANT ALL PRIVILEGES ON SCHEMA public TO ${SQLgrey_DB_USER_NAME}; UPDATE pg_database SET datdba=(SELECT usesysid FROM pg_shadow WHERE usename='${SQLgrey_DB_USER_NAME}') WHERE datname='${SQLgrey_DB_NAME}';" sqlgrey-1.8.0/sqlgrey.ebuild-211- ############################################## sqlgrey-1.8.0/update_sqlgrey_config-30-# Get whitelists host and pidfile from conf sqlgrey-1.8.0/update_sqlgrey_config:31:whitelist_host=`grep "^[[:space:]]*whitelists_host" $CONF | cut -d= -f2 | awk '{print $1}'` sqlgrey-1.8.0/update_sqlgrey_config-32-if [ -z "$whitelists_host" ] ############################################## sqlgrey-1.8.0/update_sqlgrey_config-35-fi sqlgrey-1.8.0/update_sqlgrey_config:36:pidfile=`grep "^[[:space:]]*pidfile" $CONF | cut -d= -f2 | awk '{print $1}'` sqlgrey-1.8.0/update_sqlgrey_config-37-if [ -z "$pidfile" ] ############################################## sqlgrey-1.8.0/update_sqlgrey_config-42-# Go into a temp directory sqlgrey-1.8.0/update_sqlgrey_config:43:MYTMP=`mktemp -d ${TMPDIR:-/tmp}/sqlgrey.XXXXXX` sqlgrey-1.8.0/update_sqlgrey_config-44-[ -n "$MYTMP" -a -d "$MYTMP" ] && cd $MYTMP || { ############################################## sqlgrey-1.8.0/update_sqlgrey_config-61-cd $MYDIR sqlgrey-1.8.0/update_sqlgrey_config:62:TOUPDATE=`md5sum -c $MYTMP/MD5SUMS 2>/dev/null | grep FAILED | cut -d: -f1` sqlgrey-1.8.0/update_sqlgrey_config-63- ############################################## sqlgrey-1.8.0/update_sqlgrey_config-70-# copy old files sqlgrey-1.8.0/update_sqlgrey_config:71:for whitelist in `cat MD5SUMS|awk '{print $2}'` sqlgrey-1.8.0/update_sqlgrey_config-72-do ############################################## sqlgrey-1.8.0/update_sqlgrey_config-101-# Reload whitelists sqlgrey-1.8.0/update_sqlgrey_config:102:kill -USR1 `cat $pidfile` sqlgrey-1.8.0/update_sqlgrey_config-103- ############################################## sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-171- # actual mail sending sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey:172: my $return = system("echo '$content' | mail -s '$subject' $self->{sqlgrey}{admin_mail}"); sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-173- if ($return != 0) { ############################################## sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1258- $self->do("DELETE FROM $from_awl " . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey:1259: 'WHERE sender_name = ' . $self->quote($sender_name) . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1260- ' AND sender_domain = ' . $self->quote($sender_domain) . ############################################## sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1276- $self->do("DELETE FROM $domain_awl " . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey:1277: 'WHERE sender_domain = ' . $self->quote($sender_domain) . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1278- ' AND src = ' . $self->quote($host)); ############################################## sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1294- 'SET last_seen = NOW(), first_seen = first_seen ' . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey:1295: 'WHERE sender_name = ' . $self->quote($sender_name) . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1296- ' AND sender_domain = ' . $self->quote($sender_domain) . ############################################## sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1304- 'SET last_seen = NOW(), first_seen = first_seen ' . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey:1305: 'WHERE sender_domain = ' . $self->quote($sender_domain) . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1306- ' AND src = ' . $self->quote($host)); ############################################## sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1429- $self->do("DELETE FROM $from_awl " . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey:1430: 'WHERE sender_domain = ' . $self->quote($domain) . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1431- ' AND src = ' . $self->quote($host)); ############################################## sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1436- $self->do("DELETE FROM $connect " . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey:1437: 'WHERE sender_domain = ' . $self->quote($domain) . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1438- ' AND src = ' . $self->quote($host)); ############################################## sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1586- $self->do("DELETE FROM $connect " . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey:1587: 'WHERE src = ' . $self->quote($addr) . sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-1588- ' AND sender_domain = ' . $self->quote($sender_domain) . ############################################## sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-2313- $self->mylog('whitelist', 2, sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey:2314: "$sender_name\@$sender_domain, $addr($fqdn) -> $recipient"); sqlgrey-1.8.0/.pc/0004-allow-false-in-config.patch/sqlgrey-2315- return $self->{sqlgrey}{prepend} ? ############################################## sqlgrey-1.8.0/sqlgrey-171- # actual mail sending sqlgrey-1.8.0/sqlgrey:172: my $return = system("echo '$content' | mail -s '$subject' $self->{sqlgrey}{admin_mail}"); sqlgrey-1.8.0/sqlgrey-173- if ($return != 0) { ############################################## sqlgrey-1.8.0/sqlgrey-1258- $self->do("DELETE FROM $from_awl " . sqlgrey-1.8.0/sqlgrey:1259: 'WHERE sender_name = ' . $self->quote($sender_name) . sqlgrey-1.8.0/sqlgrey-1260- ' AND sender_domain = ' . $self->quote($sender_domain) . ############################################## sqlgrey-1.8.0/sqlgrey-1276- $self->do("DELETE FROM $domain_awl " . sqlgrey-1.8.0/sqlgrey:1277: 'WHERE sender_domain = ' . $self->quote($sender_domain) . sqlgrey-1.8.0/sqlgrey-1278- ' AND src = ' . $self->quote($host)); ############################################## sqlgrey-1.8.0/sqlgrey-1294- 'SET last_seen = NOW(), first_seen = first_seen ' . sqlgrey-1.8.0/sqlgrey:1295: 'WHERE sender_name = ' . $self->quote($sender_name) . sqlgrey-1.8.0/sqlgrey-1296- ' AND sender_domain = ' . $self->quote($sender_domain) . ############################################## sqlgrey-1.8.0/sqlgrey-1304- 'SET last_seen = NOW(), first_seen = first_seen ' . sqlgrey-1.8.0/sqlgrey:1305: 'WHERE sender_domain = ' . $self->quote($sender_domain) . sqlgrey-1.8.0/sqlgrey-1306- ' AND src = ' . $self->quote($host)); ############################################## sqlgrey-1.8.0/sqlgrey-1429- $self->do("DELETE FROM $from_awl " . sqlgrey-1.8.0/sqlgrey:1430: 'WHERE sender_domain = ' . $self->quote($domain) . sqlgrey-1.8.0/sqlgrey-1431- ' AND src = ' . $self->quote($host)); ############################################## sqlgrey-1.8.0/sqlgrey-1436- $self->do("DELETE FROM $connect " . sqlgrey-1.8.0/sqlgrey:1437: 'WHERE sender_domain = ' . $self->quote($domain) . sqlgrey-1.8.0/sqlgrey-1438- ' AND src = ' . $self->quote($host)); ############################################## sqlgrey-1.8.0/sqlgrey-1586- $self->do("DELETE FROM $connect " . sqlgrey-1.8.0/sqlgrey:1587: 'WHERE src = ' . $self->quote($addr) . sqlgrey-1.8.0/sqlgrey-1588- ' AND sender_domain = ' . $self->quote($sender_domain) . ############################################## sqlgrey-1.8.0/sqlgrey-2313- $self->mylog('whitelist', 2, sqlgrey-1.8.0/sqlgrey:2314: "$sender_name\@$sender_domain, $addr($fqdn) -> $recipient"); sqlgrey-1.8.0/sqlgrey-2315- return $self->{sqlgrey}{prepend} ?