Skip to content

Instantly share code, notes, and snippets.

Mutti muttiopenbts

Block or report user

Report or block muttiopenbts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@muttiopenbts
muttiopenbts / gen_ivt.py
Created Aug 19, 2019
Generate ivt binary for use when running an imx6 SoC in HAB mode. Helper towards signing kernel images.
View gen_ivt.py
def gen_ivt(loadaddr, image_file):
'''Generate imx SoC ivt
Args:
loadaddr int. Hex representing load address in ram for uboot.
Can be obtained from your u-boot.cfg build file.
image_file string. filename and path to binary image. If
generating ivt for signing kernel image, ensure kernel
image file is pre-padded.
returns:
View Python PyCrypto: Sign Data Example.py
'''
pip uninstall crypto
pip install pycrypto
Tested using python 3
'''
def sign_data(private_key_loc, data, pass_phrase=None):
'''
param: private_key_loc Path to your private key
param: data, plain text data to be signed
param: pass_phrase if private key is protected
View modbus_rtu_test.py
'''
Test script for interacting with device over modbus-rtc.
Need to improve received strings to output correctly after decoding.
'''
import pymodbus
import serial
from pymodbus.constants import Endian
from pymodbus.pdu import ModbusRequest
from pymodbus.client.sync import ModbusSerialClient as ModbusClient #initialize a serial RTU client instance
@muttiopenbts
muttiopenbts / ftpserver.py
Last active Jan 5, 2017 — forked from scturtle/ftpserver.py
simple ftp server by python
View ftpserver.py
#!/usr/bin/env python2
# coding: utf-8
import os,socket,threading,time
import sys
#import traceback
allow_delete = False
local_ip = sys.argv[1]
local_port = 21
You can’t perform that action at this time.