Skip to content

Instantly share code, notes, and snippets.

@Avyd
Avyd / Yum_RPM_Installer_Through_JumpServer
Last active December 23, 2015 14:59
This script started from a jump server will copy and install a specified rpm package from one server to an other. It is useful if the given two servers has no connection with each other. It uses RedHat's "yum".
#Specify the settings and make sure you have a "results" folder
#"rpm_server" --> rpm will be downloaded here
#"server" ---> rpm will be installed here
#"up2date_ver" -> current version of rpm pack
rpm_server=server_name
server=server_name
up2date_ver=$(echo "server_name")
#Check version on the given server
version_check=$(ssh $server -l root -o StrictHostKeyChecking=no -o BatchMode=yes -C "rpm -qa | grep lsy_root_authorized" > /dev/null)
@Avyd
Avyd / Simple Cisco md5 Hasher
Created August 10, 2013 21:20
Cisco MB5 Hasher - using salt size 4
#! /usr/bin/env python
#
# Passlib is required to run Cisco md5 hasher.
# You can install simply with "easy_install passlib"
#
# Cisco didn't want to use normal md5 for their passwords.
# So they changed the salt size.
# That kind of hashing is used in routers / switches.
# You can test simply by a "show run" output.