<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Faldon Forums - Hacking - ?]]></title>
	<link rel="self" href="https://www.faldon.org/feed/atom/topic/7404/"/>
	<updated>2024-02-10T04:15:25Z</updated>
	<generator>PunBB</generator>
	<id>https://www.faldon.org/topic/7404/</id>
		<entry>
			<title type="html"><![CDATA[Re: Hacking - ?]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/72639/#p72639"/>
			<content type="html"><![CDATA[<p>When you do get to the server - I&#039;d be open to offer you suggestion&#039;s on defensive programming and ways to make the server more resistant to accidental exploits through progrmatic errors, and race conditions from multi-thread read/writes. One of the easiest things to do is consolidate ALL items into one table to avoid unnecessary INSERT when moving items from one table to another as outlined below:</p><p>ObjectId, OwnerId, Location, data, data2, data3, data4</p><p>The objectId would be the key for the table prevent duplicate entries natively by design - the ObjectID would be a thread safe IDFactory (server wide) and can be used for many things, but specifically, AccountID, CharacterID, MailID, etc.</p><p>Then you&#039;d have your tables for Accounts, Characters, Mail, etc ... which with the reference to the Unique ID and loaded at server run time into memory - and written to the table as needed (items would Save instantly, always... as an example... but characters/exp gains could save on an timer thread such as every 5 minutes to reduce I/O Load).</p><p>When working with the &quot;Inventory Table&quot;:</p><p>ObjectId, OwnerId, Location, data, data2, data3, data4</p><p>All instantiated items would exist in this table where the OwnerID would be where the item resides:</p><p>OwnerID = CharacterID for character Inventory<br />OwnerID = MailID for character mail - the Mail Table would reference its Character ID as to who owns it.<br />OwnerID = AccountID for Account Based storage... this would allow you create account based storage for moving items between characters on an account - shared storage.. <br />OwnerID = GuideID for Guide Based storage... <br />OwnerID = MonsterID for pets... this would allow you to store pets with items on them still <img src="https://www.faldon.org/img/smilies/smile.png" width="15" height="15" alt="smile" /> (solves that problem for you).</p><p>The benefit of this system, is that instead of DELETE and INSERTS you are doing simple UPDATES - so now you can&#039;t force a dupe through any type of race condition or logic error... because the object will only ever exist ONCE and get its reference in the database updated when traded / dropped / stored</p><p>At this point, the only thing you&#039;d have to worry about is stackables - because the objectID would need to be recreated when splitting stacks - making them potentially still dupable.. but there are ways to track this and prevent it as well.</p><p>The location property would be a reference for loading and accessibility...</p><p>0 = Ground<br />1 = Inventory<br />2 = Account<br />4 = Mail<br />8 = Guild<br />16 = Pet<br />.... etc</p>]]></content>
			<author>
				<name><![CDATA[Angeldust]]></name>
				<uri>https://www.faldon.org/user/1335/</uri>
			</author>
			<updated>2024-02-10T04:15:25Z</updated>
			<id>https://www.faldon.org/post/72639/#p72639</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Hacking - ?]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/72631/#p72631"/>
			<content type="html"><![CDATA[<p>Apparently the forum timeout was 5 minutes. I too encountered this all the time.<br />What a great default.<br />I&#039;ve changed it to 3 hours.</p>]]></content>
			<author>
				<name><![CDATA[James]]></name>
				<uri>https://www.faldon.org/user/2/</uri>
			</author>
			<updated>2024-02-08T11:58:04Z</updated>
			<id>https://www.faldon.org/post/72631/#p72631</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Hacking - ?]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/72628/#p72628"/>
			<content type="html"><![CDATA[<p>I had a very thorough response written ... but the damn forum timed me out and I lost it all... I will summarize:</p><p>Race Conditions, Signed type overflows, client data validation as some examples with my favorite tactic to create a proxy that the client connects to... which connects to the server and handles all the fun stuff. I will play around when the new server comes out...</p><p>I had an explanation referencing all the cool old memories like back in the day when you added in the logoff delay when you were in combat.. and we would dupe all the stat elixirs by killing the player JUST as they logged off so the items would drop, but the server never removed it from the players inventory... oh the good memories.</p><p>Angeldust,</p>]]></content>
			<author>
				<name><![CDATA[Angeldust]]></name>
				<uri>https://www.faldon.org/user/1335/</uri>
			</author>
			<updated>2024-02-08T01:41:31Z</updated>
			<id>https://www.faldon.org/post/72628/#p72628</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Hacking - ?]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/72627/#p72627"/>
			<content type="html"><![CDATA[<p>It&#039;s still the old server right now. I haven&#039;t had time to work on the new server, though I did write about 50-75% of one in 2020.<br />I expect I&#039;ll be using the old server for some time now. There&#039;s lots to do on the new client still left to do -- many months of fixing bugs -- before I even consider any new features, much less work on the new server.<br />Just out of curiosity, what sort of testing do you mean?</p>]]></content>
			<author>
				<name><![CDATA[James]]></name>
				<uri>https://www.faldon.org/user/2/</uri>
			</author>
			<updated>2024-02-07T15:21:25Z</updated>
			<id>https://www.faldon.org/post/72627/#p72627</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Hacking - ?]]></title>
			<link rel="alternate" href="https://www.faldon.org/post/72622/#p72622"/>
			<content type="html"><![CDATA[<p>James,</p><p>You ok if I were to do some exploit testing on the new server code? (are we running the new server or old + new client?). The goal would be testing to report/fix.</p>]]></content>
			<author>
				<name><![CDATA[Angeldust]]></name>
				<uri>https://www.faldon.org/user/1335/</uri>
			</author>
			<updated>2024-02-03T20:32:43Z</updated>
			<id>https://www.faldon.org/post/72622/#p72622</id>
		</entry>
</feed>
