Python Script to set file dates
#!/usr/bin/python # -*- coding: utf-8 -*- import sqlite3 as lite import os, csv, sys, subprocess, hashlib, time from datetime import timedelta, datetime, tzinfo import platform […]
Python script to extract file Creation dates
#!/usr/bin/env python import os, csv, sys, subprocess, hashlib, time, pytz from datetime import timedelta, datetime, tzinfo import pytz import tzlocal writer = csv.writer(sys.stdout, quoting=csv.QUOTE_ALL) il […]
Limit the Bandwidth for Specific Network On Cisco ASA 5510
access-list ACL-Guest extended permit ip object Guest_VLAN any access-list ACL-Guest extended permit ip any object Guest_VLAN class-map CM-THROTTLE-Guest match access-list ACL-Guest exit policy-map PM-THROTTLE class […]
A Python Script to Backup Cisco Routers and Switches
#!/usr/bin/python import pexpect,sys,string,os,time,subprocess,getpass if len(sys.argv) !=2: print (“usage: backup [user@]hostname”) else: input_data = sys.argv[1] data=input_data.split(“@”) switch_un = data[0] switch_ip = data[1] switch_pw1 = getpass.getpass(“Enable Password:”) […]
FreeNas Warning 3
After flashing /dev/mpr0, another warning message regarding /dev/mpr1. Listing all controller details: sas3flash -listall It brought up two different controllers, first one in IT […]
Fix Amazon EC2 SSH login
Blocked myself with CSF firewall on a Centos 7 server. With the “Run Command” feature was not available, and no web terminal or VNC console […]
Powershell Commands
Close all opened sessions Get-PSSession | Remove-PSSession Remove all variables from session Get-Variable -Exclude PWD,*Preference | Remove-Variable -EA 0
Install SSMTP on Centos 7
Add the repo if it’s not added: yum install epel-release -y Install: yum -y install ssmtp (yum install mailx) if not installed Configure: alternatives –config […]
Configuring Linux DHCP to work with LYNC
The article: http://tohamey.blogspot.com/2011/10/configuring-linux-dhcp-to-work-with.html