obfs

package module
v1.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

README

obfs

A simple tool to obfuscate strings in memory.

How to install

Open a terminal and run the following:

$ go get -u gitlab.com/mjwhitta/obfs

Usage

$ obfs "this is a test"
// this is a test
var str string = obfs.Deobfuscate(
    []byte{
        0x74, 0xf5, 0x5a, 0xcc, 0xbd, 0x81, 0xdd, 0xc3, 0x32,
        0x0a, 0x07, 0x9d, 0x68, 0x6e, 0x0a, 0x97, 0x11, 0x88,
        0xea, 0x60, 0x2d, 0x1b, 0x8e, 0xe7, 0x69, 0x3c, 0x76,
        0x58, 0x04, 0xcf, 0xae, 0x95, 0xa3, 0xbc, 0x1a, 0xe4,
        0x73, 0x10, 0x08, 0xd6, 0x6b, 0x61, 0xf6, 0x23, 0x04,
        0x1f, 0x0d, 0x1b, 0x20, 0x39, 0x42, 0xa4, 0xa5, 0x46,
        0x38, 0x2c, 0xbd, 0x87, 0x22, 0x91, 0x69, 0x07, 0x91,
        0xb5, 0x79, 0x16, 0x5c, 0x14, 0xc1, 0xb5, 0xf0, 0xbb,
        0x73, 0x82, 0xc4, 0x32, 0xcd, 0xae, 0x26, 0x1a, 0x90,
        0x5c, 0x26, 0x94, 0x20, 0x7e, 0x86, 0xe3, 0x56, 0x02,
        0xa9, 0xa2, 0x65, 0x19, 0x80, 0x94, 0x61, 0x78, 0xd4,
        0xb9, 0xa9, 0x32, 0xaf, 0xad, 0xda, 0x9c, 0xc3, 0x8c,
        0x20, 0xb1, 0xeb, 0x1c, 0xcd, 0xc8, 0x24, 0x67, 0xb9,
        0xbf, 0xe7, 0x0b, 0x74, 0x3b, 0x50, 0x83, 0xe7, 0x1a,
        0x62, 0xea, 0x59, 0xb2, 0x49, 0xc5, 0x65, 0xfc, 0x92,
        0x38, 0x64, 0x27, 0xb1, 0xf4, 0xe4, 0x89, 0x3e, 0xda,
        0x73, 0x70, 0xc7, 0xea, 0x02, 0x0e, 0x59, 0xa6, 0x5d,
        0xce, 0x97, 0xcd, 0x74, 0xdc, 0xb2, 0xd6, 0xa9, 0x5d,
        0x5b, 0xf9, 0xf1, 0x69, 0x67, 0x60,
    },
    12,
)
package main

import (
    "fmt"

    "gitlab.com/mjwhitta/obfs"
)

func main() {
    // this is a test
    var str string = obfs.Deobfuscate(
        []byte{
            0x74, 0xf5, 0x5a, 0xcc, 0xbd, 0x81, 0xdd, 0xc3, 0x32,
            0x0a, 0x07, 0x9d, 0x68, 0x6e, 0x0a, 0x97, 0x11, 0x88,
            0xea, 0x60, 0x2d, 0x1b, 0x8e, 0xe7, 0x69, 0x3c, 0x76,
            0x58, 0x04, 0xcf, 0xae, 0x95, 0xa3, 0xbc, 0x1a, 0xe4,
            0x73, 0x10, 0x08, 0xd6, 0x6b, 0x61, 0xf6, 0x23, 0x04,
            0x1f, 0x0d, 0x1b, 0x20, 0x39, 0x42, 0xa4, 0xa5, 0x46,
            0x38, 0x2c, 0xbd, 0x87, 0x22, 0x91, 0x69, 0x07, 0x91,
            0xb5, 0x79, 0x16, 0x5c, 0x14, 0xc1, 0xb5, 0xf0, 0xbb,
            0x73, 0x82, 0xc4, 0x32, 0xcd, 0xae, 0x26, 0x1a, 0x90,
            0x5c, 0x26, 0x94, 0x20, 0x7e, 0x86, 0xe3, 0x56, 0x02,
            0xa9, 0xa2, 0x65, 0x19, 0x80, 0x94, 0x61, 0x78, 0xd4,
            0xb9, 0xa9, 0x32, 0xaf, 0xad, 0xda, 0x9c, 0xc3, 0x8c,
            0x20, 0xb1, 0xeb, 0x1c, 0xcd, 0xc8, 0x24, 0x67, 0xb9,
            0xbf, 0xe7, 0x0b, 0x74, 0x3b, 0x50, 0x83, 0xe7, 0x1a,
            0x62, 0xea, 0x59, 0xb2, 0x49, 0xc5, 0x65, 0xfc, 0x92,
            0x38, 0x64, 0x27, 0xb1, 0xf4, 0xe4, 0x89, 0x3e, 0xda,
            0x73, 0x70, 0xc7, 0xea, 0x02, 0x0e, 0x59, 0xa6, 0x5d,
            0xce, 0x97, 0xcd, 0x74, 0xdc, 0xb2, 0xd6, 0xa9, 0x5d,
            0x5b, 0xf9, 0xf1, 0x69, 0x67, 0x60,
        },
        12,
    )
    fmt.Println(str)
}

Documentation

Index

Constants

View Source
const Version = "1.0.10"

Version is the package version.

Variables

View Source
var MaxInc int64 = 64

MaxInc will determine the maximum increment size when obfuscating data.

Functions

func DeobfuscateByteArray

func DeobfuscateByteArray(data []byte) []byte

DeobfuscateByteArray will return the unobfuscated []byte.

func DeobfuscateString

func DeobfuscateString(data []byte) string

DeobfuscateString will return the unobfuscated string.

func ObfuscateByteArray

func ObfuscateByteArray(bArr []byte) (out string, e error)

ObfuscateByteArray will generate go source to deobfuscate a []byte back into the original []byte.

func ObfuscateString

func ObfuscateString(str string) (out string, e error)

ObfuscateString will generate go source to deobfuscate a []byte back into the original string.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL