|
Packet sniffing was actually my first thought however I don't have much experience with reverse engineering so that left me a little short. Each time you open the window it recieves encrypted packets containing the information I'm trying to get (in full as far as I can tell). So I would imagine somewhere between being recieved as packets and coming up on the screen it has to be decrypted and stored somewhere, most likely as you pointed out in array form, so that the list can easily be sorted. I really don't have much of an idea as to how i'd go about finding that array or gathering the data from it though.
Nope the cursor doesn't change.
Also you can highlight individual names in the list (but not multiple names) and if you click the Player Info button (or just double click on the list) it pops up a seperate small window with the information i'm trying to read (albeit on a player by player basis). If I can't read the list directly perhaps there's a way I could enumerate each item in the list and read this small window that pops up?
-- modified at 14:46 Friday 8th December, 2006
|
|
|
|
|
Bump. Still haven't figured this out. I know there must be a way to do it as I've found a few commercial applications that seem to have no trouble with it (and don't use OCR). Any other ideas?
|
|
|
|
|
Hello,
I got a file (.INI) and it's filled with a lot of hexa numbers:
00000000
00000000
FFFFFC24
00000000
00000000
FFFFFC2C
00000000
FFFFFC70
FFFFFC24
I must convert these strings hex to real hex number, obviously they must be unsigned.
I tried a lot of ways, and got only trash
each line must be a row in an array, for example "unsigned int myArray[200];"
this array must be filled with hexa from the string (INI File).
Cuold anyone help me??
Thanks
|
|
|
|
|
suguimoto wrote: I tried a lot of ways, and got only trash
Have you tried strtol( const char *nptr, char **endptr, int base ) ?
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
can you show us what you tried, maybe then we could help you to correct it.
|
|
|
|
|
I aprreciate your effort to help me
so here is the code:
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
FILE *fp;
fp = fopen("file.ini", "rt");
char str[32];
unsigned int mem[9];
char * endptr;
for(int i = 0; i<9; i++){
fgets(str, 32, fp);
mem[i] = strtol(str, &endptr, 16);
printf("%i\n\r", mem[i]);
}
system("PAUSE");
return 0;
}
I'm a newbie in c++ and this seems to be a little bit hard for me.
my result:
0
0
2147483647
0
0
2147483647
0
2147483647
2147483647
2147483647(dec) is equal to 7FFFFFFF(hex) =/
whats happening? hehehe
Regards
|
|
|
|
|
suguimoto wrote: 2147483647(dec) is equal to 7FFFFFFF(hex)
Yes
|
|
|
|
|
You are reading 32 characters from the file, is this correct? If so then declare your str array to hold 33 to allow for the null terminator. What is the value of endptr at the end of each loop?
|
|
|
|
|
suguimoto wrote: whats happening?
strtol() is returning LONG_MAX because of overflow.
0xFFFFFC24 is too big to fit in a signed long.
Try strtoul()
|
|
|
|
|
suguimoto wrote: mem[i] = strtol(str, &endptr, 16);
Why aren't you using strtoul() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I changed to strtoul... and get the same result =/
also increased the size from 32 to 33, still get the same thing.
very weird.
But I'm still trying
|
|
|
|
|
suguimoto wrote: I changed to strtoul... and get the same result =/
How are you confirming that strtoul() is failing?
suguimoto wrote: also increased the size from 32 to 33, still get the same thing.
Why would you expect that to make a difference, since there are no more than 10 characters per line?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
suguimoto wrote: printf("%i\n\r", mem[i]);
Since mem[i] is an unsigned int , you should be using "%u" instead.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks!!
It's working!
I used %x to display everything as Hex, and it's working perfectly.
Thank you guys very much!!!
code:
int main(int argc, char* argv[])
{
FILE *fp;
fp = fopen("mem.ini", "rt");
char str[32];
unsigned int mem[8192];
char * endptr;
int teste;
for(int i = 0; i<8192; i++){
fgets(str, 32, fp);
mem[i] = strtoul(str, &endptr, 16);
printf("%x\n\r", mem[i]);
}
system("PAUSE");
return 0;
}
|
|
|
|
|
suguimoto wrote: for(int i = 0; i<8192; i++){
What if there are only 5, or 8193, lines in the file? It's not wise to hard-code such numbers.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
its must be huge. because it's simulating a memory in a "rom" inside a virtual processor.
i needed a function "readmemh" from verilog, but it couldnt be translated to c++, so i did it manually. this mem is going to be read a lot of times and changed a lot of times.
I think 8192 is fixed, as it was in Verilog. So i'm just gonna leave it like that
Thanks!!
|
|
|
|
|
Hello,
how to convert an CString to char* when the project is UNICODE defined?
My try is:
<code>
CString csPath = L"C:\\FolderName";
const char* acPath = (LPSTR)(LPCTSTR)csPath;
</code>
and acPath have only the first character!
thanks
break;
|
|
|
|
|
char* is ANSI
wchar_t* is UNICODE
TCHAR* is one or the other ( depending if UNICODE is defined )
change your char* to either wchar_t* or TCHAR* and it should work fine.
I would advice you to start using TCHAR and the _t**() macros, this will really help you to eliminate these prolems in the future.
|
|
|
|
|
Hello,
thanks for reply, i try to solve it!
have nice weekend!
regards
break;
|
|
|
|
|
break; wrote: acPath have only the first character!
That's because a cast isn't magic, the compiler can't read your mind and know "oh I should convert from Unicode to MBCS here". It's just doing what you've told it to. You end up with a const char* , pointing at something that is not a char , so naturally you get the wrong result.
Use the T2CA macro (or CT2CA if your compiler supports it) to do the conversion.
|
|
|
|
|
break; wrote: const char* acPath = (LPSTR)(LPCTSTR)csPath;
What are you doing here? Neither of the casts are necessary. Since you have Unicode, use:
const wchar_t* acPath = csPath;
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
When i run my application in my system the application window is looking good.But when i run my application in another system which has monitor size less than my system,scroll bar's are added both vertically and horizontally to the application window which is not looking good . Is there any way to restict the frame size auomatically during runtime so that no slide bars are added to it based on the environment in which we run.
|
|
|
|
|
When you create the main window, are the width and height parameters hard coded? If you used the resource editor the answer is probably yes. Use the function GetSystemMetrics() to find the screen size, and resize the window with SetWindowPos()
|
|
|
|
|
In SDK plateform,
How can i import a resource(say Dialog box)from a dll project to an exe project.
the aim should be not to hav the resource inside exe project, it will be included in dll project...
-- modified at 1:20 Monday 11th December, 2006
|
|
|
|
|
Can you be a little more clear about what you intend to do.
The easiest way would be to copy the resource into both projects. If the resource really is a DialogBox, then the size is not really an issue.
If you want to have a single resource and use it in both the exe and dll projects, then create a resource only dll ( a dll which contains no code and only resources ). Both projects can then load this dll and have access to the same resources.
|
|
|
|