local commit

This commit is contained in:
root 2020-05-02 15:56:26 +02:00
parent 57e2cba90f
commit 12ae60c6f2
8 changed files with 8232 additions and 8232 deletions

View file

@ -1,188 +1,188 @@
sudo: false sudo: false
language: perl language: perl
matrix: matrix:
include: include:
- addons: - addons:
mariadb: "5.5" mariadb: "5.5"
name: "MariaDB 5.5/Perl 5.24" name: "MariaDB 5.5/Perl 5.24"
perl: "5.24" perl: "5.24"
- addons: - addons:
mariadb: "10.0" mariadb: "10.0"
name: "MariaDB 10.0/Perl 5.24" name: "MariaDB 10.0/Perl 5.24"
perl: "5.24" perl: "5.24"
- addons: - addons:
mariadb: "10.1" mariadb: "10.1"
name: "MariaDB 10.1/Perl 5.24" name: "MariaDB 10.1/Perl 5.24"
perl: "5.24" perl: "5.24"
- addons: - addons:
mariadb: "10.2" mariadb: "10.2"
name: "MariaDB 10.2/Perl 5.24" name: "MariaDB 10.2/Perl 5.24"
perl: "5.24" perl: "5.24"
- addons: - addons:
mariadb: "10.3" mariadb: "10.3"
name: "MariaDB 10.3/Perl 5.24" name: "MariaDB 10.3/Perl 5.24"
perl: "5.24" perl: "5.24"
- addons: - addons:
mariadb: "10.4" mariadb: "10.4"
name: "MariaDB 10.4/Perl 5.24" name: "MariaDB 10.4/Perl 5.24"
perl: "5.24" perl: "5.24"
- addons: - addons:
mysql: "5.5" mysql: "5.5"
name: "MySQL 5.5/Perl 5.24" name: "MySQL 5.5/Perl 5.24"
perl: "5.24" perl: "5.24"
- addons: - addons:
mysql: "5.6" mysql: "5.6"
name: "MySQL 5.6/Perl 5.24" name: "MySQL 5.6/Perl 5.24"
perl: "5.24" perl: "5.24"
- addons: - addons:
apt: apt:
sources: sources:
- mysql-5.7-trusty - mysql-5.7-trusty
packages: packages:
- mysql-server - mysql-server
- mysql-client - mysql-client
name: "MySQL 5.7/Perl 5.24" name: "MySQL 5.7/Perl 5.24"
perl: "5.24" perl: "5.24"
- addons: - addons:
apt: apt:
sources: sources:
- mysql-8.0-trusty - mysql-8.0-trusty
packages: packages:
- mysql-server - mysql-server
- mysql-client - mysql-client
name: "MySQL 8/Perl 5.24" name: "MySQL 8/Perl 5.24"
perl: "5.24" perl: "5.24"
- addons: - addons:
mariadb: "5.5" mariadb: "5.5"
name: "MariaDB 5.5/Perl 5.16" name: "MariaDB 5.5/Perl 5.16"
perl: "5.16" perl: "5.16"
- addons: - addons:
mariadb: "10.0" mariadb: "10.0"
name: "MariaDB 10.0/Perl 5.16" name: "MariaDB 10.0/Perl 5.16"
perl: "5.16" perl: "5.16"
- addons: - addons:
mariadb: "10.1" mariadb: "10.1"
name: "MariaDB 10.1/Perl 5.16" name: "MariaDB 10.1/Perl 5.16"
perl: "5.16" perl: "5.16"
- addons: - addons:
mariadb: "10.2" mariadb: "10.2"
name: "MariaDB 10.2/Perl 5.16" name: "MariaDB 10.2/Perl 5.16"
perl: "5.16" perl: "5.16"
- addons: - addons:
mariadb: "10.3" mariadb: "10.3"
name: "MariaDB 10.3/Perl 5.16" name: "MariaDB 10.3/Perl 5.16"
perl: "5.16" perl: "5.16"
- addons: - addons:
mariadb: "10.4" mariadb: "10.4"
name: "MariaDB 10.4/Perl 5.16" name: "MariaDB 10.4/Perl 5.16"
perl: "5.16" perl: "5.16"
- addons: - addons:
mysql: "5.5" mysql: "5.5"
name: "MySQL 5.5/Perl 5.16" name: "MySQL 5.5/Perl 5.16"
perl: "5.16" perl: "5.16"
- addons: - addons:
mysql: "5.6" mysql: "5.6"
name: "MySQL 5.6/Perl 5.16" name: "MySQL 5.6/Perl 5.16"
perl: "5.16" perl: "5.16"
- addons: - addons:
apt: apt:
sources: sources:
- mysql-5.7-trusty - mysql-5.7-trusty
packages: packages:
- mysql-server - mysql-server
- mysql-client - mysql-client
name: "MySQL 5.7/Perl 5.16" name: "MySQL 5.7/Perl 5.16"
perl: "5.16" perl: "5.16"
- addons: - addons:
apt: apt:
sources: sources:
- mysql-8.0-trusty - mysql-8.0-trusty
packages: packages:
- mysql-server - mysql-server
- mysql-client - mysql-client
name: "MySQL 8/Perl 5.16" name: "MySQL 8/Perl 5.16"
perl: "5.16" perl: "5.16"
- addons: - addons:
mariadb: "5.5" mariadb: "5.5"
name: "MariaDB 5.5/Perl 5.10" name: "MariaDB 5.5/Perl 5.10"
perl: "5.10" perl: "5.10"
- addons: - addons:
mariadb: "10.0" mariadb: "10.0"
name: "MariaDB 10.0/Perl 5.10" name: "MariaDB 10.0/Perl 5.10"
perl: "5.10" perl: "5.10"
- addons: - addons:
mariadb: "10.1" mariadb: "10.1"
name: "MariaDB 10.1/Perl 5.10" name: "MariaDB 10.1/Perl 5.10"
perl: "5.10" perl: "5.10"
- addons: - addons:
mariadb: "10.2" mariadb: "10.2"
name: "MariaDB 10.2/Perl 5.10" name: "MariaDB 10.2/Perl 5.10"
perl: "5.10" perl: "5.10"
- addons: - addons:
mariadb: "10.3" mariadb: "10.3"
name: "MariaDB 10.3/Perl 5.10" name: "MariaDB 10.3/Perl 5.10"
perl: "5.10" perl: "5.10"
- addons: - addons:
mariadb: "10.4" mariadb: "10.4"
name: "MariaDB 10.4/Perl 5.10" name: "MariaDB 10.4/Perl 5.10"
perl: "5.10" perl: "5.10"
- addons: - addons:
mysql: "5.5" mysql: "5.5"
name: "MySQL 5.5/Perl 5.10" name: "MySQL 5.5/Perl 5.10"
perl: "5.10" perl: "5.10"
- addons: - addons:
mysql: "5.6" mysql: "5.6"
name: "MySQL 5.6/Perl 5.10" name: "MySQL 5.6/Perl 5.10"
perl: "5.10" perl: "5.10"
- addons: - addons:
apt: apt:
sources: sources:
- mysql-5.7-trusty - mysql-5.7-trusty
packages: packages:
- mysql-server - mysql-server
- mysql-client - mysql-client
name: "MySQL 5.7/Perl 5.10" name: "MySQL 5.7/Perl 5.10"
perl: "5.10" perl: "5.10"
- addons: - addons:
apt: apt:
sources: sources:
- mysql-8.0-trusty - mysql-8.0-trusty
packages: packages:
- mysql-server - mysql-server
- mysql-client - mysql-client
name: "MySQL 8/Perl 5.10" name: "MySQL 8/Perl 5.10"
perl: "5.10" perl: "5.10"
before_install: before_install:
- git clone git://github.com/haarg/perl-travis-helper - git clone git://github.com/haarg/perl-travis-helper
- source perl-travis-helper/init - source perl-travis-helper/init
- build-perl - build-perl
- perl -V - perl -V
install: install:
- cpanm --quiet --notest Data::Dumper - cpanm --quiet --notest Data::Dumper
- cpanm --quiet --notest JSON - cpanm --quiet --notest JSON
- cpanm --quiet --notest Perl::Critic - cpanm --quiet --notest Perl::Critic
- cpanm --quiet --notest Text::Template - cpanm --quiet --notest Text::Template
before_script: before_script:
- echo -e "[client]\nuser=root\npassword=\"\"" > .my.cnf - echo -e "[client]\nuser=root\npassword=\"\"" > .my.cnf
- chmod 600 .my.cnf - chmod 600 .my.cnf
- git clone https://github.com/datacharmer/test_db.git - git clone https://github.com/datacharmer/test_db.git
- cd test_db - cd test_db
- cat employees.sql | grep -v 'storage_engine' | mysql - cat employees.sql | grep -v 'storage_engine' | mysql
- cd .. - cd ..
script: script:
- perlcritic --exclude InputOutput::ProhibitInteractiveTest mysqltuner.pl - perlcritic --exclude InputOutput::ProhibitInteractiveTest mysqltuner.pl
- ./mysqltuner.pl --verbose --tbstat 2>stderr.txt | tee -a "stdout.txt" - ./mysqltuner.pl --verbose --tbstat 2>stderr.txt | tee -a "stdout.txt"
after_script: after_script:
- echo "Standard Output: $(cat stdout.txt)" - echo "Standard Output: $(cat stdout.txt)"
- echo "Standard Error : $(cat stderr.txt)" - echo "Standard Error : $(cat stderr.txt)"
- [ "0" = "$(wl -l stderr.txt)" ] || exit 2 - [ "0" = "$(wl -l stderr.txt)" ] || exit 2

