Jedan moj drug iz Rusije treba pomoc u C++ pa mi se obratio, a ja bas i ne radim u C++ ...
Evo sta mi je poslao, ako mozete probajte da skrpite iz ovog nesto..ja blage veze nemam, ali razumem za ovo sto je rekao sa MsgBoxom i razumem to da mu ne odgovara sintaksa tog sto je pisao u VC++ , prevarant mali..
i have an _asm macros that is used in Borland C++ program. i need to change it's syntax to compile it with C++. it is just a one little .cpp file with a short asm macros above Main()
so. there is Main function. above it is an assembler macros, that is called from Main function. This macros purpose is to encrypt a compiled Visual C++ .exe file. I mean when you will compile this .cpp to .exe and will open it in any editor (HEX) you will not see string "*.exe" . it will be encrypted! and will be decrypted and displayed when you'll run it.
so it is a code for Borland C++. I'm trying to port it to Visual C++ but have some (syntax?) errors
this shit is to encrypt string in your file while it is compiling
for example, listen. you have a program that displays MsgBox "Copyright (c) 2004 Strorm". OK?
you compile it..
and you have exe-file
now, i can open this exe file, find string "copyright" and change it to "copyright (c) Roman"
using this macros will encrypt a string and it will be strored in file encrypted
Evo i koda :
Code:
#include <stdio.h>
#include <stdlib.h>
#define STOSD_STR(outvar, instr) \
{ \
asm \
{ \
lea edi, outvar ; \
irpc c, <instr> ; \
mov al, '&c' ; \
stosb ; \
endm ; \
xor eax, eax ; \
stosb ; \
} \
}
void main()
{
char mask[260];
STOSD_STR(mask, "*.exe");
printf("mask=%s\n", mask);
}
#include <stdio.h>
#include <stdlib.h>
#define STOSD_STR(outvar, instr) \
{ \
asm \
{ \
lea edi, outvar ; \
irpc c, <instr> ; \
mov al, '&c' ; \
stosb ; \
endm ; \
xor eax, eax ; \
stosb ; \
} \
}
void main()
{
char mask[260];
STOSD_STR(mask, "*.exe");
printf("mask=%s\n", mask);
}
Hvala unapred