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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
idaProPath = "$PWD"; # Adjust this to your IDA Pro installation path | |
idaExecutable = "${idaProPath}/ida64"; # Adjust if needed for different executables | |
fhsEnv = pkgs.buildFHSUserEnv { | |
name = "ida-pro-env"; | |
targetPkgs = pkgs: (with pkgs; [ | |
glibc | |
libGL |
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 parse_maps(pid): | |
with open("/proc/{pid}/maps".format(pid=pid)) as f: | |
for line in f.readlines(): | |
vals = ( | |
val.strip() | |
for val in line.split(" ") | |
if val.strip() | |
) | |
addrs = next(vals) |
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
1 | 1 | |
---|---|---|
2 | 1 | |
3 | 1 | |
4 | 1 | |
5 | 1 | |
6 | 1 | |
7 | 1 | |
8 | 1 | |
9 | 1 | |
10 | 1 |
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
#![no_std] | |
extern crate alloc; | |
use alloc::vec::Vec; | |
use primitive::Primitive; | |
/// Implementation of: | |
/// > An Efficient Representation for Sparse Sets | |
/// > by Preston Briggs and Linda Torczon | |
/// > <https://dl.acm.org/doi/pdf/10.1145/176454.176484> | |
/// > <https://research.swtch.com/sparse> |
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
//! Implementation of SipHash from [Jean-Philippe Aumasson](https://www.aumasson.jp/) and Daniel J. Bernstein. | |
//! | |
//! SipHash is a general-purpose hashing function: it runs at a good | |
//! speed (competitive with Spooky and City) and permits strong _keyed_ | |
//! hashing. This lets you key your hash tables from a strong RNG, such as | |
//! [`rand::os::OsRng`](https://docs.rs/rand/latest/rand/rngs/struct.OsRng.html). | |
//! | |
//! Although the SipHash algorithm is considered to be generally strong, | |
//! it is not intended for cryptographic purposes. As such, all | |
//! cryptographic uses of this implementation are _strongly discouraged |
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
/// A simple online linear regression algorithm. | |
/// See https://en.wikipedia.org/wiki/Simple_linear_regression#Fitting_the_regression_line | |
/// for details. | |
pub struct FirstOrderOLS { | |
x: f64, | |
y: f64, | |
xx: f64, | |
xy: f64, | |
n: usize, |
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
#![feature(test)] | |
extern crate test; | |
use test::{black_box, Bencher}; | |
// Optionally include some setup | |
const NUMBER_OF_ELEMENTS: usize = 10_000; | |
const BITS: usize = 5; | |
fn gen_data() -> Vec<u8> { | |
let mut res = Vec::with_capacity(NUMBER_OF_ELEMENTS); |
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
#![deny(unconditional_recursion)] | |
use core::fmt::{Debug, Display, LowerHex, Binary}; | |
use core::ops::*; | |
use core::sync::atomic::*; | |
use core::num::*; | |
/// Trait of operations possible on both Signed and Unsiged words | |
pub trait Number: Sized + Send + Sync + | |
Display + LowerHex + |
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
# Version of Elastic products | |
STACK_VERSION=8.4.2 | |
# Port to expose Elasticsearch HTTP API to the host | |
ES_PORT=9200 | |
# Port to expose Kibana to the host | |
KIBANA_PORT=5601 | |
# RAM for each service 4GB |
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 struct | |
def u32(data): | |
return struct.unpack("i", data)[0] | |
def p32(data): | |
return struct.pack("i", data) | |
class Regs: | |
IP = 0 |
NewerOlder