306
USAGE.md
View file

@ -1,153 +1,153 @@
# NAME # NAME
MySQLTuner 1.7.15 - MySQL High Performance Tuning Script MySQLTuner 1.7.15 - MySQL High Performance Tuning Script
# IMPORTANT USAGE GUIDELINES # IMPORTANT USAGE GUIDELINES
To run the script with the default options, run the script without arguments To run the script with the default options, run the script without arguments
Allow MySQL server to run for at least 24-48 hours before trusting suggestions Allow MySQL server to run for at least 24-48 hours before trusting suggestions
Some routines may require root level privileges (script will provide warnings) Some routines may require root level privileges (script will provide warnings)
You must provide the remote server's total memory when connecting to other servers You must provide the remote server's total memory when connecting to other servers
# CONNECTION AND AUTHENTICATION # CONNECTION AND AUTHENTICATION
--host <hostname> Connect to a remote host to perform tests (default: localhost) --host <hostname> Connect to a remote host to perform tests (default: localhost)
--socket <socket> Use a different socket for a local connection --socket <socket> Use a different socket for a local connection
--port <port> Port to use for connection (default: 3306) --port <port> Port to use for connection (default: 3306)
--user <username> Username to use for authentication --user <username> Username to use for authentication
--userenv <envvar> Name of env variable which contains username to use for authentication --userenv <envvar> Name of env variable which contains username to use for authentication
--pass <password> Password to use for authentication --pass <password> Password to use for authentication
--passenv <envvar> Name of env variable which contains password to use for authentication --passenv <envvar> Name of env variable which contains password to use for authentication
--ssl-ca <path> Path to public key --ssl-ca <path> Path to public key
--mysqladmin <path> Path to a custom mysqladmin executable --mysqladmin <path> Path to a custom mysqladmin executable
--mysqlcmd <path> Path to a custom mysql executable --mysqlcmd <path> Path to a custom mysql executable
--defaults-file <path> Path to a custom .my.cnf --defaults-file <path> Path to a custom .my.cnf
# PERFORMANCE AND REPORTING OPTIONS # PERFORMANCE AND REPORTING OPTIONS
--skipsize Don't enumerate tables and their types/sizes (default: on) --skipsize Don't enumerate tables and their types/sizes (default: on)
(Recommended for servers with many tables) (Recommended for servers with many tables)
--skippassword Don't perform checks on user passwords(default: off) --skippassword Don't perform checks on user passwords(default: off)
--checkversion Check for updates to MySQLTuner (default: don't check) --checkversion Check for updates to MySQLTuner (default: don't check)
--updateversion Check for updates to MySQLTuner and update when newer version is available (default: don't check) --updateversion Check for updates to MySQLTuner and update when newer version is available (default: don't check)
--forcemem <size> Amount of RAM installed in megabytes --forcemem <size> Amount of RAM installed in megabytes
--forceswap <size> Amount of swap memory configured in megabytes --forceswap <size> Amount of swap memory configured in megabytes
--passwordfile <path> Path to a password file list(one password by line) --passwordfile <path> Path to a password file list(one password by line)
# OUTPUT OPTIONS # OUTPUT OPTIONS
--silent Don't output anything on screen --silent Don't output anything on screen
--nogood Remove OK responses --nogood Remove OK responses
--nobad Remove negative/suggestion responses --nobad Remove negative/suggestion responses
--noinfo Remove informational responses --noinfo Remove informational responses
--debug Print debug information --debug Print debug information
--noprocess Consider no other process is running --noprocess Consider no other process is running
--dbstat Print database information --dbstat Print database information
--nodbstat Don't Print database information --nodbstat Don't Print database information
--tbstat Print table information --tbstat Print table information
--notbstat Don't Print table information --notbstat Don't Print table information
--idxstat Print index information --idxstat Print index information
--noidxstat Don't Print index information --noidxstat Don't Print index information
--sysstat Print system information --sysstat Print system information
--nosysstat Don't Print system information --nosysstat Don't Print system information
--pfstat Print Performance schema --pfstat Print Performance schema
--nopfstat Don't Print Performance schema --nopfstat Don't Print Performance schema
--verbose Prints out all options (default: no verbose, dbstat, idxstat, sysstat, tbstat, pfstat) --verbose Prints out all options (default: no verbose, dbstat, idxstat, sysstat, tbstat, pfstat)
--bannedports Ports banned separated by comma(,) --bannedports Ports banned separated by comma(,)
--maxportallowed Number of ports opened allowed on this hosts --maxportallowed Number of ports opened allowed on this hosts
--cvefile <path> CVE File for vulnerability checks --cvefile <path> CVE File for vulnerability checks
--nocolor Don't print output in color --nocolor Don't print output in color
--json Print result as JSON string --json Print result as JSON string
--buffers Print global and per-thread buffer values --buffers Print global and per-thread buffer values
--outputfile <path> Path to a output txt file --outputfile <path> Path to a output txt file
--reportfile <path> Path to a report txt file --reportfile <path> Path to a report txt file
--template <path> Path to a template file --template <path> Path to a template file
# PERLDOC # PERLDOC
You can find documentation for this module with the perldoc command. You can find documentation for this module with the perldoc command.
perldoc mysqltuner perldoc mysqltuner
## INTERNALS ## INTERNALS
[https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md) [https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md](https://github.com/major/MySQLTuner-perl/blob/master/INTERNALS.md)
Internal documentation Internal documentation
# AUTHORS # AUTHORS
Major Hayden - major@mhtx.net Major Hayden - major@mhtx.net
# CONTRIBUTORS # CONTRIBUTORS
- Matthew Montgomery - Matthew Montgomery
- Paul Kehrer - Paul Kehrer
- Dave Burgess - Dave Burgess
- Jonathan Hinds - Jonathan Hinds
- Mike Jackson - Mike Jackson
- Nils Breunese - Nils Breunese
- Shawn Ashlee - Shawn Ashlee
- Luuk Vosslamber - Luuk Vosslamber
- Ville Skytta - Ville Skytta
- Trent Hornibrook - Trent Hornibrook
- Jason Gill - Jason Gill
- Mark Imbriaco - Mark Imbriaco
- Greg Eden - Greg Eden
- Aubin Galinotti - Aubin Galinotti
- Giovanni Bechis - Giovanni Bechis
- Bill Bradford - Bill Bradford
- Ryan Novosielski - Ryan Novosielski
- Michael Scheidell - Michael Scheidell
- Blair Christensen - Blair Christensen
- Hans du Plooy - Hans du Plooy
- Victor Trac - Victor Trac
- Everett Barnes - Everett Barnes
- Tom Krouper - Tom Krouper
- Gary Barrueto - Gary Barrueto
- Simon Greenaway - Simon Greenaway
- Adam Stein - Adam Stein
- Isart Montane - Isart Montane
- Baptiste M. - Baptiste M.
- Cole Turner - Cole Turner
- Major Hayden - Major Hayden
- Joe Ashcraft - Joe Ashcraft
- Jean-Marie Renouard - Jean-Marie Renouard
- Stephan GroBberndt - Stephan GroBberndt
- Christian Loos - Christian Loos
# SUPPORT # SUPPORT
Bug reports, feature requests, and downloads at http://mysqltuner.com/ Bug reports, feature requests, and downloads at http://mysqltuner.com/
Bug tracker can be found at https://github.com/major/MySQLTuner-perl/issues Bug tracker can be found at https://github.com/major/MySQLTuner-perl/issues
Maintained by Major Hayden (major\\@mhtx.net) - Licensed under GPL Maintained by Major Hayden (major\\@mhtx.net) - Licensed under GPL
# SOURCE CODE # SOURCE CODE
[https://github.com/major/MySQLTuner-perl](https://github.com/major/MySQLTuner-perl) [https://github.com/major/MySQLTuner-perl](https://github.com/major/MySQLTuner-perl)
git clone https://github.com/major/MySQLTuner-perl.git git clone https://github.com/major/MySQLTuner-perl.git
# COPYRIGHT AND LICENSE # COPYRIGHT AND LICENSE
Copyright (C) 2006-2018 Major Hayden - major@mhtx.net Copyright (C) 2006-2018 Major Hayden - major@mhtx.net
For the latest updates, please visit http://mysqltuner.com/ For the latest updates, please visit http://mysqltuner.com/
Git repository available at https://github.com/major/MySQLTuner-perl Git repository available at https://github.com/major/MySQLTuner-perl
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see &lt;https://www.gnu.org/licenses/>. along with this program. If not, see &lt;https://www.gnu.org/licenses/>.

View file

@ -1,114 +1,114 @@
# -*- mode: ruby -*- # -*- mode: ruby -*-
# vi: set ft=ruby : # vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure # All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for # configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what # backwards compatibility). Please don't change it unless you know what
# you're doing. # you're doing.
Vagrant.configure(2) do |config| Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below. # The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at # For a complete reference, please see the online documentation at
# https://docs.vagrantup.com. # https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for # Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search. # boxes at https://atlas.hashicorp.com/search.
config.vm.box = "centos/7" config.vm.box = "centos/7"
# config.vm.box_check_update = false # config.vm.box_check_update = false
# config.vbguest.auto_update = true # config.vbguest.auto_update = true
# Create a forwarded port mapping which allows access to a specific port # Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below, # within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine. # accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080 # config.vm.network "forwarded_port", guest: 80, host: 8080
if Vagrant.has_plugin?("vagrant-proxyconfx") if Vagrant.has_plugin?("vagrant-proxyconfx")
config.proxy.http = "http://10.195.50.51:3128/" config.proxy.http = "http://10.195.50.51:3128/"
config.proxy.https = "http://10.195.50.51:3128/" config.proxy.https = "http://10.195.50.51:3128/"
config.proxy.no_proxy = "localhost,127.0.0.1,.example.com" config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end end
# Create a private network, which allows host-only access to the machine # Create a private network, which allows host-only access to the machine
# using a specific IP. # using a specific IP.
# config.vm.network "private_network", ip: "192.168.0.100" # config.vm.network "private_network", ip: "192.168.0.100"
config.hostmanager.enabled = true config.hostmanager.enabled = true
config.hostmanager.manage_host = true config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true config.hostmanager.include_offline = true
# Create a public network, which generally matched to bridged network. # Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on # Bridged networks make the machine appear as another physical device on
# your network. # your network.
config.vm.network "public_network" config.vm.network "public_network"
config.vm.hostname = 'maria100' config.vm.hostname = 'maria100'
config.hostmanager.aliases = %w(maria100.localdomain maria100.local) config.hostmanager.aliases = %w(maria100.localdomain maria100.local)
# Share an additional folder to the guest VM. The first argument is # Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is # the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third # the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options. # argument is a set of non-required options.
config.vm.synced_folder "./data", "/data" config.vm.synced_folder "./data", "/data"
# Provider-specific configuration so you can fine-tune various # Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options. # backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox: # Example for VirtualBox:
# #
config.vm.provider "virtualbox" do |vb| config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine # # Display the VirtualBox GUI when booting the machine
# vb.gui = false # vb.gui = false
# #
# # Customize the amount of memory on the VM: # # Customize the amount of memory on the VM:
vb.memory = "1024" vb.memory = "1024"
end end
# #
# View the documentation for the provider you are using for more # View the documentation for the provider you are using for more
# information on available options. # information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at # such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information. # https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push| # config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end # end
# Enable provisioning with a shell script. Additional provisioners such as # Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use. # documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL config.vm.provision "shell", inline: <<-SHELL
sudo yum -y update sudo yum -y update
echo "secret" | sudo passwd --stdin root echo "secret" | sudo passwd --stdin root
sudo cp -pr ~vagrant/.ssh /root sudo cp -pr ~vagrant/.ssh /root
sudo chown -R root.root /root/.ssh sudo chown -R root.root /root/.ssh
sudo yum-config-manager --enable base sudo yum-config-manager --enable base
echo "[mariadb]" >/tmp/mariadb.repo echo "[mariadb]" >/tmp/mariadb.repo
echo "name = MariaDB" >>/tmp/mariadb.repo echo "name = MariaDB" >>/tmp/mariadb.repo
echo "baseurl = http://yum.mariadb.org/10.0/centos7-amd64" >> /tmp/mariadb.repo echo "baseurl = http://yum.mariadb.org/10.0/centos7-amd64" >> /tmp/mariadb.repo
echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB" >> /tmp/mariadb.repo echo "gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB" >> /tmp/mariadb.repo
echo "gpgcheck=1" >> /tmp/mariadb.repo echo "gpgcheck=1" >> /tmp/mariadb.repo
sudo cp /tmp/mariadb.repo /etc/yum.repos.d/ sudo cp /tmp/mariadb.repo /etc/yum.repos.d/
sudo rpm -Uvh http://mirrors.ircam.fr/pub/fedora/epel/7/x86_64/e/epel-release-latest.noarch.rpm sudo rpm -Uvh http://mirrors.ircam.fr/pub/fedora/epel/7/x86_64/e/epel-release-latest.noarch.rpm
sudo yum -y install python2-pip git python perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils MariaDB-server MariaDB-Client wget sudo yum -y install python2-pip git python perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils MariaDB-server MariaDB-Client wget
sudo pip install --upgrade pip sudo pip install --upgrade pip
if [ ! -d "/data/MySQLTuner-perl" ]; then if [ ! -d "/data/MySQLTuner-perl" ]; then
cd /data cd /data
sudo git clone https://github.com/major/MySQLTuner-perl.git sudo git clone https://github.com/major/MySQLTuner-perl.git
fi fi
sudo cpanm install File::Util sudo cpanm install File::Util
#sudo systemctl start mariadb.service #sudo systemctl start mariadb.service
sudo service mysql start sudo service mysql start
mysql -e 'select version();' mysql -e 'select version();'
cd /data cd /data
sudo wget "https://launchpad.net/test-db/employees-db-1/1.0.6/+download/employees_db-full-1.0.6.tar.bz2" sudo wget "https://launchpad.net/test-db/employees-db-1/1.0.6/+download/employees_db-full-1.0.6.tar.bz2"
sudo tar xvjf employees_db-full-1.0.6.tar.bz2 sudo tar xvjf employees_db-full-1.0.6.tar.bz2
cd employees_db cd employees_db
cat employees.sql | mysql cat employees.sql | mysql
cd .. cd ..
cd MySQLTuner-perl cd MySQLTuner-perl
perl mysqltuner.pl --idxstat --dbstat perl mysqltuner.pl --idxstat --dbstat
SHELL SHELL
config.vm.provision :hostmanager config.vm.provision :hostmanager
end end

View file

@ -1,107 +1,107 @@
# -*- mode: ruby -*- # -*- mode: ruby -*-
# vi: set ft=ruby : # vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure # All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for # configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what # backwards compatibility). Please don't change it unless you know what
# you're doing. # you're doing.
Vagrant.configure(2) do |config| Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below. # The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at # For a complete reference, please see the online documentation at
# https://docs.vagrantup.com. # https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for # Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search. # boxes at https://atlas.hashicorp.com/search.
config.vm.box = "fc23-mariadb10-1" config.vm.box = "fc23-mariadb10-1"
config.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-23-20151030.x86_64.vagrant-virtualbox.box" config.vm.box_url = "https://download.fedoraproject.org/pub/fedora/linux/releases/23/Cloud/x86_64/Images/Fedora-Cloud-Base-Vagrant-23-20151030.x86_64.vagrant-virtualbox.box"
# Disable automatic box update checking. If you disable this, then # Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs # boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended. # `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false # config.vm.box_check_update = false
config.vbguest.auto_update = true config.vbguest.auto_update = true
# Create a forwarded port mapping which allows access to a specific port # Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below, # within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine. # accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080 # config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a private network, which allows host-only access to the machine # Create a private network, which allows host-only access to the machine
# using a specific IP. # using a specific IP.
# config.vm.network "private_network", ip: "192.168.0.115" # config.vm.network "private_network", ip: "192.168.0.115"
config.hostmanager.enabled = true config.hostmanager.enabled = true
config.hostmanager.manage_host = true config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true config.hostmanager.include_offline = true
# Create a public network, which generally matched to bridged network. # Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on # Bridged networks make the machine appear as another physical device on
# your network. # your network.
config.vm.network "public_network" config.vm.network "public_network"
config.vm.hostname = 'dev.app' config.vm.hostname = 'dev.app'
config.hostmanager.aliases = %w(dev.app.localdomain dev.app.local) config.hostmanager.aliases = %w(dev.app.localdomain dev.app.local)
# Share an additional folder to the guest VM. The first argument is # Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is # the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third # the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options. # argument is a set of non-required options.
config.vm.synced_folder "./data", "/data" config.vm.synced_folder "./data", "/data"
# Provider-specific configuration so you can fine-tune various # Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options. # backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox: # Example for VirtualBox:
# #
config.vm.provider "virtualbox" do |vb| config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine # # Display the VirtualBox GUI when booting the machine
# vb.gui = false # vb.gui = false
# #
# # Customize the amount of memory on the VM: # # Customize the amount of memory on the VM:
vb.memory = "1024" vb.memory = "1024"
end end
# #
# View the documentation for the provider you are using for more # View the documentation for the provider you are using for more
# information on available options. # information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at # such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information. # https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push| # config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end # end
# Enable provisioning with a shell script. Additional provisioners such as # Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use. # documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL config.vm.provision "shell", inline: <<-SHELL
sudo yum -y update sudo yum -y update
echo "secret" | sudo passwd --stdin root echo "secret" | sudo passwd --stdin root
sudo cp -pr ~vagrant/.ssh /root sudo cp -pr ~vagrant/.ssh /root
sudo chown -R root.root /root/.ssh sudo chown -R root.root /root/.ssh
sudo yum -y install git python sudo yum -y install git python
sudo pip install --upgrade pip sudo pip install --upgrade pip
if [ ! -d "/data/MySQLTuner-perl" ]; then if [ ! -d "/data/MySQLTuner-perl" ]; then
cd /data cd /data
sudo git clone https://github.com/major/MySQLTuner-perl.git sudo git clone https://github.com/major/MySQLTuner-perl.git
fi fi
echo "# MariaDB 10.1 Fedora repository list - created 2016-01-25 13:11 UTC echo "# MariaDB 10.1 Fedora repository list - created 2016-01-25 13:11 UTC
# http://mariadb.org/mariadb/repositories/ # http://mariadb.org/mariadb/repositories/
[mariadb] [mariadb]
name = MariaDB name = MariaDB
baseurl = http://yum.mariadb.org/10.2/fedora23-amd64 baseurl = http://yum.mariadb.org/10.2/fedora23-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1" >> /etc/yum.repos.d/mariadb.repo gpgcheck=1" >> /etc/yum.repos.d/mariadb.repo
sudo yum -y install perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils sudo yum -y install perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils
sudo cpanm install File::Util sudo cpanm install File::Util
sudo yum -y install MariaDB-server MariaDB-client wget sudo yum -y install MariaDB-server MariaDB-client wget
sudo systemctl start mariadb.service sudo systemctl start mariadb.service
mysql -e 'select version();' mysql -e 'select version();'
cd /data cd /data
sudo wget "https://launchpad.net/test-db/employees-db-1/1.0.6/+download/employees_db-full-1.0.6.tar.bz2" sudo wget "https://launchpad.net/test-db/employees-db-1/1.0.6/+download/employees_db-full-1.0.6.tar.bz2"
sudo tar xvjf employees_db-full-1.0.6.tar.bz2 sudo tar xvjf employees_db-full-1.0.6.tar.bz2
cd employees_db cd employees_db
cat employees.sql | mysql cat employees.sql | mysql
cd .. cd ..
cd MySQLTuner-perl cd MySQLTuner-perl
perl mysqltuner.pl --idxstat --dbstat perl mysqltuner.pl --idxstat --dbstat
SHELL SHELL
config.vm.provision :hostmanager config.vm.provision :hostmanager
end end

View file

@ -1,106 +1,106 @@
# -*- mode: ruby -*- # -*- mode: ruby -*-
# vi: set ft=ruby : # vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure # All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for # configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what # backwards compatibility). Please don't change it unless you know what
# you're doing. # you're doing.
Vagrant.configure(2) do |config| Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below. # The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at # For a complete reference, please see the online documentation at
# https://docs.vagrantup.com. # https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for # Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search. # boxes at https://atlas.hashicorp.com/search.
config.vm.box = "centos/7" config.vm.box = "centos/7"
# Disable automatic box update checking. If you disable this, then # Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs # boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended. # `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false # config.vm.box_check_update = false
config.vbguest.auto_update = true config.vbguest.auto_update = true
# Create a forwarded port mapping which allows access to a specific port # Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below, # within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine. # accessing "localhost:8080" will access port 80 on the guest machine.
# config.vm.network "forwarded_port", guest: 80, host: 8080 # config.vm.network "forwarded_port", guest: 80, host: 8080
# Create a private network, which allows host-only access to the machine # Create a private network, which allows host-only access to the machine
# using a specific IP. # using a specific IP.
# config.vm.network "private_network", ip: "192.168.0.115" # config.vm.network "private_network", ip: "192.168.0.115"
config.hostmanager.enabled = true config.hostmanager.enabled = true
config.hostmanager.manage_host = true config.hostmanager.manage_host = true
config.hostmanager.ignore_private_ip = false config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true config.hostmanager.include_offline = true
# Create a public network, which generally matched to bridged network. # Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on # Bridged networks make the machine appear as another physical device on
# your network. # your network.
config.vm.network "public_network" config.vm.network "public_network"
config.vm.hostname = 'dev.app' config.vm.hostname = 'dev.app'
config.hostmanager.aliases = %w(dev.app.localdomain dev.app.local) config.hostmanager.aliases = %w(dev.app.localdomain dev.app.local)
# Share an additional folder to the guest VM. The first argument is # Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is # the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third # the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options. # argument is a set of non-required options.
config.vm.synced_folder "./data", "/data" config.vm.synced_folder "./data", "/data"
# Provider-specific configuration so you can fine-tune various # Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options. # backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox: # Example for VirtualBox:
# #
config.vm.provider "virtualbox" do |vb| config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine # # Display the VirtualBox GUI when booting the machine
# vb.gui = false # vb.gui = false
# #
# # Customize the amount of memory on the VM: # # Customize the amount of memory on the VM:
vb.memory = "1024" vb.memory = "1024"
end end
# #
# View the documentation for the provider you are using for more # View the documentation for the provider you are using for more
# information on available options. # information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at # such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information. # https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push| # config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end # end
# Enable provisioning with a shell script. Additional provisioners such as # Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use. # documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL config.vm.provision "shell", inline: <<-SHELL
sudo yum -y update sudo yum -y update
echo "secret" | sudo passwd --stdin root echo "secret" | sudo passwd --stdin root
sudo cp -pr ~vagrant/.ssh /root sudo cp -pr ~vagrant/.ssh /root
sudo chown -R root.root /root/.ssh sudo chown -R root.root /root/.ssh
sudo yum -y install git python sudo yum -y install git python
sudo pip install --upgrade pip sudo pip install --upgrade pip
if [ ! -d "/data/MySQLTuner-perl" ]; then if [ ! -d "/data/MySQLTuner-perl" ]; then
cd /data cd /data
sudo git clone https://github.com/major/MySQLTuner-perl.git sudo git clone https://github.com/major/MySQLTuner-perl.git
fi fi
echo "# MariaDB 10.1 Fedora repository list - created 2016-01-25 13:11 UTC echo "# MariaDB 10.1 Fedora repository list - created 2016-01-25 13:11 UTC
# http://mariadb.org/mariadb/repositories/ # http://mariadb.org/mariadb/repositories/
[mariadb] [mariadb]
name = MariaDB name = MariaDB
baseurl = http://yum.mariadb.org/10.3/fedora23-amd64 baseurl = http://yum.mariadb.org/10.3/fedora23-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1" >> /etc/yum.repos.d/mariadb.repo gpgcheck=1" >> /etc/yum.repos.d/mariadb.repo
sudo yum -y install perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils sudo yum -y install perl-WWW-Mechanize-GZip perl-App-cpanminus perl-List-MoreUtils
sudo cpanm install File::Util sudo cpanm install File::Util
sudo yum -y install MariaDB-server MariaDB-client wget sudo yum -y install MariaDB-server MariaDB-client wget
sudo systemctl start mariadb.service sudo systemctl start mariadb.service
mysql -e 'select version();' mysql -e 'select version();'
cd /data cd /data
sudo wget "https://launchpad.net/test-db/employees-db-1/1.0.6/+download/employees_db-full-1.0.6.tar.bz2" sudo wget "https://launchpad.net/test-db/employees-db-1/1.0.6/+download/employees_db-full-1.0.6.tar.bz2"
sudo tar xvjf employees_db-full-1.0.6.tar.bz2 sudo tar xvjf employees_db-full-1.0.6.tar.bz2
cd employees_db cd employees_db
cat employees.sql | mysql cat employees.sql | mysql
cd .. cd ..
cd MySQLTuner-perl cd MySQLTuner-perl
perl mysqltuner.pl --idxstat --dbstat perl mysqltuner.pl --idxstat --dbstat
SHELL SHELL
config.vm.provision :hostmanager config.vm.provision :hostmanager
end end

View file

@ -1,79 +1,79 @@
#!/usr/bin/perl #!/usr/bin/perl
use warnings; use warnings;
use strict; use strict;
use WWW::Mechanize::GZip; use WWW::Mechanize::GZip;
use File::Util; use File::Util;
use Data::Dumper; use Data::Dumper;
use List::MoreUtils qw(uniq); use List::MoreUtils qw(uniq);
my $verbose=1; my $verbose=1;
sub AUTOLOAD { sub AUTOLOAD {
use vars qw($AUTOLOAD); use vars qw($AUTOLOAD);
my $cmd = $AUTOLOAD; my $cmd = $AUTOLOAD;
$cmd=~s/.*:://; $cmd=~s/.*:://;
print "\n","*" x 60, "\n* Catching system call : $cmd \n", "*"x60 if defined $verbose; print "\n","*" x 60, "\n* Catching system call : $cmd \n", "*"x60 if defined $verbose;
print "\nExecution : \t", $cmd, " ", join " ", @_ if defined $verbose; print "\nExecution : \t", $cmd, " ", join " ", @_ if defined $verbose;
my $outp=`$cmd @_ 2>&1`; my $outp=`$cmd @_ 2>&1`;
my $rc=$?; my $rc=$?;
print "\nResult : \t$outp", if defined $verbose; print "\nResult : \t$outp", if defined $verbose;
print "Code : \t", $rc, "\n" if defined $verbose; print "Code : \t", $rc, "\n" if defined $verbose;
return $rc; return $rc;
} }
my $mech = WWW::Mechanize->new(); my $mech = WWW::Mechanize->new();
$mech->agent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'); $mech->agent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0');
#$mech->proxy( ['http'], 'http://XXX.XXX.XXX.XXX:3128' ); #$mech->proxy( ['http'], 'http://XXX.XXX.XXX.XXX:3128' );
#$mech->proxy( ['https'], 'http://XXX.XXX.XXX.XXX:3128' ); #$mech->proxy( ['https'], 'http://XXX.XXX.XXX.XXX:3128' );
$mech->env_proxy; $mech->env_proxy;
$mech->ssl_opts( 'verify_hostname' => 0 ); $mech->ssl_opts( 'verify_hostname' => 0 );
$mech->requests_redirectable(['GET', 'POST', 'HEAD']); $mech->requests_redirectable(['GET', 'POST', 'HEAD']);
$mech->add_handler("request_send", sub { print '#'x80,"\nSEND REQUEST:\n"; shift->dump; print '#'x80,"\n";return } ) if defined $verbose; $mech->add_handler("request_send", sub { print '#'x80,"\nSEND REQUEST:\n"; shift->dump; print '#'x80,"\n";return } ) if defined $verbose;
$mech->add_handler("response_done", sub { print '#'x80,"\nDONE RESPONSE:\n"; shift->dump; print '#'x80,"\n"; return }) if defined $verbose; $mech->add_handler("response_done", sub { print '#'x80,"\nDONE RESPONSE:\n"; shift->dump; print '#'x80,"\n"; return }) if defined $verbose;
$mech->add_handler("response_redirect" => sub { print '#'x80,"\nREDIRECT RESPONSE:\n"; shift->dump; print '#'x80,"\n"; return }) if defined $verbose; $mech->add_handler("response_redirect" => sub { print '#'x80,"\nREDIRECT RESPONSE:\n"; shift->dump; print '#'x80,"\n"; return }) if defined $verbose;
my $url = 'http://cve.mitre.org/data/downloads/allitems.csv'; my $url = 'http://cve.mitre.org/data/downloads/allitems.csv';
my $resp; my $resp;
unless (-f 'cve.csv') { unless (-f 'cve.csv') {
$resp=$mech->get($url); $resp=$mech->get($url);
$mech->save_content( "cve.csv" ); $mech->save_content( "cve.csv" );
} }
my $f=File::Util->new( readlimit => 152428800); my $f=File::Util->new( readlimit => 152428800);
File::Util->flock_rules( qw/ IGNORE/ ); File::Util->flock_rules( qw/ IGNORE/ );
my @versions; my @versions;
my $temp; my $temp;
unlink '../vulnerabilities.csv' if -f '../vulnerabilities.csv'; unlink '../vulnerabilities.csv' if -f '../vulnerabilities.csv';
open(CVE, 'cve.csv') or die("Could not open file."); open(CVE, 'cve.csv') or die("Could not open file.");
foreach my $line (<CVE>) { foreach my $line (<CVE>) {
if ($line =~ /(mysql|mariadb|percona)/i if ($line =~ /(mysql|mariadb|percona)/i
and $line =~ /server/i and $line =~ /server/i
and $line =~ /CANDIDATE/i and $line =~ /CANDIDATE/i
and $line !~ /MaxDB/i and $line !~ /MaxDB/i
and $line !~ /\*\* REJECT \*\* /i and $line !~ /\*\* REJECT \*\* /i
and $line !~ /\*\* DISPUTED \*\* /i and $line !~ /\*\* DISPUTED \*\* /i
and $line !~ /(Radius|Proofpoint|Active\ Record|XAMPP|TGS\ Content|e107|post-installation|Apache\ HTTP|Zmanda|pforum|phpMyAdmin|Proxy\ Server|on\ Windows|ADOdb|Mac\ OS|Dreamweaver|InterWorx|libapache2|cisco|ProFTPD)/i) { and $line !~ /(Radius|Proofpoint|Active\ Record|XAMPP|TGS\ Content|e107|post-installation|Apache\ HTTP|Zmanda|pforum|phpMyAdmin|Proxy\ Server|on\ Windows|ADOdb|Mac\ OS|Dreamweaver|InterWorx|libapache2|cisco|ProFTPD)/i) {
$line =~ s/,/;/g; $line =~ s/,/;/g;
@versions = $line =~/(\d{1,2}\.\d+\.[\d]+)/g; @versions = $line =~/(\d{1,2}\.\d+\.[\d]+)/g;
foreach my $vers (uniq(@versions)) { foreach my $vers (uniq(@versions)) {
my @nb=split('\.', $vers); my @nb=split('\.', $vers);
$nb[2]-- if ($line =~ /before/i); $nb[2]-- if ($line =~ /before/i);
#print $vers."\n".Dumper @nb; #print $vers."\n".Dumper @nb;
#print "$line"; #print "$line";
#exit 0 if ($line =~/before/i) ; #exit 0 if ($line =~/before/i) ;
$f->write_file('file' => '../vulnerabilities.csv', 'content' => "$nb[0].$nb[1].$nb[2];$nb[0];$nb[1];$nb[2];$line", 'mode' => 'append'); $f->write_file('file' => '../vulnerabilities.csv', 'content' => "$nb[0].$nb[1].$nb[2];$nb[0];$nb[1];$nb[2];$line", 'mode' => 'append');
} }
} }
} }
close(CVE); close(CVE);
#unlink ('cve.csv') if (-f 'cve.csv'); #unlink ('cve.csv') if (-f 'cve.csv');
exit(0); exit(0);

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff