Skip to content

Instantly share code, notes, and snippets.

View bruce30262's full-sized avatar
🤔
Hmmm......

Bruce Chen bruce30262

🤔
Hmmm......
View GitHub Profile
@bruce30262
bruce30262 / qemu-networking.md
Created June 18, 2019 10:31 — forked from extremecoders-re/qemu-networking.md
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@bruce30262
bruce30262 / fix_riscv_decompile.py
Created November 14, 2020 09:39
ghidra python script for fixing "Unknown Error" in the decompile window of RISC-V binary ( for RV64I language binary )
# Check out the issue for more detail : https://github.com/NationalSecurityAgency/ghidra/issues/2466
# The script will calculate the value of gp register base on the code in entry(), then apply the value to all the functions
# This only work in the `RV64I` language though, since other language like `RV64GC` won't set the gp register in entry()
from java.math import BigInteger
def newAddress(offset):
"""
Helper function to get a Ghidra Address type
"""