[ SEA-GHOST MINI SHELL]

Path : /proc/2/root/var/lib/zabbix/
FILE UPLOADER :
Current File : //proc/2/root/var/lib/zabbix/rblscan.sh

#!/bin/bash

ADDRESS=$1
LISTS=$(cat /usr/local/etc/dnsbl.lst)

# Verifies address is correct format and length
if [[ $ADDRESS =~ ([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3}) ]] ; then
  :
else
  echo ""
  echo "Please supply a valid address"
        echo ""
        echo "Usage: rblscan [ip address] <subnet in CIDR>" >&2
        echo ""

  exit 1
fi

# Creates needed variables
BACKADDRESS=$(echo $ADDRESS | sed -r 's/([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})/\4.\3.\2.\1/')

# Runs the check against the list of RBLs then prints a result if it is listed
function defaultscan {
  while read -r LINE; do
      if [[ $(dig  +short ${BACKADDRESS}.$LINE.) =~ 127.0.0.([2-9]|[1-4][0-9]|50) ]] ; then
          echo "Listed in $LINE"
      fi
  done <<< "$LISTS"

}

defaultscan

exit


SEA-GHOST - SHELL CODING BY SEA-GHOST