Register for your free account! | Forgot your password?

You last visited: Today at 17:33

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



IPConverter

Discussion on IPConverter within the SRO PServer Guides & Releases forum part of the SRO Private Server category.

Reply
 
Old   #1
 
Kape7's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,289
IPConverter

I posted this originally on Underground section but due to the files getting leaked, I think more people will find this tool usefull if it is posted on a public section.
--------------------

For those with the original serverfiles, I've made a tool for convert IP strings into the right int values that have to be added on the _PrivilegedIP table. If you don't know for what you need this tool, ignore this thread because that means you don't need it.
I've tested it with the Gateway server of the leaked serverfiles and it reads all the random IP's I've tested, so it's working fine. Still my coding skills are not that great, so there could be bugs, specially on the 127 IP range, so report them if you find it (post the IP that you have entered and caused the bug).

A pic of the program:



Virus scan:


Program is attached.
Attached Files
File Type: rar IPConverter.rar (333.0 KB, 1552 views)
Kape7 is offline  
Thanks
24 Users
Old 10/03/2011, 16:53   #2
 
Kape7's Avatar
 
elite*gold: 0
Join Date: Dec 2007
Posts: 3,210
Received Thanks: 6,289
Bump due to approval after 2 weeks lol
Kape7 is offline  
Old 10/03/2011, 18:24   #3
 
Dr.Abdelfattah's Avatar
 
elite*gold: 7
Join Date: May 2010
Posts: 2,115
Received Thanks: 2,373
wow it's great but if u find it before we post this table

PHP Code:
USE [SRO_VT_ACCOUNT]
GO
/****** Object:  Table [dbo].[_PrivilegedIP]    Script Date: 09/13/2011 08:35:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
drop table _PrivilegedIP
CREATE TABLE 
[dbo].[_PrivilegedIP](
    [
IP1] [tinyintNOT NULL,
    [
IP2] [tinyintNOT NULL,
    [
IP3] [tinyintNOT NULL,
    [
IP4] [tinyintNOT NULL,
    [
IP5] [tinyintNOT NULL,
    [
IP6] [tinyintNOT NULL,
    [
IP7] [tinyintNOT NULL,
    [
IP8] [tinyintNOT NULL
ON [PRIMARY]
GO 
but anyway thank u
Dr.Abdelfattah is offline  
Old 10/03/2011, 18:41   #4
Chat Killer In Duty


 
PortalDark's Avatar
 
elite*gold: 5
Join Date: May 2008
Posts: 16,309
Received Thanks: 6,470
Quote:
Originally Posted by Synx7 View Post
Bump due to approval after 2 weeks lol
more, i recall you saying you will release a tool on here like 3 weeks ago
PortalDark is offline  
Old 07/17/2012, 10:49   #5
 
elite*gold: 0
Join Date: Oct 2009
Posts: 6
Received Thanks: 0
Hello, i have gm account problems, with can you give me its says me when i convert; -710235816 this is for _PriveLegendIP table its 710.235.816? or 7.102.35.816? idont know can you give me this point ? and sorry for my bad english i learn ^_^ only french

can any players help me PLS ,?
rrbutot is offline  
Old 07/17/2012, 15:29   #6
 
eminem5's Avatar
 
elite*gold: 0
Join Date: Dec 2011
Posts: 651
Received Thanks: 266
great release by a great member
eminem5 is offline  
Old 07/17/2012, 23:30   #7
 
IceAmStiel's Avatar
 
elite*gold: 0
Join Date: Jul 2011
Posts: 1,058
Received Thanks: 1,118
Seen this one here and decided to create the pure SQL way for the hell of it

Includes also the emulated function "explode" - the procedure can be used practically with e.g. cursors and dynamic SQL since a table ExplodeResultset will be misused as an "array".

Make sure to run the stuff on SRO_VT_ACCOUNT to convert the IP's however you want.

Code:
USE SRO_VT_ACCOUNT
GO

CREATE PROCEDURE [dbo].[Explode_String] /* by Caipi */

	@String varchar(max),
	@Delimiter varchar(255)

as

SET NOCOUNT ON;
		
IF exists (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'ExplodeResultset')
	BEGIN
		DROP TABLE ExplodeResultset;
	END
		
CREATE TABLE ExplodeResultset (Num INT IDENTITY, String varchar(max) NULL);

Declare @TempS varchar(max) = '';
WHILE (LEN(@String) != 0)
	BEGIN
		SET @TempS = SUBSTRING(@String,0,CHARINDEX(@Delimiter,@String));
		IF (CHARINDEX(@Delimiter,@String)=0)
			BEGIN
				INSERT INTO ExplodeResultset SELECT @String
				BREAK;
			END
		ELSE
			BEGIN
				INSERT INTO ExplodeResultset SELECT @TempS
			END
		SET @String = RIGHT(@String,LEN(@String)-(LEN(@TempS)+LEN(@Delimiter)))
	END
	
SET NOCOUNT OFF;

SELECT * FROM ExplodeResultset
Code:
USE SRO_VT_ACCOUNT
GO

CREATE PROCEDURE _ConvertIP /* by Caipi */

	@String varchar(16)

as

SET NOCOUNT ON;

	Declare	@conIP INT,
			@1 INT,
			@2 INT,
			@3 INT,
			@4 INT;

	exec Explode_String @String,'.'

	SELECT @1 = String FROM ExplodeResultset WHERE Num = 1;
	SELECT @2 = String FROM ExplodeResultset WHERE Num = 2;
	SELECT @3 = String FROM ExplodeResultset WHERE Num = 3;
	SELECT @4 = String FROM ExplodeResultset WHERE Num = 4;

	exec @conIP = make_ip @1,@2,@3,@4

SET NOCOUNT OFF;

SELECT @conIP as ConvertedIP

An example as rrbutot stated regarding to the integer -710235816, conversion to IP + vice versa.

Code:
USE SRO_VT_ACCOUNT

Declare @conIP INT = -710235816,
		@IP varchar(128) = '';

exec @IP = split_ip @conIP;

SELECT @IP as IP

exec _ConvertIP @IP
IceAmStiel is offline  
Old 03/11/2014, 10:38   #8
 
elite*gold: 0
Join Date: Jun 2012
Posts: 74
Received Thanks: 8
Synx7 for president, best silkroad editor out there Myth proved it! ^^
maria767 is offline  
Reply




All times are GMT +2. The time now is 17:33.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.