Skip to content
the broadcast

networking, computing, virtualization, automation

Python

Visio Diagrams with Python: Resize to fit

2021-04-22
By: ron
On: 2021-04-22
In: Scripting
With: 0 Comments

Resize Page to Fit Contents, Set Zoom to Fit Page When the drawing is ready, the size of the page will be too large or too small – „fit to contents“ might be the solution. Additionally, I prefer the Zoom of the active Window to be set that it shows the whole drawing. ResultRead More →

Visio Diagrams with Python: Colors

2021-04-21
By: admin
On: 2021-04-21
In: Scripting
With: 0 Comments

24 Colors to choose from. „Cells“ contain all „Shape-Format“-Properties Details: https://docs.microsoft.com/en-us/office/client-developer/visio/cells-visio-shapesheet-reference ResultRead More →

Visio Diagrams with Python: Connectors

2021-04-20
By: admin
On: 2021-04-20
In: Scripting
With: 0 Comments

Connect two existing Shapes The API is somehow weird, since it creates an (Shape-)Object, but it doesn’t return it. you’ll have to fetch the last object in the shapes-List ResultRead More →

Visio Diagrams with Python: Stencils

2021-04-19
By: ron
On: 2021-04-19
In: Scripting
With: 0 Comments

Stencils and Stencil-Files Stencils are stored in „VSSX“-Files Page-Object Add a FTP-Server to the page ResultRead More →

Visio Diagrams with Python using COM

2021-04-18
By: ron
On: 2021-04-18
In: Scripting
With: 0 Comments

Visualize Data from Python in Visio I needed to illustrate some data discovered by a python script in Microsoft Visio. As a starting-point i found two sources of infomation in the Internet: (1) Python => COM => MS Excel How to access a Windows COM-Application from Python: https://pbpython.com/windows-com.html MS Excel not Visio but 50% of the information needed (2) PowerShell => COM => MS Visio How to access Microsoft Visio using the COM-Interface https://www.powershellstation.com/2016/01/20/powershell-and-visio-1 PowerShell the other 50% needed. Result: „Python => COM => MS Visio“ Putting both pieces together, will allow a Python-Script to control MS Visio. (3) MS Visio „Object Model“ Without theRead 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 „netifaces“ installation: „Microsoft Visual C++ 14.0 is required“

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

I expected a nobrainer: The suggested URL to download the missing software is wrong (HTTP 404). Go to the Microsoft-Repository Tools for Visual Studio 2017 or use the direct link to vs_buildtools.exe …it’s about 1.2MB run „vs_buildtools.exe“ …it downloads ~ 70 MB Select „Workloads => Windows => [x] Visual C++ Build Tools“ => [Install] …it downloads 1.12 GB …and installs and … unlucky… reboot required Now netifaces can get installed:Read More →

Python Scapy: Wait for CDP-Neighbor

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

After provisioning a new Cisco CSR1000V-Router this script waits until the router is fully deployed got it’s Management-IP-Address assigned via DHCP. and returns this Management IP-Address. Prepare First, install „netaddr“-package. needed to check, if the management-IP of the CDP-Neighbor is in the correct IP-Subnet the „wait-for-CDP“-Script Obviously far to much hard-coded stuff, just as an example 😉 waiting for a CDP-Neighbor to appear with the following properties: hostname „CSR-A“ an IP-Address within the network „192.168.56.0 /24“ at the interface VirtualBox Host-Only-Network Provision a new CSR1000V Router named „CSR-A“ Run the „wait-for-CDP-Neighbor“-Script In a second CMD-Box, and… Be patient, of course. Or store the returned IP-AddressRead More →

Beitrags-Navigation

1 2 3 Nächste

Kategorien

  • AI
  • automation
  • awayfromevernote
  • AWS
  • Azure
  • Certification
  • client
  • Cloud
  • Development
  • homelab
  • linux
  • pub
  • Scripting
  • stupid defaults
  • Uncategorized
  • wan
  • Windows

Neueste Beiträge

  • Cisco UCS – set SSH idle-timeout
  • IPv4 Documentation Address-Blocks
  • Refresh ENVironment Variables
  • Windows Client Setup: Disable Teredo/ISATAP
  • Cloud-Init for VMs in private and public Clouds

Schlagwörter

AI Ansible Automation AWS Azure bestpractice chrome Cisco Cloud Code COM Controller cot CSR1000v Ethernet Firefox hsts Hyperconverged KVM Lab Linux Monitoring MTU NAPALM Nested nexus nxos PowerShell Proactive productivity PuTTY Python QoS Scapy Scripting Security Terraform todo UCSD Virtualization Visio VMware WAN Windows Wordpress

Impressum

Impressum

Designed using Dispatch. Powered by WordPress.