Log in

View Full Version : Viewing variables in Ollydbg


annointed3
October 28th, 2004, 13:03
Hi,

I have a very simple program that I have loaded in olly. Below is source:

#include <iostream.h>
#include <stdlib.h>
#include <conio.h>
#include <stdio.h>

char *user32 = "user32";
char *shellcode ="&#92;x90";



int Funct1()
{
char var1[15];
cout <<&var1<<endl;
cout <<"________1234567890abcd"<<endl;
cout <<"Enter Var1:";
cin>>var1;
cout<<var1<<endl;
return 0;

}

int main()
{
Funct1();
getchar();
return 0;
}

The problem that I have is that I can not find the variables *user32 and *shellcode. I need to find these variables so I can locate their addresses. Please help?

sgdt
October 29th, 2004, 12:38
None of your code appears to be referencing "user32" or "shellcode", and thus they were probably optimized out. Place a reference and you should be able to find them quite easily.