Displaying 2 results from an estimated 2 matches for "randmon".
2004 Oct 10
1
[LLVMdev] Re: Hide visible string in variable
...e address of the GV, I can read the value and do XOR and then write it back. But for this case, I don't know how to do that. Maybe I am not familar with STL. I really need your help. Sorry again.
for C level,
char a[]="global string test";
for(i=0;i<strlen(a);i++){
a[i]= a[i]^RANDMON;
}
For llvm,
%a = internal global [20 x sbyte] c"global string test\0A\00"
Would you mind telling me how to do it.
Qiuyu
>
> > Is there a way to reorder the basic blocks?
>
> Yes, for an example pass that does this, take a look at
> lib/Transforms/Scalar/BasicBlo...
2004 Oct 12
1
[LLVMdev] Re: Hide visible string in variable (Chris Lattner)
Hi,
Thanks so much at first.
> Here are some observations:
>
> > for C level,
> >
> > char a[]="global string test";
> > for(i=0;i<strlen(a);i++){
> > a[i]= a[i]^RANDMON;
> > }
>
> If you compile this C code, "global string test" will occur in the program
> binary, so you have not obfuscated anything. You can construct exactly
> what you have above in LLVM (just write it as C, compile it to LLVM and
> you'll see what you need to...