This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print ("Customized payload") | |
| print ("It works!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print ("Customized payload") | |
| print ("It works!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import psutil | |
| import time | |
| import subprocess | |
| from Hologram.CustomCloud import CustomCloud | |
| def hologram_network_connect(): | |
| hologram_network_disconnect() | |
| time.sleep(2) | |
| cloud = CustomCloud(None, network='cellular') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from distutils.core import setup | |
| import py2exe | |
| setup( | |
| name = ‘Meter’, | |
| description = ‘Python-based App’, | |
| version = ‘1.0’, | |
| console=[‘mrtp.py’], | |
| options = {‘py2exe’: {‘bundle_files’: 1,’packages’:’ctypes’,’includes’: ‘base64,sys,socket,struct,time,code,platform,getpass,shutil’,}}, | |
| zipfile = None, | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import base64,sys;exec(base64.b64decode({2:str,3:lambda b:bytes(b,'UTF-8')}[sys.version_info[0]]('cHJpbnQgKCJDdXN0b21pemVkIHBheWxvYWQiKQpwcmludCAoIkl0IHdvcmtzISIpCg=='))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import serial | |
| gps_data = "" | |
| utf_data = "" | |
| ser = serial.Serial('/dev/ttyO2', 4800) | |
| counter = 0 | |
| while utf_data.find("GPRMC") == -1: | |
| counter += 1 | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import can | |
| bus = can.interface.Bus(bustype='socketcan', channel='can0', bitrate=500000) | |
| service_int = int("9", 16) | |
| pid_int = int("2", 16) | |
| msg = can.Message(arbitration_id=0x7DF, data=[2, service_int, pid_int, 0, 0, 0, 0, 0], is_extended_id=False) | |
| try: | |
| bus.send(msg) |