fritzone / obfy

A tiny C++ obfuscation framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

enum int

opened this issue · comments

how to obfuscate enum int?

Example

typedef enum {
	LICENSE_OK = 0, 						//OK
	LICENSE_FILE_NOT_FOUND = 1, 		//license file not found
	LICENSE_SERVER_NOT_FOUND = 2, 		//license server can't be contacted
	ENVIRONMENT_VARIABLE_NOT_DEFINED = 3, //environment variable not defined
	FILE_FORMAT_NOT_RECOGNIZED = 4,	//license file has invalid format (not .ini file)
	LICENSE_MALFORMED = 5, //some mandatory field are missing, or data can't be fully read.
	PRODUCT_NOT_LICENSED = 6,		//this product was not licensed
	PRODUCT_EXPIRED = 7,
	LICENSE_CORRUPTED = 8,//License signature didn't match with current license
	IDENTIFIERS_MISMATCH = 9, //Calculated identifier and the one provided in license didn't match

	LICENSE_FILE_FOUND = 100,
	LICENSE_VERIFIED = 101

} EVENT_TYPE;

an enum declaration by itself does no generate code, and from the compilers' point of view they are just numbers: https://gcc.godbolt.org/z/suP236 so this is something unobfuscateable.

@fritzone needed refactoring enum?

No, that's pretty much good as it is.