Sasami's Ragnarok World Forums
Register | Login | Logout | Edit profile | Avatars
Views: 410016
Main | Memberlist | Member pages | Online users
Ranks | Chat | New Chat | FAQ | Search | Photo album
03-29-24 03:19 PM
Sasami's Ragnarok World Forums (LOCKED) - Other External Programs Discussion - can the bot chrasher be exploited? |
Pages: 1 2Next newer thread | Next older thread
User
Post
Tillumni Sephirotica









Since: 03-25-02

Since last post: 7685 days
Last activity: 7685 days
Posted on 04-01-02 08:08 AMQuote | Edit | Delete
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: 7330 days
Last activity: 7330 days
Posted on 04-01-02 04:58 PMQuote | Edit | Delete
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: 7685 days
Last activity: 7685 days
Posted on 04-01-02 08:08 PMQuote | Edit | Delete
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: 7711 days
Last activity: 7464 days
Posted on 04-09-02 10:08 PMQuote | Edit | Delete
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: 7330 days
Last activity: 7330 days
Posted on 04-10-02 02:16 AMQuote | Edit | Delete
It will probably take a while.. gravity is a little... slow...
rjwebs









Since: 04-22-02
From: El Monte, CA

Since last post: 7974 days
Last activity: 8012 days
Posted on 04-22-02 09:41 AMQuote | Edit | Delete
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: 7958 days
Last activity: 7929 days
Posted on 04-22-02 10:12 PMQuote | Edit | Delete
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: 7974 days
Last activity: 8012 days
Posted on 04-22-02 10:15 PMQuote | Edit | Delete
Can't you let a guy dream a little.

--------------------
~RJ
Sig whats dat?
bumby









Since: 04-23-02

Since last post: 8000 days
Last activity: 8007 days
Posted on 04-23-02 01:07 AMQuote | Edit | Delete
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: 7330 days
Last activity: 7330 days
Posted on 04-23-02 04:36 AMQuote | Edit | Delete
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: 8000 days
Last activity: 8007 days
Posted on 04-23-02 11:01 AMQuote | Edit | Delete
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: 7330 days
Last activity: 7330 days
Posted on 04-23-02 01:27 PMQuote | Edit | Delete
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: 7965 days
Last activity: 7890 days
Posted on 04-23-02 01:44 PMQuote | Edit | Delete
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: 8000 days
Last activity: 8007 days
Posted on 04-24-02 12:22 AMQuote | Edit | Delete
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: 7330 days
Last activity: 7330 days
Posted on 04-24-02 12:59 AMQuote | Edit | Delete
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: 8000 days
Last activity: 8007 days
Posted on 04-24-02 01:10 AMQuote | Edit | Delete
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: 7443 days
Last activity: 7437 days
Posted on 04-24-02 03:09 AMQuote | Edit | Delete
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: 7330 days
Last activity: 7330 days
Posted on 04-24-02 03:58 AMQuote | Edit | Delete
Good Explanation
bumby









Since: 04-23-02

Since last post: 8000 days
Last activity: 8007 days
Posted on 04-24-02 12:17 PMQuote | Edit | Delete
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: 7443 days
Last activity: 7437 days
Posted on 04-24-02 11:38 PMQuote | Edit | Delete
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.
Pages: 1 2Next newer thread | Next older thread
Sasami's Ragnarok World Forums (LOCKED) - Other External Programs Discussion - can the bot chrasher be exploited? |
Edit/move/close/delete thread


Sasami's Ragnarok World

AcmlmBoard v1.7
© 2000-2001 Acmlm

Page rendered in 0.016 seconds.