Skip to content

Instantly share code, notes, and snippets.

@lucamaro
lucamaro / phpinfo.txt
Created August 10, 2017 06:40
ssp fix_issue_128 phpinfo
PHP logo
PHP Version 7.1.7
System Linux 7cc146541366 4.4.0-89-generic #112-Ubuntu SMP Mon Jul 31 19:38:41 UTC 2017 x86_64
Build Date Jul 13 2017 17:36:34
Configure Command './configure' '--build=x86_64-linux-gnu' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--disable-cgi' '--enable-ftp' '--enable-mbstring' '--enable-mysqlnd' '--with-curl' '--with-libedit' '--with-openssl' '--with-zlib' '--with-pcre-regex=/usr' '--with-libdir=lib/x86_64-linux-gnu' '--with-apxs2' 'build_alias=x86_64-linux-gnu'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/etc/php
Loaded Configuration File (none)
@lucamaro
lucamaro / cdp_discover_ports.sh
Created January 18, 2017 07:32
Print device name and port on linux host capturing Cisco Discovery Protocol packets
#! /bin/sh
for INT in eth0 eth1 eth2 eth3 ; do
echo -n "${INT}: "
sudo /usr/sbin/tcpdump -nn -v -i ${INT} -s 1500 -c 1 'ether[20:2] == 0x2000' 2> /dev/null \
| grep -E '(Device-ID|Port-ID)' \
| cut -f 3 -d ':' \
| tr '\n' ' '
echo
done