Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MySQL) update SQL to support MySQL 8. fixes #73 and #72 #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joebordes
Copy link

No description provided.

@ghigomatto
Copy link

Thereis a new fork of this project!
2024!

https://github.com/LucaRastrelli/waf-fle

@hans-mayer
Copy link

hans-mayer commented Mar 16, 2024

Thereis a new fork of this project! 2024!
https://github.com/LucaRastrelli/waf-fle

These are really great news. For me it's now almost running on Debian 12.4 bookworm with php 8.2.7 and Apache 2.4.57
I have an issue with GeoIP. When I run setup it tells me: GeoIP Extension: missing.
When I run phpinfo() I see mod_php is installed and configured.
I also run: php composer.phar require geoip2/geoip2:~2.0
Simple test scripts from command line and on web server are showing the country.
But waf-fle doesn't show the countries in the home tab.
Any ideas how to get this small piece to run ?

@hans-mayer
Copy link

In the meantime I got it working.
I installed geoip from https://github.com/rlerdorf/geoip.git and compiled it with phpize ; ./configure ; make ; make install
A simple php test script with geoip_country_code_by_name() and geoip_isp_by_name() did work. But not so waf-fle.
Looking at the code I see this part of coding is commented out. Be so kind and apply the following patch for further versions:

# git diff index.php
diff --git a/controller/index.php b/controller/index.php
index 0b70901..c5535ca 100644
--- a/controller/index.php
+++ b/controller/index.php
@@ -609,7 +609,7 @@ try {
     $insert_sth->bindParam(":PhaseADate", $PhaseA['Date']);
     $insert_sth->bindParam(":PhaseAUniqID", $PhaseA['UniqID']);
     $insert_sth->bindParam(":PhaseAClientIP", $PhaseA['ClientIP']);
-    /*
+    
     // Get Country Code of IP Address
     $ClientIPCC = geoip_country_code_by_name($PhaseA['ClientIP']);
     if (!$ClientIPCC) {
@@ -622,9 +622,11 @@ try {
     } elseif ( $ClientIPASN == "") {
        $ClientIPASN = '0';
     }
-    */
+    
+    /* 
     $ClientIPCC = '';
     $ClientIPASN = '0';
+    */
     $insert_sth->bindParam(":PhaseAClientIPCC", $ClientIPCC);
     $insert_sth->bindParam(":PhaseAClientIPASN", $ClientIPASN);
     $insert_sth->bindParam(":PhaseASourcePort", $PhaseA['SourcePort']);

@LucaRastrelli
Copy link

In the meantime I got it working. I installed geoip from https://github.com/rlerdorf/geoip.git and compiled it with phpize ; ./configure ; make ; make install A simple php test script with geoip_country_code_by_name() and geoip_isp_by_name() did work. But not so waf-fle. Looking at the code I see this part of coding is commented out. Be so kind and apply the following patch for further versions:

# git diff index.php
diff --git a/controller/index.php b/controller/index.php
index 0b70901..c5535ca 100644
--- a/controller/index.php
+++ b/controller/index.php
@@ -609,7 +609,7 @@ try {
     $insert_sth->bindParam(":PhaseADate", $PhaseA['Date']);
     $insert_sth->bindParam(":PhaseAUniqID", $PhaseA['UniqID']);
     $insert_sth->bindParam(":PhaseAClientIP", $PhaseA['ClientIP']);
-    /*
+    
     // Get Country Code of IP Address
     $ClientIPCC = geoip_country_code_by_name($PhaseA['ClientIP']);
     if (!$ClientIPCC) {
@@ -622,9 +622,11 @@ try {
     } elseif ( $ClientIPASN == "") {
        $ClientIPASN = '0';
     }
-    */
+    
+    /* 
     $ClientIPCC = '';
     $ClientIPASN = '0';
+    */
     $insert_sth->bindParam(":PhaseAClientIPCC", $ClientIPCC);
     $insert_sth->bindParam(":PhaseAClientIPASN", $ClientIPASN);
     $insert_sth->bindParam(":PhaseASourcePort", $PhaseA['SourcePort']);

Thank you for the contribution. I will try it on monday.
If you have more ideas, please can you open an issue ticket on my fork?
It was pure coincidence that i saw your comment ^^

@ghigomatto
Copy link

Thereis a new fork of this project! 2024!
https://github.com/LucaRastrelli/waf-fle

These are really great news. For me it's now almost running on Debian 12.4 bookworm with php 8.2.7 and Apache 2.4.57 I have an issue with GeoIP. When I run setup it tells me: GeoIP Extension: missing. When I run phpinfo() I see mod_php is installed and configured. I also run: php composer.phar require geoip2/geoip2:~2.0 Simple test scripts from command line and on web server are showing the country. But waf-fle doesn't show the countries in the home tab. Any ideas how to get this small piece to run ?

I'll work on it soon and I'll let you know.
At the moment the function is not yet available, but I think it can be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants