Skip to content

Instantly share code, notes, and snippets.

@y0ug
y0ug / scapycdp.py
Created September 21, 2014 08:35
Scapy show CDP info
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import re
logging.getLogger("scapy").setLevel(logging.ERROR)
from scapy.all import *
#!/bin/bash
# 2014-09-20 12:26 CEST
# y0ug
USERNAME=${1-y0ug}
IP=$(ip addr show dev eth0 | sed -nr 's/.*inet ([^/]+).*/\1/p')
GPG_KEYID=0x72F6A9E3
ROOT_PASSWD=$(apg -m32 -n1)
USER_PASSWD=$(apg -m32 -n1)
echo "root:$ROOT_PASSWD" | chpasswd