Best way to hide strings on an .exe

Just starting out? Need help? Post your questions and find answers here.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Best way to hide strings on an .exe

Post by ricardo »

Thanks to everybody for your help :)
ARGENTINA WORLD CHAMPION
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Best way to hide strings on an .exe

Post by ricardo »

This still works to hide strings, right?
Is there any way that people can see the string using any of this ways? Which one is better of this 3 methods?

Im not talking about the NASA or the FBI, just a user or a normal hacker.

Code: Select all

String$ = Chr('R'+abs) + Chr('i'+abs) + Chr('c'+abs) + Chr('a'+abs) + Chr('r'+abs) + Chr('d'+abs) + Chr('o'+abs)
Debug String$

abc = 2
String$ = Chr(80+abc) + Chr(103+abc) + Chr(97+abc) + Chr(95+abc) + Chr(112+abc) + Chr(98+abc) + Chr(109+abc)
Debug String$

abc = 2
String$ = Chr(80+abc+aq) + Chr(103+abc+aq) + Chr(97+abc+aq) + Chr(95+abc+aq) + Chr(112+abc+aq) + Chr(98+abc+aq) + Chr(109+abc+aq)
Debug String$
ARGENTINA WORLD CHAMPION
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Best way to hide strings on an .exe

Post by PB »

I use this to hide strings from being viewed:

Code: Select all

a$=Chr('h'+_)+Chr('i'+_)
Doesn't show up in a hex editor or OllyDbg.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Best way to hide strings on an .exe

Post by ricardo »

PB wrote:I use this to hide strings from being viewed:

Code: Select all

a$=Chr('h'+_)+Chr('i'+_)
Doesn't show up in a hex editor or OllyDbg.
Is different to use _ that any other string name? I ask to understand and learn

Code: Select all

a$=Chr('h'+_)+Chr('i'+_)
a$=Chr('h'+asdfgh)+Chr('i'+asdfgh)
a$=Chr('h'+qwerty)+Chr('i'+asd)
Are the same the 3 lines?
ARGENTINA WORLD CHAMPION
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Best way to hide strings on an .exe

Post by PB »

The _ is just an unused variable name. :)

So yes, all three lines you posted work the same,
as long as the variables "qwerty" etc are set to 0.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Re: Best way to hide strings on an .exe

Post by ricardo »

PB wrote:The _ is just an unused variable name. :)

So yes, all three lines you posted work the same,
as long as the variables "qwerty" etc are set to 0.

Thanks for your reply.

Yes variables must be cero, unless i previously put the value of the chr -2 to be able to put the variable as 2, per example. But maybe all is the same, right?

Code: Select all

abc = 2
String$ = Chr(80+abc) + Chr(103+abc) + Chr(97+abc) + Chr(95+abc) + Chr(112+abc) + Chr(98+abc) + Chr(109+abc)
Debug String$
ARGENTINA WORLD CHAMPION
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Best way to hide strings on an .exe

Post by PB »

I don't know what happens if the vars aren't 0. Test it. :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply