Skip to content

Instantly share code, notes, and snippets.

<!--*************************************************
Windows 10 Answer File Generator
Created using Windows AFG found at:
;http://www.windowsafg.com
Installation Notes
Location:
Notes: Enter your comments here...
**************************************************-->
@edmcman
edmcman / vm.boxstarter
Last active June 24, 2024 15:41
Ed's Windows Boxstarter
Set-StartScreenOptions -EnableBootToDesktop
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar -EnableOpenFileExplorerToQuickAccess -EnableShowRecentFilesInQuickAccess -EnableShowFrequentFoldersInQuickAccess -EnableExpandToOpenFolder -EnableShowRibbon -EnableItemCheckBox
Enable-MicrosoftUpdate
choco install vscode
choco install sublimetext2
==750== Block was alloc'd by thread #1
==750==
==750== Lock at 0x2CDDB608 was first observed
==750== at 0x4850CCF: ??? (in /usr/libexec/valgrind/vgpreload_helgrind-amd64-linux.so)
==750== by 0x5C234AE: pharos::FunctionDescriptor::_get_pdg() (in /usr/local/lib/libpharos.so)
==750== by 0x5BAD68B: Sawyer::ThreadWorkers<Sawyer::Container::Graph<pharos::FunctionDescriptor*, Sawyer::Nothing, pharos::FunctionDescriptor*, Sawyer::Container::GraphEdgeNoKey<Sawyer::Nothing>, Sawyer::DefaultAllocator>, pharos::BottomUpAnalyzer::analyze()::{lambda(auto:1, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)#4}::operator()<pharos::BottomUpAnalyzer::analyze()::{lambda(unsigned long, pharos::FunctionDescriptor const*)#2}>(pharos::BottomUpAnalyzer::analyze()::{lambda(unsigned long, pharos::FunctionDescriptor const*)#2}, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const::{lambda(unsigned long, pharos::FunctionDescriptor*)#1}>::worker(ph
@edmcman
edmcman / app.log
Created October 27, 2023 20:49
Ghidra Operand Info
This file has been truncated, but you can view the full file.
2023-10-27 16:28:50 INFO (GhidraScript) InstructionOps.scala> Hey!
2023-10-27 16:28:50 INFO (GhidraScript) InstructionOps.scala> Function __setdefaultprecision
2023-10-27 16:28:50 INFO (GhidraScript) InstructionOps.scala> Insn: JMP 0x00413d40 has 1 operands
2023-10-27 16:28:50 INFO (GhidraScript) InstructionOps.scala> Operand 0 default rep 0x00413d40
2023-10-27 16:28:50 INFO (GhidraScript) InstructionOps.scala> Operand 0 ref type UNCONDITIONAL_JUMP
2023-10-27 16:28:50 INFO (GhidraScript) InstructionOps.scala> Operand 0 op type ADDR | CODE
2023-10-27 16:28:50 INFO (GhidraScript) InstructionOps.scala> Function FID_conflict:__wsetargv
2023-10-27 16:28:50 INFO (GhidraScript) InstructionOps.scala> Insn: JMP 0x00413de0 has 1 operands
2023-10-27 16:28:50 INFO (GhidraScript) InstructionOps.scala> Operand 0 default rep 0x00413de0
2023-10-27 16:28:50 INFO (GhidraScript) InstructionOps.scala> Operand 0 ref type UNCONDITIONAL_JUMP
>>> [(x['name'], x['download_url'], x['supplied_md5']) for x in fs.list_files(20732656)]
[('3-types.tar.xz', 'https://ndownloader.figshare.com/files/36987409', '75e2c42b3b344b39bbff32575b4408b2'), ('2-types.tar.xz', 'https://ndownloader.figshare.com/files/36987421', 'b07069dda66b9dc3c270f61b835d2c55'), ('2-bins.tar.xz', 'https://ndownloader.figshare.com/files/36987550', '64f27ad13fa9c58cb38ec981deb8fed9'), ('1-types.tar.xz', 'https://ndownloader.figshare.com/files/36987559', '4ff5d6973d2bd0d20c7dfd0c4ee1f7f1'), ('0-bins.tar.xz', 'https://ndownloader.figshare.com/files/36987673', '478cbf47eaf671c7e5312eae931b9705'), ('0-types.tar.xz', 'https://ndownloader.figshare.com/files/36987688', '8f59dc9e96e313b5cc19fb4a44a9305d'), ('1-bins.tar.xz', 'https://ndownloader.figshare.com/files/36987769', '6655006535238f8305dd3a353d1446b0'), ('3-bins.tar.xz', 'https://ndownloader.figshare.com/files/36987922', '3f3ee520aa30646cd98fce160603f75c'), ('SHA256SUMS', 'https://ndownloader.figshare.com/files/36987925', 'e257cf964ec9e04
//Decompile the function at the cursor, then build data-flow graph (AST)
//@category PCode
// Use with https://github.com/edmcman/ghidra-scala-loader
// XXX: Fix the listener so we can click on the graph. Requires slight change to PCodeDfgDisplayListener
// XXX: Make a button of prompt to write to a dot file
import ghidra.app.decompiler._
#!/usr/bin/python
import subprocess
SUSPEND_TIME = 15
WAIT_TIME = 30
kmod = "/home/ed/Documents/bitleaker/bitleaker-kernel-module/bitleaker-kernel-module.ko"
log = """[ 530.761011] bitleaker: [1] PCR 0, Event 7, SHA256= af 40 9d 41 7b 30 01 75 70 d4 a7 56 fe fa 9a 46 d9 0c 2b 48 cc f2 f0 8b ea 8f c4 14 62 1c e8 8d
@edmcman
edmcman / f.pl
Created January 26, 2023 20:33
A toy encoding of OO rules using CLPB
:- use_module(library(clpb)).
term_to_atom(T, Atom) :-
term_hash(T, Hash),
term_string(Hash, S),
atom_string(Atom, S).
get_var_for_term(Term, Out) :-
term_to_atom(Term, Atom),
nb_current(Atom, Out), !.
{"Land Rover, Defender, 2022, 110 P300 4dr SUV AWD (2.0L 4cyl Turbo 8A)": {"allterms": {"24": {"monthly": 692.0400266666667, "monthlywithtax": 766.6368964020535, "leasehackr": 5.636088418926454, "months": 24, "fees": 1065.0, "rv": 0.82, "mf": 0.00198, "url": "https://leasehackr.com/calculator?make=Land Rover&miles=10000&msrp=51850.0&sales_price=53450.0&months=24&mf=0.00198&msd=0&dp=0&dealer_fee=0&acq_fee=895&disp_fee=395&taxed_inc=0.0&untaxed_inc=0&rebate=0&resP=82.0&reg_fee=170.0&sales_tax=10.7792709757983&demo_mileage=0&memo=&monthlyTax_radio=true&bmw_demo_25=true&dealerFee_check=false&govFee_check=false&memo=Land%20Rover%2C%20Defender%2C%202022%2C%20110%20P300%204dr%20SUV%20AWD%20%282.0L%204cyl%20Turbo%208A%29"}, "36": {"monthly": 695.454275, "monthlywithtax": 770.4191758150236, "leasehackr": 5.60841872706808, "months": 36, "fees": 1065.0, "rv": 0.65, "mf": 0.00133, "url": "https://leasehackr.com/calculator?make=Land Rover&miles=10000&msrp=51850.0&sales_price=53450.0&months=36&mf=0.00133&msd=0&dp=0&dealer_