Mirage Source

Free ORPG making software.
It is currently Thu Mar 28, 2024 11:52 pm

All times are UTC




Post new topic Reply to topic  [ 1711 posts ]  Go to page 1, 2, 3, 4, 5 ... 69  Next
Author Message
PostPosted: Thu Apr 16, 2009 5:24 am 
Offline
Newbie

Joined: Sat Jan 06, 2007 4:54 am
Posts: 11
I'm looking for a hard drive serial banning system. I know there's one on the old mirage forum backup but I've never been able to get it to work and eh... to be blunt, I'm a bit lost as to how to go about doing it. If someone can throw together a tutorial on a good banning system I'd greatly appreciate it. Thanks in advance.


Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 8:33 am 
Offline
Knowledgeable

Joined: Thu Nov 22, 2007 2:59 pm
Posts: 143
Location: London, England
Google Talk: aeronjl+mirage@googlemail.com
Have a go at doing it, post errors when you get them.

I think that needs to be displayed in massive letters at the top of the forum..


Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 9:11 am 
Offline
Persistant Poster
User avatar

Joined: Thu Aug 17, 2006 5:27 pm
Posts: 866
Location: United Kingdom
Client side - event procedure used to get HD id upon client start-up
Client side - packet to send HD id upon connection to the server
Client side - packet handler to deal with HD id accepted / rejected

Server side - packet handler to associate HD id with playerindex
Server side - addition to connection accepted event procedure calling a HD id check
Server side - event procedure to read banned HD ids to file
Server side - event procedure to write banned HD ids to file
Server side - event procedure to write HD id to banned HD id list and kick and ban the player account from the server

Break a problem down, individually those are easy - google is your friend. Put some methods together, give it a go, research.

Also, if you are unsure what a Method / Event Procedure / Packet Handler is I would suggest googling them, it'll take you all of five seconds :)


Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 5:49 pm 
Offline
Newbie

Joined: Sat Jan 06, 2007 4:54 am
Posts: 11
The problem I have and the problem I've been having is getting the server to receive the HD serial info. I can't figure out why *scratches head*. x_X


Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 6:16 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Aug 17, 2006 5:27 pm
Posts: 866
Location: United Kingdom
What code do you currently have?


Top
 Profile  
 
PostPosted: Thu Apr 16, 2009 7:27 pm 
Offline
Pro

Joined: Mon May 29, 2006 5:01 pm
Posts: 420
Location: Canada, BC
Google Talk: anthony.fleck@gmail.com
Something people sometimes miss is making sure you have added the packet name to the enumeration. As well as adding it to the handling area (not sure of official name) in the HandleData sub.


Top
 Profile  
 
PostPosted: Sun Apr 19, 2009 7:38 pm 
Offline
Newbie

Joined: Sat Jan 06, 2007 4:54 am
Posts: 11
Sorry for the delay in my response. I've been rather busy with real life issues (moving to another state, etc). The code I'm using for obtaining HD serial information is...

Code:
Public Function GetHDSerial(Optional ByVal DriveLetter As String) As Long
    Dim fso As Object, Drv As Object, DriveSerial As Long
   
    'Create a FileSystemObject object
    Set fso = CreateObject("Scripting.FileSystemObject")
   
    'Assign the current drive letter if not specified
    If DriveLetter <> "" Then
        Set Drv = fso.GetDrive(DriveLetter)
    Else
        Set Drv = fso.GetDrive(fso.GetDriveName(App.Path))
    End If

    With Drv
        If .IsReady Then
              DriveSerial = Abs(.SerialNumber)
        Else    '"Drive Not Ready!"
              DriveSerial = -1
        End If
    End With
   
    'Clean up
    Set Drv = Nothing
    Set fso = Nothing
   
    GetHDSerial = DriveSerial
End Function


That's the client side function I'm using to obtain the HD serial info. I'm also having it call that function when the player sends the login request (clicks login). Then I'm having it fire that information to the server like so in the Sub SendLogin

Code:
Sub SendLogin(ByVal Name As String, ByVal Password As String)
Dim Packet As String

    Packet = LOGINATION_CHAR & SEP_CHAR & Trim$(Name) & SEP_CHAR & Trim$(Password) & SEP_CHAR & CLIENT_MAJOR & SEP_CHAR & CLIENT_MINOR & SEP_CHAR & CLIENT_REVISION & SEP_CHAR & SEC_CODE & END_CHAR
    Call SendData("HDSerial" & SEP_CHAR & GetHDSerial("C") &  END_CHAR)
    Call SendData(Packet)
End Sub


That's similar, if not exactly how the banning system in the old forums was. I was thinking it'd be best to have the client send the hd serial information in its own separate packet but I'm unsure how to write it (I'm not the MOST proficient in Visual Basic just yet). I've taken several shots at it but I'm kinda like "blegh" confused. Anyways... I have the server side stuff defined as it should be, I just don't know what I should put so the server can translate the "hdserial" packet.

