Interfacing with Oracle DBs

This was so much of a pain in the ass to figure out that I decided that I would compile a whole post specifically around useful information for this topic. To get started, download SQLDeveloper through Oracle's site (you'll need to register). So far I've tested this on OSX. Establishing…

SCADA Security Notes

Modbus write random registers from pymodbus.client.sync import ModbusTcpClient import multiprocessing import random from multiprocessing import TimeoutError client = ModbusTcpClient('[target]') client.connect() def write(reg): client.write_register(reg+1, random.randint(1, 100)) print('reg:' + str(reg)) if __name__ == '__main__': while True: p…

Python Notes

This will encompass things that I find useful and end up looking up later when I haven't coded in a while. Python3 Simple HTTP Server python3 -m http.server <port> Get password as input import getpass try: password = getpass.getpass() except Exception as error: print('ERROR', error) Resource:…

SQL Cheatsheet

Generic Update field UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition; Get first row of data from table SELECT * FROM <table_name> LIMIT 1; Single-line comment -- stuff to comment out Multi-line comment /** stuff to comment out **/ Delete the last n rows from a table DELETE…

Modernizing Techvomit

In case it wasn't obvious, this site runs on Ghost. I made this decision a couple of years ago on a 4 hour plane ride when I was bored, and wanted to kill two birds with one stone: start learning how some of the AWS services worked, and get a…