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 argparse | |
| import sys | |
| from pwnlib.tubes.listen import listen | |
| def main(cli_arguments): | |
| l = listen(port=cli_arguments.port, bindaddr='localhost', typ='tcp') | |
| _ = l.wait_for_connection() |
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
| /* | |
| Using this `shell.nix`, here is how to install BAP using `opam`: | |
| ``` | |
| opam init --comp=4.09.0 | |
| eval $(opam env) | |
| opam install bap | |
| ``` | |
| */ | |
| with import <nixpkgs> { }; |
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
| def tag_parameter_definitions(func): | |
| """ | |
| Add a `ParameterTag` to the definitions of the arguments of the function simulated by the handler. | |
| """ | |
| @functools.wraps(func) | |
| def wrapper(self, state: 'ReachingDefinitionsState', codeloc: 'CodeLocation'): | |
| arch = state.arch | |
| tag = ParameterTag( | |
| function = codeloc.ins_addr, |
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
| with import <nixpkgs> { }; | |
| let | |
| armhfDependencies = [ | |
| pkgsCross.armv7l-hf-multiplatform.buildPackages.targetPackages.glibc | |
| pkgsCross.armv7l-hf-multiplatform.buildPackages.targetPackages.ncurses5 | |
| pkgsCross.armv7l-hf-multiplatform.buildPackages.targetPackages.readline5 | |
| ]; | |
| in stdenv.mkDerivation { | |
| name = "cross-environment"; |
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
| with import <nixpkgs> { }; | |
| let | |
| python38WithPackages = python38.withPackages(ps: with ps; [ | |
| binwalk | |
| ]); | |
| firmware-mod-kit = fetchFromGitHub { | |
| owner = "rampageX"; | |
| repo = "firmware-mod-kit"; |
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
| with import <nixpkgs> { }; | |
| stdenv.mkDerivation rec { | |
| name = "ZAP"; | |
| buildInputs = [ | |
| openjdk | |
| ]; | |
| shellHook = '' |
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
| """ | |
| Backward slice from a given sink. | |
| Unfortunately, the BB definition used by Radare2 is too limiting: | |
| https://github.com/radareorg/radare2/issues/7170#issuecomment-631579110 | |
| """ | |
| from functools import reduce | |
| import r2pipe | |
| import sys |
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
| /* | |
| * Help write shellcodes targetting MSP430: | |
| * ``` | |
| * msp430-elf-as shellcode.s -o shellcode.o | |
| * msp430-elf-objcopy --dump-section .text=shellcode shellcode.o | |
| * od -An -t x1 shellcode | tr -d ' ' | |
| * ``` | |
| */ | |
| with import <nixpkgs> { |
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 os | |
| from networkx.drawing.nx_agraph import write_dot | |
| write_dot(netowrkx_graph, 'graph.dot') | |
| os.system('dot -Ksfdp -Tsvg -o graph.svg graph.dot') |
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
| with import <nixpkgs> { }; | |
| let | |
| arm-binutils = pkgsCross.arm-embedded.buildPackages.binutils; | |
| binutils_commands = "as ld objcopy readelf"; | |
| python3WithCoolPackages = python3.withPackages(ps: with ps; [ | |
| flask | |
| ipdb | |
| ipython |
NewerOlder