<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — PunBB 1.3.4 - Encrypt IPs in sha1]]></title>
		<link>https://punbb.informer.com/forums/topic/23809/punbb-134-encrypt-ips-in-sha1/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/23809/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in PunBB 1.3.4 - Encrypt IPs in sha1.]]></description>
		<lastBuildDate>Mon, 29 Nov 2010 10:24:33 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: PunBB 1.3.4 - Encrypt IPs in sha1]]></title>
			<link>https://punbb.informer.com/forums/post/138727/#p138727</link>
			<description><![CDATA[<p>Updated, thanks to TheAssassin185.</p>]]></description>
			<author><![CDATA[null@example.com (Nonante)]]></author>
			<pubDate>Mon, 29 Nov 2010 10:24:33 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/138727/#p138727</guid>
		</item>
		<item>
			<title><![CDATA[Re: PunBB 1.3.4 - Encrypt IPs in sha1]]></title>
			<link>https://punbb.informer.com/forums/post/138709/#p138709</link>
			<description><![CDATA[<p>Personally, I have had no problems, but other people I know have been pirated, <br />and their database was released, so with the IP of their members displayed in clear.</p><p>It is above all in order to &quot;protect&quot; sensitive information <br />as well as members only &quot;protection&quot;, this is not a truly effective solution.</p><p>Personally I would not want my IP to appear in a release of a database to a porn site.<br />For example <img src="https://punbb.informer.com/forums/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[null@example.com (Nonante)]]></author>
			<pubDate>Sat, 27 Nov 2010 10:23:36 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/138709/#p138709</guid>
		</item>
		<item>
			<title><![CDATA[Re: PunBB 1.3.4 - Encrypt IPs in sha1]]></title>
			<link>https://punbb.informer.com/forums/post/138704/#p138704</link>
			<description><![CDATA[<p>Thank you for publishing this!</p><p>Btw: What had happened (hack) exactely to make you want to encrypt the IPs?</p>]]></description>
			<author><![CDATA[null@example.com (KeyDog)]]></author>
			<pubDate>Sat, 27 Nov 2010 09:17:25 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/138704/#p138704</guid>
		</item>
		<item>
			<title><![CDATA[PunBB 1.3.4 - Encrypt IPs in sha1]]></title>
			<link>https://punbb.informer.com/forums/post/138691/#p138691</link>
			<description><![CDATA[<p>Following this <a href="http://www.wareziens.info/forums/topic-2850-important-vos-adresses-ip-sont-cryptes-en-sha1.html">topic</a>, I&#039;m leaning a little on PunBB 1.3.4 to establish the same system,<br />even if some find it useless as the only &quot;protection&quot;.</p><p>Since I have found nothing for PunBB ips, I&#039;ll file the amendments to do if you&#039;re interested.<br />I warn, I have not used the Hooks, the changes are in direct files.</p><p>From what I saw, a feature not available anymore, &quot;@gethostbyaddr($ip)&quot; in file moderate.php line 55.<br />For the rest, everything is functional.</p><p>[---][---][---]</p><p><strong><span style="color: #D60008">Note 1: It is advisable to make a backup before making changes.<br />Furthermore, this operation is at your own risk, I can not be held responsible blahblahblah in case of bug .</span></strong></p><p><strong><span style="color: #D60008">Note2: Put the same key if you change $encrypted_key = &quot;put_your_key_here&quot;;.</span></strong></p><p><strong><span style="color: #D60008">Note3: If I spent my time doing this topic is that it works, I&#039;m not crazy </span></strong><span class="postimg"><img src="http://www.wareziens.info/forums/img/smilies/siffle.gif" alt="http://www.wareziens.info/forums/img/smilies/siffle.gif" /></span></p><p><strong>In Phpmyadmin :</strong><br />1) In the structure of the table &quot;posts&quot;, colonne &quot;poster_id&quot;, change &quot;type&quot; to &quot;varchar(40)&quot;<br />2) In the structure of the table &quot;users&quot;, colonne &quot;registration_ip&quot;<br />&nbsp; &nbsp; a) change &quot;type&quot; to &quot;varchar(40)&quot;<br />&nbsp; &nbsp; b) change &quot;Défaut2&quot;&nbsp; as defined: &quot;ab3a723bf153e72986de993c39f2eaabc9a122b7&quot;</p><p><strong>On your server,:</strong><br />1) add this function:<br /></p><div class="quotebox"><blockquote><p>function hash_ip($ip)<br />{<br />&nbsp; &nbsp; // change with your own key<br />&nbsp; &nbsp; $encrypted_key = &quot;<strong><span style="color: blue">put_your_key_here</span></strong>&quot;;</p><p>&nbsp; &nbsp; return sha1($ip.$encrypted_key.sha1($ip.sha1($encrypted_key)));<br />&nbsp; &nbsp; <br />}</p></blockquote></div><p>1) Update ips of the table posts with query :<br /></p><div class="quotebox"><blockquote><p>$query = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;SELECT&#039;&nbsp; &nbsp; =&gt; &#039;id, poster_ip&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;FROM&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;posts&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );</p><br /><p>&nbsp; &nbsp; $result = $forum_db-&gt;query_build($query) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; while($row = $forum_db-&gt;fetch_assoc($result))<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $query2 = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;UPDATE&#039;&nbsp; &nbsp; =&gt; &#039;posts&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;SET&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;poster_ip=\&#039;&#039;.hash_ip($row[&#039;poster_ip&#039;]).&#039;\&#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;WHERE&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;id=&#039;.$row[&#039;id&#039;].&#039; LIMIT 1&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br />&nbsp; &nbsp; &nbsp; &nbsp; $forum_db-&gt;query_build($query2) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; }</p></blockquote></div><p>2) Update ips of the table users with query :<br /></p><div class="quotebox"><blockquote><p>$query = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;SELECT&#039;&nbsp; &nbsp; =&gt; &#039;id, registration_ip&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;FROM&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;users&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );</p><br /><p>&nbsp; &nbsp; $result = $forum_db-&gt;query_build($query) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; while($row = $forum_db-&gt;fetch_assoc($result))<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $query2 = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;UPDATE&#039;&nbsp; &nbsp; =&gt; &#039;users&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;SET&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;registration_ip=\&#039;&#039;.hash_ip($row[&#039;registration_ip&#039;]).&#039;\&#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;WHERE&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;id=&#039;.$row[&#039;id&#039;].&#039; LIMIT 1&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br />&nbsp; &nbsp; &nbsp; &nbsp; $forum_db-&gt;query_build($query2) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; }</p></blockquote></div><p>Possibly, if you have any banned users, do this also:<br />3) Update ips of the table bans with query :<br /></p><div class="quotebox"><blockquote><p>$query = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;SELECT&#039;&nbsp; &nbsp; =&gt; &#039;id, ip&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;FROM&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;bans&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );</p><br /><p>&nbsp; &nbsp; $result = $forum_db-&gt;query_build($query) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; while($row = $forum_db-&gt;fetch_assoc($result))<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $query2 = array(<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;UPDATE&#039;&nbsp; &nbsp; =&gt; &#039;bans&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;SET&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;ip=\&#039;&#039;.hash_ip($row[&#039;ip&#039;]).&#039;\&#039;&#039;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#039;WHERE&#039;&nbsp; &nbsp; &nbsp; &nbsp; =&gt; &#039;id=&#039;.$row[&#039;id&#039;].&#039; LIMIT 1&#039;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; );<br />&nbsp; &nbsp; &nbsp; &nbsp; $forum_db-&gt;query_build($query2) or error(__FILE__, __LINE__);<br />&nbsp; &nbsp; }</p></blockquote></div><p>[---][---][---]</p><p><strong>In your files :</strong></p><p>[---]</p><p>In <span style="color: #ff0000">FORUM_ROOT.</span>&#039;moderate.php&#039;, line 30 change:<br /></p><div class="quotebox"><blockquote><p><strong><span style="color: #419445">// Is get_host an IP address or a post ID?</span></strong><br />&nbsp; &nbsp; if (preg_match(&#039;/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/&#039;, $_GET[&#039;get_host&#039;]) || preg_match(&#039;/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/&#039;, $_GET[&#039;get_host&#039;]))</p></blockquote></div><p>to</p><div class="quotebox"><blockquote><p><strong><span style="color: #419445">// Is get_host an IP address or a post ID?</span></strong><br />&nbsp; &nbsp; if (preg_match(&#039;/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/&#039;, $_GET[&#039;get_host&#039;]) || preg_match(&#039;/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/&#039;, $_GET[&#039;get_host&#039;]) || preg_match(&#039;/^[0-9A-Fa-f]{40}$/&#039;, $_GET[&#039;get_host&#039;]))</p></blockquote></div><p>Yet in <span style="color: #ff0000">FORUM_ROOT.</span>&#039;moderate.php&#039;, line 55 change:<br /></p><div class="quotebox"><blockquote><p>message(sprintf($lang_misc[&#039;Hostname lookup&#039;], $ip, @gethostbyaddr($ip), &#039;&lt;a href=&quot;&#039;.forum_link($forum_url[&#039;admin_users&#039;]).&#039;?show_users=&#039;.$ip.&#039;&quot;&gt;&#039;.$lang_misc[&#039;Show more users&#039;].&#039;&lt;/a&gt;&#039;));</p></blockquote></div><p>to :<br /></p><div class="quotebox"><blockquote><p>message(sprintf($lang_misc[&#039;Hostname lookup&#039;], $ip, &#039;&lt;ins&gt;&lt;em&gt;Information encrypted, impossible to determine.&lt;/em&gt;&lt;/ins&gt;&#039;, &#039;&lt;a href=&quot;&#039;.forum_link($forum_url[&#039;admin_users&#039;]).&#039;?show_users=&#039;.$ip.&#039;&quot;&gt;&#039;.$lang_misc[&#039;Show more users&#039;].&#039;&lt;/a&gt;&#039;));</p></blockquote></div><p>Note: This is gethostbyaddr($ip) is no longer usable, so I substituted a sentence, if you want to change anything.<br />[---]</p><p>In <span style="color: #ff0000">FORUM_ROOT.</span>&#039;admin/users.php&#039;, line 180 change:<br /></p><div class="quotebox"><blockquote><p>if (empty($ip) || (!preg_match(&#039;/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/&#039;, $ip) &amp;&amp; !preg_match(&#039;/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/&#039;, $ip))))</p></blockquote></div><p>to <br /></p><div class="quotebox"><blockquote><p>if (empty($ip) || (!preg_match(&#039;/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/&#039;, $ip) &amp;&amp; !preg_match(&#039;/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/&#039;, $ip)) &amp;&amp; (!preg_match(&#039;/[0-9A-Fa-f]{40}/&#039;, $ip)))</p></blockquote></div><p>[---]</p><p>In <span style="color: #ff0000">FORUM_ROOT.</span>&#039;include/functions.php&#039;, line 1003 change:<br /></p><div class="quotebox"><blockquote><p><strong><span style="color: #419445">// Try to determine the correct remote IP-address</span></strong><br />function get_remote_address()<br />{<br />&nbsp; &nbsp; $return = ($hook = get_hook(&#039;fn_get_remote_address_start&#039;)) ? eval($hook) : null;<br />&nbsp; &nbsp; if ($return != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; return $return;</p><p>&nbsp; &nbsp; return $_SERVER[&#039;REMOTE_ADDR&#039;];<br />}</p></blockquote></div><p>to<br /></p><div class="quotebox"><blockquote><p><strong><span style="color: #419445">// Try to determine the correct remote IP-address</span></strong><br />function get_remote_address()<br />{<br />&nbsp; &nbsp; // change with your own key<br />&nbsp; &nbsp; $encrypted_key = &quot;<strong><span style="color: blue">put_your_key_here</span></strong>&quot;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; $return = ($hook = get_hook(&#039;fn_get_remote_address_start&#039;)) ? eval($hook) : null;<br />&nbsp; &nbsp; if ($return != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; return sha1($return.$encrypted_key.sha1($return.sha1($encrypted_key)));</p><p>&nbsp; &nbsp; return sha1($_SERVER[&#039;REMOTE_ADDR&#039;].$encrypted_key.sha1($_SERVER[&#039;REMOTE_ADDR&#039;].sha1($encrypted_key)));<br />&nbsp; &nbsp; <br />}</p></blockquote></div><p>[---]</p><p>In <span style="color: #ff0000">FORUM_ROOT.</span>&#039;include/url/&#039; + your url scheme + &#039;/rewrite_rules.php, line 58 change:<br /></p><div class="quotebox"><blockquote><p>&#039;/^get_host[\/_-]?([0-9]+|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})(\.html?|\/)?$/i&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;moderate.php?get_host=$1&#039;,</p></blockquote></div><p>to :<br /></p><div class="quotebox"><blockquote><p>&#039;/^get_host[\/_-]?([0-9]+|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}|[0-9A-Fa-f]{40})(\.html?|\/)?$/i&#039;&nbsp; &nbsp; =&gt;&nbsp; &nbsp; &#039;moderate.php?get_host=$1&#039;,</p></blockquote></div><p>[---][---][---]</p><p>That is, if it can be useful <span class="postimg"><img src="http://www.wareziens.info/forums/img/smilies/wink.png" alt="http://www.wareziens.info/forums/img/smilies/wink.png" /></span></p><br /><p>EDIT: I add an encryption key because it is too easy to compare IP with this script: <br /></p><div class="quotebox"><blockquote><p>for ($i=0;$i&lt;255;$i++) {<br />&nbsp; &nbsp; for ($j=0;$j&lt;255;$j++) {<br />&nbsp; &nbsp; &nbsp; &nbsp; for ($k=0;$k&lt;255;$k++) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for ($l=0;$l&lt;255;$l++) {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ip = $i.&quot;.&quot;. $j .&quot;.&quot;. $k .&quot;.&quot;.$l;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mysql_query(&quot;INSERT INTO `ips` (`ip`, `sha`) VALUES (&#039;&quot;. $ip .&quot;&#039;, &#039;&quot;. sha1($ip) .&quot;&#039;)&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }<br />}</p><p>Thanks to TheAssassin185.</p></blockquote></div><p>Now if only access to the database is compromised, it is not possible to retrieve the IP.</p><p>Result : <br /><span class="postimg"><img src="http://prezup.eu/images/punbb/sha1ip.png" alt="http://prezup.eu/images/punbb/sha1ip.png" /></span></p>]]></description>
			<author><![CDATA[null@example.com (Nonante)]]></author>
			<pubDate>Fri, 26 Nov 2010 11:08:00 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/138691/#p138691</guid>
		</item>
	</channel>
</rss>
