<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to How to use</title><link>https://sourceforge.net/p/antisqlinject/wiki/How%2520to%2520use/</link><description>Recent changes to How to use</description><atom:link href="https://sourceforge.net/p/antisqlinject/wiki/How%20to%20use/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 20 Jan 2015 02:12:05 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/antisqlinject/wiki/How%20to%20use/feed" rel="self" type="application/rss+xml"/><item><title>How to use modified by MrARM</title><link>https://sourceforge.net/p/antisqlinject/wiki/How%2520to%2520use/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -25,6 +25,7 @@

 Here`s a script to log any ip that attempts to SQL inject your site

+    require('antiinject.php');
     if(!antiinject($string,false)){
         $logfile= 'log.txt';
         $IP = $_SERVER['REMOTE_ADDR'];
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MrARM</dc:creator><pubDate>Tue, 20 Jan 2015 02:12:05 -0000</pubDate><guid>https://sourceforge.netafdefaa9f0aef3d873cd5c13dbb99145d32e8519</guid></item><item><title>How to use modified by MrARM</title><link>https://sourceforge.net/p/antisqlinject/wiki/How%2520to%2520use/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -4,6 +4,7 @@
 Antiinject is a SQL Injection Prevention Library made as a second hand meant to &lt;b&gt;Be At the top of your code!&lt;/b&gt;

 Simple code:
+
     require('antiinject.php');
     antiinject($string,true);

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MrARM</dc:creator><pubDate>Tue, 20 Jan 2015 02:11:29 -0000</pubDate><guid>https://sourceforge.net833204e717befce844096e46e15075b7759690f6</guid></item><item><title>How to use modified by MrARM</title><link>https://sourceforge.net/p/antisqlinject/wiki/How%2520to%2520use/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;b&gt;Welcome!&lt;/b&gt;,&lt;/p&gt;
&lt;p&gt;How to use AntiInject.&lt;br /&gt;
Antiinject is a SQL Injection Prevention Library made as a second hand meant to &lt;b&gt;Be At the top of your code!&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Simple code:&lt;br /&gt;
    require('antiinject.php');&lt;br /&gt;
    antiinject($string,true);&lt;/p&gt;
&lt;p&gt;Lets Break this down:&lt;br /&gt;
require('antiinject.php');&lt;br /&gt;
^1             ^2&lt;br /&gt;
antiinject($string,true);&lt;br /&gt;
    ^3        ^4     ^5&lt;/p&gt;
&lt;p&gt;1.Require, Add the function of antiinject in the file antiinject.php&lt;br /&gt;
2.antiinject.php, The file of my project&lt;br /&gt;
3.Antiinject, The Function Of the program&lt;br /&gt;
4.$string, The Variable string you wish to scan&lt;br /&gt;
5.true, Block the site using defined messages in the file. false will be used for defining a statement as seen below will show how to use the false string.&lt;/p&gt;
&lt;p&gt;Advanced code, Custom code&lt;/p&gt;
&lt;p&gt;Here`s a script to log any ip that attempts to SQL inject your site&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;antiinject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)){&lt;/span&gt;
    &lt;span class="nv"&gt;$logfile&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'log.txt'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;$IP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$_SERVER&lt;/span&gt;&lt;span class="err"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'REMOTE_ADDR'&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;;
    $logdetails= date("F j, Y, g:i a") . ': ' . '&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;http://dnsstuff.com/tools/city.ch?&lt;/span&gt;                      &lt;span class="na"&gt;ip=&lt;/span&gt;&lt;span class="s"&gt;'.$_SERVER&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'REMOTE_ADDR'&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="s"&gt;.'&lt;/span&gt; &lt;span class="na"&gt;target=&lt;/span&gt;&lt;span class="s"&gt;_blank&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;'.$_SERVER&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'REMOTE_ADDR'&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;.'&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;';
    $fp = fopen($logfile, "r+");
    fwrite($fp, $logdetails, strlen($logdetails));
    fclose($fp);    
    die("You tried to hack my site, i got your ip now");
}
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I'm  not going to go in detail on this but false will return false and is used to execute php code in a if statement &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MrARM</dc:creator><pubDate>Tue, 20 Jan 2015 02:11:04 -0000</pubDate><guid>https://sourceforge.net3b80291f02501a0e9d412a941a54d79ac82075c6</guid></item></channel></rss>