User | Post |
Tillumni Sephirotica
Since: 03-25-02
Since last post: 7922 days Last activity: 7922 days
|
|
the anti bot system, that you're working on, does so that the, as far as I understand, bot users character game chrash right? well I think that you should keep the program as far away from the puplic eyes as possible to prevent other programmers to get inspired to make a program that can chrash regulare user. if it's possible. no programming skill in side my head.
heh, you'll be like a mysterius superhero in game, striking down the bots with out anybody really knowing what's happening, spreading tawern tales all over the community. now if I could just come up with a fitting superhero name.
-------------------- Elmikie, Spell artist, Path of Pearl, Stratika, keeper of guild lore and current leader of the Vezrejai mage guild.
|
Sasami
Goddess in Training
Since: 02-18-02 From: Back in texas! YAY! college sucked! Rating: 10 (1030 pts)
Since last post: 7567 days Last activity: 7567 days
|
|
I will release it publically, no source, like how I do all my programs. Provided i can get it to work with the new versions that is. |
Tillumni Sephirotica
Since: 03-25-02
Since last post: 7922 days Last activity: 7922 days
|
|
few.. nice to know that, sorry for implying that you would forget something that important.
-------------------- Elmikie, Spell artist, Path of Pearl, Stratika, keeper of guild lore and current leader of the Vezrejai mage guild.
|
Quanta
Since: 04-09-02 From: Somewhere
Since last post: 7949 days Last activity: 7701 days
|
|
Why bother releasing it? Have Gravity include it in the next patch.
--------------------
(edited by Quanta on 04-19-02 04:49 AM) |
Sasami
Goddess in Training
Since: 02-18-02 From: Back in texas! YAY! college sucked! Rating: 10 (1030 pts)
Since last post: 7567 days Last activity: 7567 days
|
|
It will probably take a while.. gravity is a little... slow... |
rjwebs
Since: 04-22-02 From: El Monte, CA
Since last post: 8211 days Last activity: 8249 days
|
|
Yeah it would be great to see those bots go bye bye. I could remidy the prob if pk was on.
-------------------- ~RJ
Sig whats dat? |
Leiser Kind
Since: 04-22-02
Since last post: 8196 days Last activity: 8166 days
|
|
Originally posted by rjwebs Yeah it would be great to see those bots go bye bye. I could remidy the prob if pk was on.
Odds are PK will be a by choice option. I can't think of any game that forces players to be PK in all situations. I know bot users would be smart enough to not be PK or stay out of designated PK areas.
-------------------- Born once, to die twice... |
rjwebs
Since: 04-22-02 From: El Monte, CA
Since last post: 8211 days Last activity: 8249 days
|
|
Can't you let a guy dream a little.
-------------------- ~RJ
Sig whats dat? |
bumby
Since: 04-23-02
Since last post: 8237 days Last activity: 8245 days
|
|
darn, stupid SkipStone crashed, now I have to rewrite everything.. oohwell, here I go again:
I'v looked at the bot code (the one written in vb by hm, what was his/her name, antforz?). As I'm a c programmer I dont understand a single byte of how vb handles variables. I mean, Dim str as String
?? a string? how many bytes are that? is it a linked list or what?
To the point, as the topic says, can the bot cracher be exploited?
You (Sasami) was talking about a buffer overflow (on roworld forum I think, long time ago). If that is the
case it is most likely that it can be exploited to run arbitrary code on the bot host.
For instance flashing up a messagebox with some nice text like
"You have been disconnected from the server because of bot using.
Any futher atempts may result in a ban or a account deletion"
Just to scare the shit out of those bot users
-------------------- \x90\x90\x90/bin/sh |
Sasami
Goddess in Training
Since: 02-18-02 From: Back in texas! YAY! college sucked! Rating: 10 (1030 pts)
Since last post: 7567 days Last activity: 7567 days
|
|
A linked list O.o why would a string be a linked list -.- it's just like the string class in c. It's basically a char with a null (0) at the end of the string telling the programs that's the end. everything in vb is handled the same as in c basically, byte =1 byte, int=2 bytes, long (long int) = 4 bytes, they are assigned an address and then when you write to the value, VB looks up the memory address and changes it accordingly. |
bumby
Since: 04-23-02
Since last post: 8237 days Last activity: 8245 days
|
|
There are no string class in ansi c mfc has a string class though, but I only code ansi c, so I havent looked at it. Here is how you declare a "string" in c
char foo[const integer];
or you could do
char *foo;
foo = malloc(integer);
In both cases you have to tell the compiler how many bytes of memory you want to reserve.
That's whats confusing me with vbs String. How many bytes does it reserve? I can't see
how you can couse a buffer overflow if the buffer size is dynamic. A normal buffer overflow in
c is
char buf[4];
char foo[8];
strcpy(buf, foo);
that would overflow buf with 4 bytes.
-------------------- \x90\x90\x90/bin/sh |
Sasami
Goddess in Training
Since: 02-18-02 From: Back in texas! YAY! college sucked! Rating: 10 (1030 pts)
Since last post: 7567 days Last activity: 7567 days
|
|
you can just do
char charname[];
charname[] = "Bla";
and it would put "Bla0" in the memory where 0 is chr$(0), null, which tells the computer that is the end of the string, you don't have to declare sizes.
you can however declare sizes of strings in vb like
dim stringname as string * size
but there rarely is a point to doing that, it might save a gyte of memory...
microsoft visual c comes with a string.h i think which does string stuff for you... OOP wise. |
Noiboi
Since: 04-17-02 From: uk
Since last post: 8203 days Last activity: 8128 days
|
|
bumby, use c++ man, its much better for handling strings and alot of other stuff.
I wouldn't mind seeing some of this bot source code, its been a while since I used VB though, I much prefere c++ |
bumby
Since: 04-23-02
Since last post: 8237 days Last activity: 8245 days
|
|
char charname[]; is not valid c
that would give something in style with "array size missing in charname" and parse error.
neither is charname[] = "bla"; valid. you cannot copy arrays of data with =, for that you use
memcpy, or strcpy.
though.
char *charname;
charname malloc(4);
strcpy(charname, "Bla");
would be the equvilent to that.
or if it's a constant, as in that case,
char charname[]="Bla\0";
Let's say for instance, you use GetWindowTextA to get the text from a Text class in windows.
I recall it's something like
long GetWindowTextA(long hwnd, char* buf);
now, in vb I guess you see that char* buf as a String. so you just do
GetWindowTextA(myhwnd, mystr);
text1.text = "the textbox contains:" + mystr;
What I cannot understand is how big is that mystr? You cant just press data into your memory however you want, can you. That would cause allot of overflows all the time. That's why you have
to allocate space before you use it. So, how/when/where/etc doest that String class allocate
memory? when calling the GetWindowTextA its already too late, couse the GetWindowTextA
function does something like memcpy(buf, windowtext);
I mean, the GetWindowTextLengthA function doesnt exict for nothing
char *mystr;
mystr=malloc( GetWindowTextLengthA(myhwnd) );
GetWindowTextA(myhwnd,mystr);
Oowhell, I guess it's just me being stupid **
----
Noiboi> bumby, use c++ man, its much better for handling strings and alot of other stuff.
I'll stick to C. I dont like object oriented languages and I want to know what I'm doing on
every single line of my code. Using premade string classes and such wouldn't be me ^_~
-------------------- \x90\x90\x90/bin/sh |
Sasami
Goddess in Training
Since: 02-18-02 From: Back in texas! YAY! college sucked! Rating: 10 (1030 pts)
Since last post: 7567 days Last activity: 7567 days
|
|
you don't need to allocate memory if it is pushed onto the stack
but seriously, memory is allocated every time the string is changed to make sure there is enough, i think thats how it works. That char[] thing works in visual c.
(edited by Sasami on 04-23-02 08:00 PM) |
bumby
Since: 04-23-02
Since last post: 8237 days Last activity: 8245 days
|
|
I though that the stack only hold pointers(?). But as you know, I don't know much asm yet
lol, I still dont get it. how could the string now that it is going to be changed? it's not like memcpy sends a warning to the string class first, is it?
But lets just punt this here, we are getting way out of topic, and getting nowhere on the off topic topic, lol. I guess I'll have to rtfm on vb
visual c, or visual c++? it shoulndt work in neither of them, but micrsoft seems to have this bad habit of not following standards ^_~
-------------------- \x90\x90\x90/bin/sh |
Arsenic
Since: 04-12-02 From: Qc, Can
Since last post: 7680 days Last activity: 7674 days
|
|
bumby:
It's like the string class in C++ from the STL (Standard Library). You only know Ansi C, that's why you don't know how class works and how they are handled in C++. This string class comes from the string standard library:
#include
using namespace std;
The class constructors and member functions handle the whole character array for you. Meaning the size is all dynamic, and changes when needed. You can initialize the string either by passing arguments to the constructor(s), or let the default values set by it:
string Player1( "Joe" );
string Player2 = "Mr. T";
string Player3( 10, 'z' ); //10 'z'
I think you can also pass a specific size to the constructor if you want along with the const char*. The string class is very powerful, the size will change from your affectations whenever, for instance you could do this at a later time:
Player1 = "Arsenic";
You can also directly compare a string class variable without using the good old strcmp function:
if ( Player1 == "Arsenic" )
...
if ( Player2 < "Marc" )
...
It's also possible to concatenate your string using the operators += etc. etc.
Anyway, that's about how it works basically.
I don't code in VB neither, but I believe that's what the VB string type is all about.
Oh and by the way, not only pointers are pushed onto the stack (That doesn't make sense anyway). For instance, the local variables of a function are all stored on the stack.
And Visual C doesn't exist, there's just Visual C++.
(edited by Arsenic on 04-23-02 10:11 PM)
(edited by Arsenic on 04-23-02 10:13 PM) |
Sasami
Goddess in Training
Since: 02-18-02 From: Back in texas! YAY! college sucked! Rating: 10 (1030 pts)
Since last post: 7567 days Last activity: 7567 days
|
|
Good Explanation |
bumby
Since: 04-23-02
Since last post: 8237 days Last activity: 8245 days
|
|
Ok. The only thing I don't understand now is how a string class can be handled as a char array.
Couse it seems that you can pass a string to eg. GetWindowTextA.
But as you say Arsenic, I only know C and don't know how class works and how they are handled in C++. Though, I thought a class was a class and a char array was a char array.
-------------------- \x90\x90\x90/bin/sh |
Arsenic
Since: 04-12-02 From: Qc, Can
Since last post: 7680 days Last activity: 7674 days
|
|
A class is an object in C++, it's all about OOP. It doesn't only contain variables but also functions, including constuctor(s) and destructor, and class members can be public, private and protected. You'd need to read a bit of C++ to get a full idea of it it really works.
Basically, it's a struct with functions in it...
Either way, you can make whatever you want with classes, and it includes making your own character array type.
Now, you've got to be cautious when using the Windows APIs because some functions might not accept all variable type, you might need to use some cast operators to convert into char*, or LPSTR (which is the same by the way), if you intend to pass a string class variable for instance.
Remember that the Win16/32 APIs were coded a while ago, all in C because C++ hadn't yet came into general use. |