load without any analysis (file header at offset 0x0): r2 -n /path/to/file
- analyze all:
aa - show sections:
iS - list functions:
afl - list imports:
ii - list entrypoints:
ie - seek to function:
s sym.main
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import subprocess | |
| #----------------------------------------------------------------------------- | |
| def main(): | |
| fileNames = sys.argv[1:] |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
| class FloydWarshall(object): | |
| def __init__(self, file_): | |
| nodes = file_.read().splitlines() | |
| file_.close() | |
| self.get_graph(nodes) | |
| self.len_ = len(self.nodes) | |
| self.create_fw_matrix() | |
| def get_graph(self, nodes): |
| #!/usr/bin/env bash | |
| brew install openssl | |
| git clone git://anongit.mindrot.org/openssh.git | |
| cd openssh | |
| # The './configure' script does not exist, so we have to build it | |
| autoreconf |
| from cryptography import x509 | |
| from cryptography.hazmat.backends import default_backend | |
| from cryptography.hazmat.primitives import hashes, serialization | |
| from cryptography.hazmat.primitives.asymmetric import rsa | |
| from cryptography.x509.oid import NameOID | |
| import datetime | |
| import uuid | |
| one_day = datetime.timedelta(1, 0, 0) | |
| private_key = rsa.generate_private_key( | |
| public_exponent=65537, |
| ## IPv6 Tests | |
| http://[::ffff:169.254.169.254] | |
| http://[0:0:0:0:0:ffff:169.254.169.254] | |
| ## AWS | |
| # Amazon Web Services (No Header Required) | |
| # from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories | |
| http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy | |
| http://169.254.169.254/latest/user-data | |
| http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME] |
| 'use strict'; | |
| /* | |
| * Usage: | |
| * $ frida -U -n Twitter -l load-cycript.js | |
| */ | |
| var PORT = 27060; | |
| dlopen('/usr/lib/libcycript.dylib'); |
| import sys | |
| import r2pipe | |
| r2 = r2pipe.open("./zwiebel2") | |
| r2.cmd("e dbg.profile=zwiebel.rr2") | |
| r2.cmd("doo") # reopen for debugging | |
| r2.cmd("db 0x400875") # set breakpoint at `call r14` | |
| r2.cmd("dc") # continue until breakpoint is hit | |
| def step(): |
This list contains repositories of libraries and approaches for knowledge graph embeddings, which are vector representations of entities and relations in a multi-relational directed labelled graph. Licensed under CC0.