[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hiding Test



Hi all and thx for the help

The prog is for security issue and supposed to print out a password so
the encription is not relevant.

But i didnt want a hacker to scan my files for the abvious password.

So the Matan Ninio and all the same answers has gave me the Exact
information.

Thx

Matan Ninio wrote:

> Hi miki.
>
> You shuld use some for of incription on the text.  the simplest would
> be to use bitwise xor with a key (you can use a one char key, if you
> want, or a longer key if you think that the anione with a minimal
> knolewge in incription may try to change it.
>
> try this:
> /***
>    NAME
>      hw
>    PURPOSE
>
> print a messsge without the messge beeing in the text.
> to use, replace the messge with the one that you want, compile, run
> and use the output as the new messge
>    NOTES
>      truly simple, can be cracked easely.
>    HISTORY
>      ninio - Oct 28, 1998: Created.
> ***/
> #include <stdio.h>
> int main (int argc, char **argv)
> {
>   int i,len;
>   char st[12]="cNGGD|DYGO\0";
>   char key='+';
>
>   len = strlen(st);
>   for (i=0;i<len;i++)
>     st[i] ^= key;
>   printf("%s\n",st);
>   exit (0);
> }
>
> MN

--
--------------------------
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-6-6925757
Fax: 972-6-6925858
http://www.canaan.co.il
--------------------------