Author: JC

The Perfect MikroTik Config Restore Script

The Perfect MikroTik Config Restore Script

Restoring config files on MikroTik routers have always been a pain. I set out to make the perfect config restore script for MikroTik routers.

Have your every tried to paste configuration commands into a MikroTik router? Yeah, it doesn’t work. As soon as the script adds an interface to a bridge or changes an IP you get disconnected and the rest of the script lines fail to restore.

Using the ‘run after reset‘ method is really the best way to restore a MikroTik router’s configuration but it has it’s own little caveats like editing the script first and adding a :delay 15s; line at the top.

After reboot, there is no clear indication if the import was successful or failed. While troubleshooting an error riddled backup I had the idea of introducing an audible beep before and after the import process. This lead me to develop this script.

Read More Read More

Goals for 2019

Goals for 2019

Each new year I take the time to set detailed & challenging goals for myself. Here are my objectives for 2019. Tell me what you think or link to your own 2019 goals in the comments below.

Blogging

Software Development

  • Complete the #100daysofcode challenge
  • Improve my python programming skills
  • Learn vue.js front-end framework
  • Learn asyncio and create a sanic-based web application
  • Develop a IoT project using
    GPIO sensors, Arduino, and/or Raspberry Pi board

Training & Certifications

Career, Conferences & Speaking

  • Give a technical talk as a conference speaker
  • Attend SpiceWorld 2019 in Austin, Texas
  • Attend two Utility industry specific conferences

Photography & Graphics Design

  • Develop cutrerphoto.com & move all photography content there.
  • Continue to develop my photography portfolio
  • Build a stowable photography studio in my garage
  • (Hopefully) procure the forthcoming Panasonic S1R full-frame camera.
#100DaysofCode Python Edition (2019)

#100DaysofCode Python Edition (2019)

Welcome to my 2019 100 days of code python project, started Jan 3 2019. My primary object is to take my python development skills to the next level. I have organized my #100daysofcode project at jcutrer.com/100daysofcode/ discussion and source code will be published in approximately 20 blog post, linked below. You can also keep up with my progress by following me @joncutrer on twitter.

Read More Read More

Scapy DHCP listener in Python

Scapy DHCP listener in Python

This script listens for DHCP Request and Discover packets on the LAN using scapy.

A little background on the DHCP protocol

Hosts issue a DHCP Discover packet to destination 255.255.255.255 to request an IP Address assignment from a DHCP server. DHCP Discover, Request, Offer, Ack and Inform packets are sent as broadcasts, all hosts on the LAN receive these packets. Because of the nature of the protocol, no special port mirroring or tapping is required on the host that runs this script.

This script is the foundation for creating a passive network discovery tool. We can collect and store the Mac Address, Hostname, and IP Address all hosts configured for DHCP IP address assignment.

Read More Read More

Scapy ARP listener in Python

Scapy ARP listener in Python

This script listens for ARP request packets using scapy to learn the IP and Mac Address of LAN hosts.

A little background on the ARP protocol

ARP is the protocol that hosts use to discover the mac address of another LAN host. The initiating host asks “Who Has <IP Address>”, this request is transmitted as a broadcast ethernet packet to destination 00:00:00:00:00:00. Since the ARP request is sent as a broadcast, all hosts on the LAN receive and process this packet. Because of the nature of the protocol, no special port mirroring or tapping is required on the host that runs this script.

The host that has <IP Address> will reply back directly to the requester so we will not see that ARP reply packet unless our machine sent the initial ARP request.

This script is the foundation for creating a passive network discovery tool. We can collect and store the MAC Address, IP Address pairs for all hosts we hear communicating on the network.

Read More Read More