Check an SSL Certificate with OpenSSL
Some summary
Some summary
I love Python and its many libraries. The HTTP library by the name of requests is particularly awesome.
Note: I have not used any authentication, basic or otherwise, but it's easy enough to add.
StringIO is used because the cvs library …
#!/bin/bash
user='root'
pass='r00t'
date=$(date +%Y.%m.%d)
backuproot='/var/backups/mysql'
# echo and exit
function die {
echo "$1"
exit 1
}
# dump per database
function per_db {
for db in $(mysql -u ${user} -p${pass} -Bse "show databases"); do
[ ${db} = "information_schema" ] && continue
[ ${db} = "performance_schema" ] && continue
echo ${db}
mysqldump …ryant@spitfire:~$ nmap 192.168.1.11 Starting Nmap 6.00 ( http://nmap.org ) at 2013-06-29 13:17 SAST Nmap scan report for 192.168.1.11 Host is up (0.0098s latency). Not shown: 990 closed ports PORT STATE SERVICE 21/tcp open ftp 22/tcp open …
Need to automate an rsync to a fileserver and, unfortunately, required to authenticate using a password.
Use expect...
#!/usr/bin/expect
set timeout 20
set password [lindex $argv 0]
spawn rsync -av --no-p --no-g /media/ryant/My\ Book/Photo/ user@10.10.10.12:/Data/Public/Photos/
expect …I needed to keep track of up until where in a database table I had already queried. Later queries needed to draw data from that point onwards. For example if I've done the query select id, name, surname from table where id > 255623 and it yielded results with …