Commit 83270bdc authored by Sophie Brun's avatar Sophie Brun

Use Debian package geoipupdate to manage GeoIP db

parent 92a048ea
......@@ -77,6 +77,7 @@ Depends: adduser,
Recommends: geoipupdate
Breaks: kali-menu (<< 1.369)
Conflicts: beef-xss-bundle
Description: Browser Exploitation Framework (BeEF)
Description: Use geoipupdate Debian package
We don't install the upstream script update-geoipdb: geoipupdate Debian
package has the same functionality:
update information in beef and change database location to use the
default one.
Author: Sophie Brun <>
Last-Update: 2019-03-07
This patch header follows DEP-3:
--- a/config.yaml
+++ b/config.yaml
@@ -130,10 +130,10 @@ beef:
dns_hostname_lookup: false
# IP Geolocation
- # NOTE: requires MaxMind database. Run ./updated-geoipdb to install.
+ # NOTE: requires MaxMind database. Run geoipupdate to install.
enable: true
- database: '/opt/GeoIP/GeoLite2-City.mmdb'
+ database: '/var/lib/GeoIP/GeoLite2-City.mmdb'
# Integration with PhishingFrenzy
# If enabled BeEF will try to get the UID parameter value from the hooked URI, as this is used by PhishingFrenzy
--- a/core/main/geoip.rb
+++ b/core/main/geoip.rb
@@ -19,7 +19,7 @@ module Core
unless File.exists? geoip_file
print_error "[GeoIP] Could not find MaxMind GeoIP database: '#{geoip_file}'"
- print_more "Run ./update-geoipdb to install"
+ print_more "Run geoipupdate to install"
@enabled = false
......@@ -34,6 +34,14 @@ if lsof -Pi :${PORT} -sTCP:LISTEN -t >/dev/null ; then
echo ""
## Display warning if geoip is enabled and database is missing
GEOIP_ENABLED=$(ruby -ryaml -e "print YAML.load_file('/etc/beef-xss/config.yaml')['beef']['geoip']['enable']")
GEOIP_LOCATION=$(ruby -ryaml -e "print YAML.load_file('/etc/beef-xss/config.yaml')['beef']['geoip']['database']")
if $GEOIP_ENABLED && [ ! -e $GEOIP_LOCATION ]; then
echo -e "${YELLOW}[i]${RESET} GeoIP database is missing"
echo -e "${YELLOW}[i]${RESET} Run geoipupdate to download / update Maxmind GeoIP database"
## Display information to user
echo -e "${GREEN}[*]${RESET} Please wait for the BeEF service to start."
echo -e "${GREEN}[*]${RESET}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment