Very often I need to strace a script which is not “constantly” running, and must be “catch” during it’s execution. Today I had to debug some bad behaving php script, but because php was running as CGI (mod_suphp) it was hard a task. I had 3 choices in order to successfully attach the strace to the php… Continue reading Strace buggy php script running as cgi – Strace daemon
Very often I need to automate some bulk user password change. In the following examples we have: $user as username $pass as password in plain text Currently these are the methods I use to change user passwords: chpasswd method echo “$user:$pass” | chpasswd The old passwd method echo -e “$pass\n$pass” | passwd $user Also… Continue reading Change user password through BASH script
Here I will post some basic examples: 1. Scan all hosts in a given network for specific open port – This will scan network 192.168.0.1 /24 for open port 10000 (which belongs to WebMin) # –open options tells nmap, to print ONLY OPEN ports nmap –open -p 10000 192.168.0.1/24 2. Scan all ports on given… Continue reading Nmap – Port scanning
The first thing we must assure is the following: – We have working configuration on our Mikrotik router (internet access + local network) – We have generated SSL certfificate/key pair for the OpenVPN server Import SSL Certificates + Root CA on the router We can use FTP to upload the following files: – cacert.pem… Continue reading Mikrotik – Configuring OpenVPN Server + Linux client
1. Create directory structure mkdir certificates private_keys echo ‘100001’ >serial touch certindex.txt 2. Create some default openssl.cnf file # # OpenSSL configuration file. # # Establish working directory. dir = . [ ca ] default_ca = CA_default [ CA_default ] serial = $dir/serial database = $dir/certindex.txt new_certs_dir = $dir/certs certificate = $dir/cacert.pem private_key =… Continue reading Creating Root SSL Authority with OpenSSL
Hello Universe … The worst page in the Universe is here … ! Thanks to the best page in the universe !