(Sorry if this was a lot of rambling... I haven't had much sleep lately >_>).


Top
 Profile  
 
PostPosted: Fri Apr 24, 2009 7:15 am 
Offline
Newbie

Joined: Sat Jan 06, 2007 4:54 am
Posts: 11
So my array server side is as follows...

Code:
Type BanRec
    BannedIP As String
    BannedChar As String
    BannedBy As String
    BannedHD As String
End Type


I'm getting RTE 9 in the following lines (bolded is what's highlighted and bold italic is what's out of range)


Code:
Function IsBanned(ByVal IP As String) As Boolean

Dim FileName As String, fIP As String, fName As String
Dim f As Long
Dim b As Integer
Dim bIp As String
Dim I As Integer

    IsBanned = False
   
    FileName = App.Path & "\banlist.ini"
   
    For I = 0 To MAX_BANS
        [b]If Ban(I).[i]BannedIP[/i] <> "" Then[/b]
              bIp = Ban(I).BannedIP
              If IP = bIp Then
                  IsBanned = True
                  Exit Function
              Else
                  IsBanned = False
              End If
        End If
    Next I

End Function

Code:
Function IsBannedHD(ByVal HD As String) As Boolean

Dim FileName As String
Dim bHD As String
Dim I As Integer

    IsBannedHD = False
   
    FileName = App.Path & "\banlist.ini"
   
    For I = 0 To MAX_BANS
        [b]If Ban(I).[i]BannedHD[/i] <> "" Then[/b]
              bHD = Ban(I).BannedHD
              If HD = bHD Then
                  IsBannedHD = True
                  Exit Function
              Else
                  IsBannedHD = False
              End If
        End If
    Next I
   
End Function


Aaaannnny clues?


Top
 Profile  
 
PostPosted: Fri Apr 24, 2009 10:26 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
Public Ban(1 To ?) As BanRec

??

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Fri Apr 24, 2009 11:38 pm 
Offline
Newbie

Joined: Sat Jan 06, 2007 4:54 am
Posts: 11
Ahhh good catch but naw... still RTE 9 *scratches head*

::EDIT::
Ooookay... so I feel like a complete idiot. I had it defined as 1 To MAX_BANS As BanRec.. and throughout my subs it was I = 0 To MAX_BANS. Ahhh the newbish mistakes I make. Thanks everyone for helping. If I run into any more issues then I'll be back.


Top
 Profile  
 
PostPosted: Fri May 08, 2009 8:18 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Apr 13, 2008 12:02 am
Posts: 128
Using a Hard Drive Based banning system would be pritty nice due to the fact that using IP Bans these days just fail, Ip Mask, dial up and many many more ways of not geting banned, nice thinking. Blizzard i think are starting to use Hardware bans instead of IP or Email banks. They may of already done it, nice thinking though.

_________________
Image


Top
 Profile  
 
PostPosted: Fri May 08, 2009 8:45 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Jack wrote:
Using a Hard Drive Based banning system would be pritty nice due to the fact that using IP Bans these days just fail, Ip Mask, dial up and many many more ways of not geting banned, nice thinking. Blizzard i think are starting to use Hardware bans instead of IP or Email banks. They may of already done it, nice thinking though.


Everyone and their dog has a different IP whenever they reset their router, now-a-days.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
PostPosted: Fri May 08, 2009 8:49 pm 
Offline
Knowledgeable
User avatar

Joined: Sun Apr 13, 2008 12:02 am
Posts: 128
Ye i know , its very anoyying how you ban someone then there back on within 5minutes doing the same old crap. Hurry and work on that Hardware ban :D

_________________
Image


Top
 Profile  
 
PostPosted: Thu May 14, 2009 2:13 am 
Offline
Knowledgeable
User avatar

Joined: Sun Dec 14, 2008 4:28 am
Posts: 106
Location: Roanoke, VA, US
couldnt we also add a registry key ban? like it randomly gives you a registry key the first time you start the client on your computer (key assigned by the server) and also ban that way? or just have a registry key that ells if that computer is banned so the client wont start up? we could also find someway to embed a key somewhere in the registry that isnt exactly where a hacker would expect it, so they wouldnt know what key to delete. basically its a dont hack or keep reformatting everytime you get banned (also ban the account) and then also have the HD Serial Ban to back yourself up? i mean all these security measures arent exactly fool proof. if people find out how we are banning them and they find out that the ban coding is publish publicly i imagine someone will be able to break the ban anyway. would they not?


edit: working on the registry key banning system (currently it only supports ms4 mysql)

_________________
:d


Top
 Profile  
 
PostPosted: Wed May 20, 2009 12:29 am 
Offline
Banned
User avatar

Joined: Mon Jun 05, 2006 9:22 pm
Posts: 394
Location: USA
This is a decent idea, but some people I know, including myself, are alerted when a registry change is added. The people who wish to evade bans would look there and remove it, though you could add a search for the registry key at the startup? Only issue would be if you tried to login from a different PC and that random regkey was gone, you may not be able to play?


Top
 Profile  
 
PostPosted: Wed May 20, 2009 1:00 am 
Offline
Regular

Joined: Sun Apr 26, 2009 11:22 pm
Posts: 43
Location: Cincinnati, OH
Google Talk: rj.cox101@gmail.com
Is a fullproof hardware ban really even possible? I don't think so... You're always going to be sending somthing over the net inorder to ban, and whatever you send can be changed. The random registry key thing works but not being able to play on other computers makes it not worth it.

The only 'fullproof' ban I can think of is somehow detecting if a players ip is a proxy, and even that has its problems (dynamic ip's). You can make it more difficult by making players register email addresses, or using some hardware method... It'll always be breakable though.


Top
 Profile  
 
PostPosted: Wed May 20, 2009 2:55 am 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
HD Banning is just waaaaaaaaaaaay too much!
Imagine players playing you game at a LanHouse...

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
PostPosted: Wed May 20, 2009 4:35 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
Seriously. Banning someone is to teach them not to cheat again, letting them have another start. I don't remember any game that banned you from the game period.

_________________
Image


Top
 Profile  
 
PostPosted: Wed May 20, 2009 5:27 am 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
if someone is interested in hard drive banning and is good at coding contact me.
if you are not good at coding don't contact me.
i have a surprise for who ever does message me.

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
PostPosted: Wed May 20, 2009 5:31 am 
Offline
Persistant Poster
User avatar

Joined: Wed Nov 29, 2006 11:25 pm
Posts: 860
Location: Ayer
Doomy wrote:
if someone is interested in hard drive banning and is good at coding contact me.
if you are not good at coding don't contact me.
i have a surprise for who ever does message me.


That sounds ridiculous, Doomy.

_________________
Image


Top
 Profile  
 
PostPosted: Wed May 20, 2009 9:40 am 
Offline
Persistant Poster
User avatar

Joined: Thu Aug 17, 2006 5:27 pm
Posts: 866
Location: United Kingdom
unknown wrote:
Is a fullproof hardware ban really even possible? I don't think so... You're always going to be sending somthing over the net inorder to ban, and whatever you send can be changed. The random registry key thing works but not being able to play on other computers makes it not worth it.

The only 'fullproof' ban I can think of is somehow detecting if a players ip is a proxy, and even that has its problems (dynamic ip's). You can make it more difficult by making players register email addresses, or using some hardware method... It'll always be breakable though.


Our software here at work uses a unique hardware key to determine who can use the app. I believe it takes several keys from the hardware, jumbles them up a bit and uses the end result as a unique 'hardware ID'... seems to work.

Someone would have to replace their hard drive / processor / mob to re-connect in that case. That plus a 24 hour IP ban and permanent account banishment in one neat package would be a good way of getting people to stay away. When they get back on (because they will if they really want too, everyone does), hit them again. They'll soon get the message.


Top
 Profile  
 
PostPosted: Wed May 20, 2009 12:34 pm 
Offline
Regular

Joined: Sun Apr 26, 2009 11:22 pm
Posts: 43
Location: Cincinnati, OH
Google Talk: rj.cox101@gmail.com
Microsoft uses one to, in order to detect if you can activate windows on your computer or not.. That doesn't mean it's fullproof


Top
 Profile  
 
PostPosted: Wed May 20, 2009 12:45 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Aug 17, 2006 5:27 pm
Posts: 866
Location: United Kingdom
unknown wrote:
Microsoft uses one to, in order to detect if you can activate windows on your computer or not.. That doesn't mean it's fullproof


I never said it would be fullproof.


Top
 Profile  
 
PostPosted: Wed May 20, 2009 6:55 pm 
Offline
Persistant Poster
User avatar

Joined: Fri Aug 15, 2008 3:11 pm
Posts: 633
Tony wrote:
Doomy wrote:
if someone is interested in hard drive banning and is good at coding contact me.
if you are not good at coding don't contact me.
i have a surprise for who ever does message me.


That sounds ridiculous, Doomy.


>.>
i kinda have it already
thats why i said for someone good to message me. Mine is for the old ms.
i said for someone good at coding to message me to see if they wanted to make it compatible with newest ms.

_________________
╔╗╔═╦═╦══╦═══╗
║║║║║║║╔╗║╔═╗║
║║║║║║║╚╝║║║║║
║╚╣║║║║╔╗║╚═╝║
╚═╩╩═╩╩╝╚╩═══╝


╔╦═╦╦════╦═══╗
║║║║╠═╗╔═╣╔══╝
║║║║║║║║╚═╗
║║║║║║║║╔═╝
╚═╩═╝╚╝╚╝ ?


Top
 Profile  
 
PostPosted: Wed May 20, 2009 8:14 pm 
Offline
Regular

Joined: Sun Apr 26, 2009 11:22 pm
Posts: 43
Location: Cincinnati, OH
Google Talk: rj.cox101@gmail.com
Fox wrote:
unknown wrote:
Microsoft uses one to, in order to detect if you can activate windows on your computer or not.. That doesn't mean it's fullproof


I never said it would be fullproof.


My bad :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1711 posts ]  Go to page 1, 2, 3, 4, 5 ... 69  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group