Hi!
Following a previous post I managed to create a code to encrypt Tcl code into C; now the problem is to decrypt it to be "Evaled"
The tcl code is stored as follows:
static char tcl_script[] =
"«šíðéåøäíŠüã\n"
"«šÌíåçæûüúéüíûšÜëä§ÜãšéæìšËšáæüíúéëüáçæšÿàáäíšìçáæïšûçåíüàáæïšýûíîýä©\n"
"«šÇúáïáæéääñšÿúáüüíæšíæüáúíäñšáæšÜëä§ÜãšêýüšéììíìšËšëéääûšéûšéšìíåçŠ\n"
"\n"
"«šºžšÎíêš¹±±œš¥šÚŠšÀéïíæšúàéïíæÈéÿá¥êúíåíúàéþíæŠìí\n"
"«š¹ŒšÉøúá䚺žž»šÎšËçýüíäšîëçýüíäÈäïëŠëçåšåçìáîáíìš\n"
"\n"
"«š¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥\n"
"«šÉšûáåøäíšìíëáåéäšìíïúííšüçšìíï€åáæ€ûíëšëçæþíúüíú\n"
...
Now in the code I have tried
char *t = tcl_script;
int xor 14;
while (*t) {
while (*t != '\n') {
/* decrypt*/
if ( *t>=0x20 ){ *t ^= xor; xor = (xor+1)&0x1f; }
}
t++;
}
This is causing a segmentation fault. why?
Thanks!
Following a previous post I managed to create a code to encrypt Tcl code into C; now the problem is to decrypt it to be "Evaled"
The tcl code is stored as follows:
static char tcl_script[] =
"«šíðéåøäíŠüã\n"
"«šÌíåçæûüúéüíûšÜëä§ÜãšéæìšËšáæüíúéëüáçæšÿàáäíšìçáæïšûçåíüàáæïšýûíîýä©\n"
"«šÇúáïáæéääñšÿúáüüíæšíæüáúíäñšáæšÜëä§ÜãšêýüšéììíìšËšëéääûšéûšéšìíåçŠ\n"
"\n"
"«šºžšÎíêš¹±±œš¥šÚŠšÀéïíæšúàéïíæÈéÿá¥êúíåíúàéþíæŠìí\n"
"«š¹ŒšÉøúá䚺žž»šÎšËçýüíäšîëçýüíäÈäïëŠëçåšåçìáîáíìš\n"
"\n"
"«š¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥\n"
"«šÉšûáåøäíšìíëáåéäšìíïúííšüçšìíï€åáæ€ûíëšëçæþíúüíú\n"
...
Now in the code I have tried
char *t = tcl_script;
int xor 14;
while (*t) {
while (*t != '\n') {
/* decrypt*/
if ( *t>=0x20 ){ *t ^= xor; xor = (xor+1)&0x1f; }
}
t++;
}
This is causing a segmentation fault. why?
Thanks!