Skip to content

Instantly share code, notes, and snippets.

View f4nd4ngo's full-sized avatar
🌴
On vacation

Vincent f4nd4ngo

🌴
On vacation
  • Qc
View GitHub Profile
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
# | | |___| | | | __/ (__| < | | | | . \ |
# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
# | |
# | Copyright Mathias Kettner 2013 mk@mathias-kettner.de |
@f4nd4ngo
f4nd4ngo / Conspersion.py
Last active August 29, 2015 14:17
Cisco Switches Configuration Script
#!/usr/bin/env python
"""Vincent Boucher 2015-01-07- Python
Script to connect to multiple switches, add a specific command and logout."""
import os
import sys
import pexpect
import subprocess
import time
import logging
#This file will only accept csv format | dns or ip;printer name;location;serial if C2550 and c2880
#DNS: needs to begin with printer prefix specified in script or will be passed
#IP needs to begin with prefix specified in script or will be passed
#Please use approriate printer name and location
#Do not specify serial except for C2550 and C2880
printer002.local.doma.in;printer002;'1st Floor;
printer007.local.doma.in;printer007;'2nd Floor';DCA03458
printer008.local.doma.in;printer008;'Boston Office';DCA03469
printer017.local.doma.in;printer017;'Water Closet';
printer020.local.doma.in;printer020;'Sewer';HMF00584
@f4nd4ngo
f4nd4ngo / Canon_report.py
Created March 21, 2015 02:15
Canon Printers Counters Report
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#Get SNMP Value for canon printers for total page count using PySNMP, export to pdf, then email to required user#
#Need to install pysnmp, reportlab and smtplib using pip or easy install#
#Those are the OIDS for counters and serial
#TOTAL: .1.3.6.1.4.1.1602.1.11.1.3.1.4.102
#COLOR: .1.3.6.1.4.1.1602.1.11.1.3.1.4.106
#B/W: .1.3.6.1.4.1.1602.1.11.1.3.1.4.109
#SERIAL: .1.3.6.1.2.1.43.5.1.1.17.1
#TOTAL SOME C2020: .1.3.6.1.4.1.1602.1.11.1.3.1.4.101