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
Welcome to Jordan's grab-bag of common Binary Ninja Snippets. | |
These snippest are meant to run with the Binary Ninja Snippets Plugin | |
(http://github.com/Vector35/snippets) though they can all also be pasted | |
directly into the python console or turned into stand-alone plugins if needed. | |
To install the entire collection at once, just install the Snippets plugin via | |
the plugin manager (CMD/CTL-SHIFT-M), confirm the Snippet Editor works | |
(Tool/Snippets/Snippet Editor), and unzip this bundle (Download ZIP above) into | |
your Snippets folder. |
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 PySide6.QtWidgets import QApplication, QMainWindow, QMessageBox, QPushButton | |
from PySide6.QtCore import Qt | |
import sys | |
class MainWindow(QMainWindow): | |
def __init__(self): | |
super().__init__() | |
self.setWindowTitle("QT Test") | |
button = QPushButton("Test Dialog") | |
button.clicked.connect(self.button_click) |
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/bash | |
GHIDRAPATH=~/Downloads/ghidra | |
# https://stackoverflow.com/posts/23002317/revisions | |
function abspath() { | |
# generate absolute path from relative path | |
# $1 : relative filename | |
# return : absolute path | |
if [ -d "$1" ]; then | |
# dir |
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
#!/usr/bin/env zsh | |
# Note: | |
# CMake, Clang, clang-format, Ninja, git and sed are required to build | |
# | |
# Note that currently there is a bug (https://github.com/google/binexport/issues/117) | |
# that requires applying this patch, remove when resolved | |
# | |
if [ -d ~/Downloads ] |
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/zsh | |
echo "file://${HOME}/ports"|sudo tee -a /opt/local/etc/macports/sources.conf | |
mkdir -p ${HOME}/ports/devel/zeal | |
cat > ${HOME}/ports/devel/zeal/Portfile << ** | |
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 | |
PortSystem 1.0 | |
PortGroup cmake 1.1 | |
PortGroup github 1.0 |
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
def myvisit(opName, op, opType, parentInstruction): | |
if (op.operation == MediumLevelILOperation.MLIL_MULU_DP) and isinstance(op.right, Constant) and isinstance(op.left, Constant): | |
nextInstruction = op.function[op.instr_index + 1] | |
leftVal = op.left.value.value | |
rightVal = op.right.value.value | |
upper = leftVal * rightVal >> 32 | |
lower = leftVal * rightVal & 0xffffffff | |
if isinstance(nextInstruction, SetVar): | |
nextVar = nextInstruction.src.operands[0] | |
if hasattr(nextVar, "name"): |
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
Once there was a brilliant engineer named Alice who was determined to push the limits of technology. She had been working on a project to build a time dilation chamber, which would allow her to experience time at a different rate than the outside world. | |
Alice had been struggling with the project for months, but she was determined to see it through to the end. She poured over the technical specifications, ran countless simulations, and consulted with other experts in the field. | |
Finally, Alice had an idea. She decided to use a GPT-powered chat-bot to help her design the chamber. She spent hours talking with the chat-bot, bouncing ideas back and forth and asking for advice and clarification. | |
To her amazement, the chat-bot was able to provide her with detailed and accurate answers to even the most complex questions. With its help, Alice was able to overcome the obstacles that had been holding her back and make significant progress on the project. | |
In just a week of real-time, Alice was able to design and build |
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 time | |
import sys | |
import board | |
import neopixel | |
import busio | |
import digitalio | |
import displayio | |
import terminalio | |
from adafruit_display_text import label | |
from adafruit_displayio_sh1107 import SH1107, DISPLAY_OFFSET_ADAFRUIT_FEATHERWING_OLED_4650 |
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
### Contribution License Agreement | |
This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”), and conveys certain license rights to Vector 35 Inc and its affiliates (“Vector35”) for Your contributions to Vector35 open source projects. This Agreement is effective as of the latest signature date below. | |
**Definitions** | |
“Code” means the computer software code, whether in human-readable or machine-executable form, that is delivered by You to Vector35 under this Agreement. | |
“Project” means any of the projects owned or managed by Vector35 and offered under a license approved by the Open Source Initiative (www.opensource.org). |
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
{ | |
"Back" : "Escape; Back; Ctrl+[; Meta+O", | |
"Forward" : "Forward; Ctrl+[; Meta+I", | |
"Change Type..." : "Shift+Y; ", | |
"Close Window" : "Ctrl+W; X", | |
"Command Palette" : "Ctrl+P; Space", | |
"Copy" : "Ctrl+C; Y", | |
"Disassembly Graph" : "G, L", | |
"Display as\\Binary" : "D", | |
"Display as\\Default" : "D", |
NewerOlder