apt install -y python3-pip can-utils socat openocd
pip3 install python-can pyserial
This file contains 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
#!/bin/sh | |
# | |
# Retrial VMWare Fusion another 30 days | |
# | |
set -eu | |
sudo rm -rf /Library/Preferences/VMware\ Fusion/license-fusion-* | |
echo "Done! please restart VMware Fusion.app." |
This file contains 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 java.awt import Color | |
from ghidra.util.task import ConsoleTaskMonitor | |
from ghidra.program.model.block import BasicBlockModel | |
from docking.options.editor import GhidraColorChooser | |
""" | |
Ghidra script to colorize all basic blocks identified by the input file. | |
Prompts for a file to use as input. This script will attempt to sanity check | |
that a basic block actually does start at each provided address. |
This file contains 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 glob | |
import subprocess | |
dir = "/path/to/dir" | |
files = glob.glob(dir + "*") | |
files.sort() | |
for file in files: | |
r = subprocess.run(["xxd", file], stdout=subprocess.PIPE) | |
with open("output.txt", "a") as f: |
This file contains 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
using System; | |
using System.IO; | |
using System.IO.MemoryMappedFiles; | |
using System.Runtime.InteropServices; | |
public class HelloWorld | |
{ | |
static public void Main () | |
{ | |
string MappedMemoryFileName = "/tmp/mmf"; |
This file contains 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
python | |
# GDB dashboard - Modular visual interface for GDB in Python. | |
# | |
# https://github.com/cyrus-and/gdb-dashboard | |
# License ---------------------------------------------------------------------- | |
# Copyright (c) 2015-2022 Andrea Cardaci <[email protected]> | |
# |
This file contains 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
DUMP_FILE = "CANDUMP.log" | |
can_id_array = [] | |
with open(DUMP_FILE, 'r') as f: | |
while True: | |
data = f.readline() | |
if not data: | |
break |
This file contains 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
""" | |
12ビットの符号付き整数の16進数(1桁+2桁が別の変数) -> 10 | |
data1: 4bit | |
data2: 12bit | |
total: 16bit | |
""" | |
# data1: 0xF, data2: 0xFF | |
def convert_two_complement_hex_to_dec(data1, data2): |
This file contains 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
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> |
NewerOlder