Skip to content
the broadcast

networking, computing, virtualization, automation

Scripting

Provision a Cisco CSR1000V-Router as Virtual-Box-VM with sliptreamed Configuration, wait until it’s up and open an Putty-SSH-Connection

2018-11-15
By: ron
On: 2018-11-15
In: automation, Scripting
With: 0 Comments

The existing Windows-Comman-Script has been enhanced so it now waits until the Router-VM is up got an IP-Address assigned using DHCP. For Demonstration-Purposes an SSH-Connection will be established. The public-key of my laptop-ssh-client is part of the slipstreamed Router-Configuration. Deploy a Router-VM with hostname „CSY“. Establish an SSH-Connection to the discovered Router-IP: Have a look to the startup-config used: This is the „CMD“-Script used:Read More →

WaitForCDPNeighbor.py enhanced: Wait for CDP Hostname with usable connected IP-Address.

2018-11-14
By: ron
On: 2018-11-14
In: automation, Scripting
With: 0 Comments

The following version adds a „-c“ option: „Connected IP-Address“-Check. the script exits, when the Router-VM is up and running and has an usable IP-Address The Script still checks all CDP-Packets received at the specified Interface: If the Sender has the correct „Hostname“ it reads the CDP-Management-IP-Address announced. This IP-Address has to be within the IP-Range of any connected IP-Network at the specified Interface. So it’ll be possible to establish a SSH-Session to the router-VM.Read More →

Python: Combine NetIfaces, Scapy and IPAddress to find local connected network

2018-11-07
By: ron
On: 2018-11-07
In: Scripting, Windows
With: 0 Comments

You got the task to generate a list of IP-Networks connected to LAN „VirtualBox Host-Only Network“. There might be more than one IP-Network. Use Scapy to crawl through all Interfaces and get the human-readable interface name [only required for windows users]. Use NetIfaces to get a list of IP-Addresses connected to this interface. Use IPAddress to calculate the IP-Network(s) directly connected. In my case, only one subnet is directly connected: 192.168.56.0/24Read More →

Python netifaces and scapy: Getting meaningful Interface-names and full IP-Adresses-/Netmask-Information

2018-11-06
By: ron
On: 2018-11-06
In: Scripting, Windows
With: 0 Comments

Using Windows: scapy reads: meaningful interface-names ip-address but no netmask netifaces reads: full Ethernet/IP/IPv6-Information but no meaningful interface-names Mixing both, provides everything needed. Netifaces only Adding Scapy to get meaningful interface namesRead More →

Python Scapy: Capturing „Cisco Discovery Protocol (CDP)“

2018-10-31
By: ron
On: 2018-10-31
In: Scripting
With: 0 Comments

It’s hard to believe, how easy it is to capture (and to craft) LAN-Data using Python Scapy. I need to capture CDP-Packets and to extract information like the hostname of the sender and it’s IP-Address. As an modification of the „ARP-Monitor“-example taken from the manual Using scapy in your tools. Scapy Installation nothing special: pip install Python: Install Scapy Example: List all Interfaces of my Laptop Capture 10 Packets on a specific interface Capture CDP-Packets Decode CDP (with inactive dissector) Activate the CDP-Parser Capture again and display CDP-Information as cleartext Decode CDP-Hostname Decode CDP-Management-IP-AddressRead More →

Windows Command Shell: Store the output of another command in a variable.

2018-10-30
By: ron
On: 2018-10-30
In: Scripting, Windows
With: 0 Comments

How often had i to look up this in the web, always wondering about myself still using the Windows-CMD-shell… Should move on to powershell… store the output of another command in a variable Example: the „date“-command Copy the date into the variable „TTT“ Not elegant, not intuitive, not self-explanatory: This Shell Scripting language seems not to be made for daily usage 😉Read More →

Kategorien

  • AI
  • automation
  • awayfromevernote
  • AWS
  • Azure
  • client
  • Cloud
  • linux
  • pub
  • Scripting
  • Uncategorized
  • wan
  • Windows

Neueste Beiträge

  • Annoying Firefox-Defaults to be changed
  • Scope of this Blog
  • Terraform: Enable persistent Debugging
  • OVF/OVA-Properties
  • *** System restart required ***

Schlagwörter

ACU AI Ansible API Automation AWS Azure bash bestpractice chrome Cisco Compute Unit Controller cot CSR1000v Ethernet hsts Hyperconverged KVM Lab Linux Monitoring MTU NAPALM Nested netplan networking nexus nxos Proactive productivity Python QoS REST Scapy Scripting Security SKU todo UCSD Virtualization VMware WAN Windows Wordpress

Impressum

Impressum

Designed using Dispatch. Powered by WordPress.