安装最新版nginx+php-fpm+MariaDB

Nginx:

#!/bin/bash
apt-get install lsb-release
wget http://nginx.org/keys/nginx_signing.key
apt-key add nginx_signing.key
codename=`lsb_release -c |awk '{print $2}'`
echo 'deb http://nginx.org/packages/ubuntu/ codename nginx'|sed 's/codename/precise/' >> /etc/apt/sources.list
apt-get update
apt-get install nginx

php7.1-fpm
1、更新ubuntu系统

sudo apt-get update

2、安装php
添加php源

add-apt-repository ppa:ondrej/php 
apt-get update

安装php-fpm

apt-get install php7.1-fpm 

3、安装nginx
4、配置
编辑 vim /etc/nginx/sites-available/default
取消”location ~ .php”的注释,如下三行对应修改

root /www;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
5、重启nginx
sudo service nginx restart

MariaDB:

lsb_release -a

$ sudo apt-get install software-properties-common
$ apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
$ sudo add-apt-repository 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.2/ubuntu xenial main'

原创:小米路由器_hookWifiConnect函数RCE漏洞

=================by 大蝉@xs3c.co===============转载请注明出处=============
漏洞描述

所有通过Wifi连入小米路由器网络的设备会触发_hookWifiConnect函数,由_hookWifiConnect调用_doPush给管理员推送设备接入消息,由于_doPush函数中未过滤payload->name导致设备名被带入系统命令执行。
继续阅读原创:小米路由器_hookWifiConnect函数RCE漏洞

How to install Java in Kali Linux

直接下JDK,里面包含Jre
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
原装openjdk在
/usr/lib/jvm
Uncompress archive

Now you uncompress and move the whole uncompressed folder to /opt (optional) directory.

tar -xzvf /root/jdk-7u79-linux-x64.tar.gz
mv jdk1.7.0_79 /opt
cd /opt/jdk1.7.0_79

Install and register binaries

This step registers the downloaded version of Java as an alternative, and switches it to be used as the default:

update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_79/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_79/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_79/jre/lib/amd64/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.7.0_79/bin/java
update-alternatives --set javac /opt/jdk1.7.0_79/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_79/jre/lib/amd64/libnpjp2.so

Testing your installation

First of all, close your browser and re-open. You won’t believe how many users actually forgets to do this step and later complains Java ain’t working. I’d advise to bookmark this site to be able to reopen these instructions quickly, or simply copy these into a leafpad / vi / text-editor.

To check the version of Java you are now running

java -version

To check the browser plugin just click Do I have Java?

This should take you to Oracles Java website and you will see a confirmation message.