• Stars
    star
    443
  • Rank 98,504 (Top 2 %)
  • Language
    Rust
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Compiletime string literal obfuscation for Rust.

String Obfuscation

MIT License crates.io docs.rs Build status

Compiletime string constant obfuscation for Rust.

The string constant itself is embedded in obfuscated form and deobfuscated locally. This reference to a temporary value must be used in the same statement it was generated. See the documentation for more advanced use cases.

Looking for obfuscating formatting strings? See fmtools (github, crates.io, docs.rs) with the optional dependency obfstr enabled to automatically apply string obfuscation to formatting strings.

Examples

The obfstr! macro returns the deobfuscated string as a temporary value:

use obfstr::obfstr as s;
assert_eq!(s!("Hello 🌍"), "Hello 🌍");

The wide! macro provides compiletime utf16 string constants:

let expected = &['W' as u16, 'i' as u16, 'd' as u16, 'e' as u16, 0];
assert_eq!(obfstr::wide!("Wide\0"), expected);

The random! macro provides compiletime random values:

const RND: i32 = obfstr::random!(u8) as i32;
assert!(RND >= 0 && RND <= 255);

Compiletime random values are based on file!(), line!(), column!() and a fixed seed to ensure reproducibility. This fixed seed is stored as text in the environment variable OBFSTR_SEED and can be changed as desired.

License

Licensed under MIT License, see license.txt.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.

More Repositories

1

apexdream

Apex Legends external cheat for UnKnoWnCheaTs in Rust
Rust
462
star
2

pelite

Lightweight, memory-safe, zero-allocation library for reading and navigating PE binaries.
Rust
280
star
3

fmtools

Fast, minimal, feature-rich, extended formatting syntax for Rust!
Rust
68
star
4

external

Windows external process interaction, WIP
Rust
40
star
5

ProjectileSolverDemo

Hitting a moving target with a ballistic projectile
Rust
34
star
6

SourceProtect

Provides basic protection against malicious servers as well as prevents servers from being annoying.
25
star
7

LibEx

C++ Helper Library for myself
C++
24
star
8

lde

Length disassembler for x86 and x86_64 in Rust.
Rust
24
star
9

format_xml

Minimal compiletime templating for XML in Rust!
Rust
21
star
10

capcom0

Rust bindings to the infamous Capcom driver.
Rust
20
star
11

vigem-client

ViGEm client API in pure Rust.
Rust
17
star
12

struct_layout

Customize your struct layout with this one weird trick
Rust
14
star
13

bitset-core

Straightforward, no-std compatible, simd optimized, BitSet API.
Rust
12
star
14

pekit

PE viewer web application
Vue
12
star
15

OpenPlugin

client plugin for tf2/css doing various things
C++
10
star
16

ini_core

Streaming INI parser for no_std Rust
Rust
9
star
17

dataview

Safe transmute between types and byte arrays of the same size.
Rust
9
star
18

intptr

Rust
8
star
19

wineh

Windows SEH for Rust
Rust
8
star
20

cvar

Configuration Variables for Rust
Rust
6
star
21

named_constants

Makes enums behave like named constants in languages like C/C++ or C#.
Rust
5
star
22

websocket-protocol

WebSocket Protocol Library for Rust
Rust
5
star
23

com-rs

Windows COM for Rust
Rust
5
star
24

urandom

Produce and consume randomness, to convert them to useful types and distributions, and some randomness-related algorithms.
Rust
5
star
25

pupil-rs

Arithmetic expression evaluator in Rust
Rust
4
star
26

wbem-rs

COM Bindings for Web-Based Enterprise Management, I'm not even kidding.
Rust
3
star
27

PotatoClipEditor

Potato Clip Editor
JavaScript
3
star
28

UntitledDataFormat

UDF is a simple, self-describing, structured binary file format for storing arrays and their relationships.
Rust
3
star
29

q3mod

Quake3 external cheat
Rust
2
star
30

shade

Vector graphics API.
Rust
2
star
31

SourceServerQuery

C++ Library for querying Source game servers.
C++
2
star
32

vgcolors

Video game colors library
Rust
2
star
33

ringbuf

Rust
2
star
34

vision

Vision is a simple WebApp to draw a custom overlay.
Rust
2
star
35

adventofcode2018

My casual participation of https://adventofcode.com/2018
Rust
2
star
36

phantasm

Web client for the Phantasm project.
Vue
2
star
37

aurascope

A WebApp for live HTML visualization
Vue
2
star
38

ansi-gfx

ANSI Graphics Colors made easily printable
Rust
2
star
39

mphf

An exercise in implementing minimally perfect hash functions.
Rust
1
star
40

cvmath

Computer Graphics Math Library
Rust
1
star
41

Vue-Script

Vue Single File Components without the insanity that comes with the NPM ecosystem.
Rust
1
star
42

program-proxy

The program acts as a proxy for another program or script.
Rust
1
star
43

adventofcode2019

Advent of Code for 2019!
Rust
1
star
44

trigger

Manage variables transitioning between simple boolean states
Rust
1
star
45

pak-rs

Encrypted archive based on Quake's PAK format
Rust
1
star
46

PupilSharp

Pupil calculator in C#
C#
1
star
47

hexdump-rs

Hex dump utility.
Rust
1
star
48

pak

Encrypted archive based on Quake's PAK format
Rust
1
star
49

ExtPlugin

Extended Plugin for TF2
C++
1
star
50

programming-problems-rs

https://adriann.github.io/programming_problems.html in Rust
Rust
1
star
51

tetrs

Tetris clone written in Rust
Rust
1
star
52

Pupil

Arithmetic expression evaluator in C/C++
C++
1
star
53

align_data

Simply increase the alignment of any statics or include_bytes!
Rust
1
star