Hack Forums
[.NET] [TuT][Webbased] IPban System - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [TuT][Webbased] IPban System (/showthread.php?tid=368771)

Pages: Pages 1 2


[TuT][Webbased] IPban System - The-One - Apr 15, 2010

Hello,

What do we need?
  • Webhost
  • VB. Program

Make a new .txt file. Name is IPs(must be .txt)
Put in the IP for the people(s) you don't want you to use your program.

'NOTE, Use my other thread To get the user's IP

Code
Public Sub BanCheck()
        Dim wc As New WebClient
        Dim MyIP As String
        Dim BannedIps As String
        MyIP = IP '  Used from my YourIP code, look in my other thread
        BannedIps = wc.DownloadString("www.yourwebhost.com/IP.txt").ToString
        If BannedIps.Contains(MyIP) Then
            Timer1.Stop()
            MsgBox("You have been banned from the server, if you want to get unbanned agin, email: [email protected]", MsgBoxStyle.Information, "<YourProgramName>")
            Me.Close()
        End If
        wc.Dispose()
    End Sub
'

Timer1 Code ' Interval like 2000
Code
BanCheck()

Form1.Load
Code
BanCheck()
Timer1.Start()

Enjoy.


* - Gent - Apr 15, 2010

This is awesome. I'll definitely use this.


* - The-One - Apr 15, 2010

(Apr 15, 2010 12:01 PM)Joomla12 Wrote:  This is awesome. I'll definitely use this.

Thanks, yeah, I had fun with it to :P


* - D.O.A - Apr 16, 2010

this is quite good for me


* - The-One - Apr 16, 2010

(Apr 16, 2010 05:40 AM)D.O.A Wrote:  this is quite good for me

Glad i'd helped you

Spoiler (Click to View)


* - lyncsta - Apr 16, 2010

this is good man thanks, iv done stuff like this before and if u changed it around you could make this a serial checker and make the ip list the serials that work and if you want to ban a serial just remove it


* - The-One - Apr 16, 2010

(Apr 16, 2010 05:49 AM)lyncsta Wrote:  this is good man thanks, iv done stuff like this before and if u changed it around you could make this a serial checker and make the ip list the serials that work and if you want to ban a serial just remove it

Better use HWID.
Nice idea though.


* - ActimeL - Apr 17, 2010

I add to mines admin functions :D..


* - Scrat - Apr 20, 2010

lol that's going to be interesting :)


* - lyncsta - Apr 20, 2010

lol im so dumb lol good job


* - Bitwin - Apr 20, 2010

Great, as said before maybe more useful / secure to use HWID because IPs are changing often if they don't have static


* - The-One - Apr 30, 2010

(Apr 20, 2010 08:05 AM)C00k13 Wrote:  Great, as said before maybe more useful / secure to use HWID because IPs are changing often if they don't have static

True, although, this is a great starting option. HWID would be the same thing, only we don't check IP but HWID.

-Sorry for late reaction, couldn't reach hackforums server


* - msuper28 - Apr 30, 2010

thanks it's good for hwid, isn't it?
it can ban only static ip and no-ip too?


* - The-One - Apr 30, 2010

(Apr 30, 2010 06:52 AM)msuper28 Wrote:  thanks it's good for hwid, isn't it?
it can ban only static ip and no-ip too?

If you make, each time someone does a action, and then sends it IP to a FTP server.
And check for a IP-ban each time, then yes. I already made the same system, with the Username of the users, and the HWID ofcourse.


* - rapidguide - May 8, 2010

great
to shrt----------