MySQL Support

NU-Honeypot now support MySQL, you can configure the mysql database settings in the cfg file.

example:

[MySQL]
enabled = True
dbhost = 127.0.0.1
dbname = nutelnet
dbuser = root
dbpass = password

You will need to configure the database you want to use with the correct table structure, you can find the sql file to import inside the docs directory.

CREATE TABLE `sessions` (
  `id` int(6) unsigned NOT NULL AUTO_INCREMENT,
  `ip` varchar(30) DEFAULT NULL,
  `session` varchar(300) DEFAULT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `protocol` varchar(10) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  `p0f_os` varchar(200) DEFAULT NULL,
  `p0f_uptime` int(250) DEFAULT NULL,
  `p0f_os_flavor` varchar(11) DEFAULT NULL,
  `p0f_http_flavor` varchar(11) DEFAULT NULL,
  `p0f_language` varchar(11) DEFAULT NULL,
  `p0f_http_name` varchar(11) DEFAULT NULL,
  `country` varchar(11) DEFAULT NULL,
  `lat` float(9,6) DEFAULT NULL,
  `lon` float(9,6) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8544 DEFAULT CHARSET=latin1;

CREATE TABLE `users` (
  `id` int(6) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(100) DEFAULT NULL,
  `password` varchar(100) DEFAULT NULL,
  `session` varchar(300) DEFAULT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=629 DEFAULT CHARSET=latin1;

CREATE TABLE `cmds` (
  `id` int(6) unsigned NOT NULL AUTO_INCREMENT,
  `cmd` varchar(300) DEFAULT NULL,
  `session` varchar(300) DEFAULT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=723 DEFAULT CHARSET=latin1;