Code Monkey home page Code Monkey logo

fbwlan's Issues

500 Internal Server Error already use .htaccess

.htaccess info

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} !=/index.php
RewriteRule ^(.*)$ index.php [QSA,L]

Connect to Facebook is working
already Facebook login successful!

but When you "click Check in to Message"
then

500 Internal Server Error

Use of undefined constant place - assumed 'place' (8)

#0 /home/wwwroot/router.xxxx.com/handlers/fb_handlers.php(201): flight\Engine->handleError(8, 'Use of undefine...', '/home/wwwroot/r...', 201, Array)
#1 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(160): handle_checkin()
#2 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(143): flight\core\Dispatcher::callFunction('handle_checkin', Array)
#3 /home/wwwroot/router.xxxx.com/include/flight/flight/Engine.php(313): flight\core\Dispatcher::execute('handle_checkin', Array)
#4 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(191): flight\Engine->_start()
#5 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(142): flight\core\Dispatcher::invokeMethod(Array, Array)
#6 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(48): flight\core\Dispatcher::execute(Array, Array)
#7 /home/wwwroot/router.xxxx.com/include/flight/flight/Engine.php(64): flight\core\Dispatcher->run('start', Array)
#8 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(191): flight\Engine->__call('start', Array)
#9 /home/wwwroot/router.xxxx.com/include/flight/flight/core/Dispatcher.php(191): flight\Engine->start()
#10 /home/wwwroot/router.xxxx.com/include/flight/flight/Flight.php(76): flight\core\Dispatcher::invokeMethod(Array, Array)
#11 /home/wwwroot/router.xxxx.com/index.php(85): Flight::__callStatic('start', Array)
#12 /home/wwwroot/router.xxxx.com/index.php(85): Flight::start()
#13 {main}

Can not Check In!!
what's going on?

server:PHP/5.4.41 Apache2.4
the facebok api publish_actions i test is working!

Device Support

I was implementing Social Hotspot with RouterOS and a simple Garden, I had problems with facebook ips, MikroTik have great and cheap Routers, RouterOS is great, but OpenWRT have an stronger community. I was trying to implement your script, I have TP-Link/Cisco with DD-WRT/OpenWRT but in both I had space problem (4MB ROM).
Does it still works? Which devices did you test it?
I'll try it on a MikroTik with 64MB. It might be interesting, that community posts compatible devices, and requeriments like OpenWRT with minimum 8MB.
I wanna test it and make a nice template with bootstrap (Do you have screenshots?)
Great Work!

Can't start wifidog, lost internet access on the ap

Ok, im doing everything according to the guide, but when i try to test it i get this:

root@OpenWrt:# fw3 reload
-ash: fw3: not found
root@OpenWrt:# /etc/init.d/dnsmasq restart
dnsmasq: bad option at line 39 of /etc/dnsmasq.conf (Copied the line from the guide)

root@OpenWrt:# /etc/init.d/wifidog start
Starting Wifidog ...
Testing for iptables modules
Testing ipt_mac
ipt_mac module is working
Testing ipt_mark
ipt_mark module is working
Testing ipt_REDIRECT
ipt_REDIRECT module is working
[3][Thu Feb 16 03:30:29 2017]19937 Invalid mask -ipset
OK
root@OpenWrt:# [3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -F WiFiDog_br-lan_Trusted
[3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -F WiFiDog_br-lan_Outgoing
[3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -F WiFiDog_br-lan_Incoming
[3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -X WiFiDog_br-lan_Trusted
[3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -X WiFiDog_br-lan_Outgoing
[3][Thu Feb 16 03:30:29 2017]19938 iptables command failed(1): iptables -t mangle -X WiFiDog_br-lan_Incoming
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_AuthServers
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_Outgoing
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_WIFI2Router
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_WIFI2Internet
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_Global
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -F WiFiDog_br-lan_Unknown
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_AuthServers
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_Outgoing
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_WIFI2Router
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_WIFI2Internet
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_Global
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t nat -X WiFiDog_br-lan_Unknown
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_WIFI2Internet
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_AuthServers
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_Locked
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_Global
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_Validate
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_Known
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -F WiFiDog_br-lan_Unknown
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_WIFI2Internet
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_AuthServers
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_Locked
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_Global
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_Validate
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_Known
[3][Thu Feb 16 03:30:30 2017]19938 iptables command failed(1): iptables -t filter -X WiFiDog_br-lan_Unknown
[4][Thu Feb 16 03:30:32 2017]19938 Auth server did NOT say pong!

root@OpenWrt:~# /etc/init.d/wifidog-fw-extra
-ash: /etc/init.d/wifidog-fw-extra: not found

I'm using a WR741ND V4 with OpenWrt Attitude Adjustment 12.09-rc1
Tried to install dnsmasq but failed:

root@OpenWrt:~# opkg install dnsmasq-full
Unknown package 'dnsmasq-full'.
Collected errors:<

  • opkg_install_cmd: Cannot install package dnsmasq-full.

Installed ipset separatedly:

root@OpenWrt:~# opkg install ipset
Package ipset (6.11-2) installed in root is up to date.

Added the ipset to firewall.user, and even executing the command "ipset create fb hash:ip" gives no error.
What am I doing wrong? Oh, i added a space in "FirewallRule allow to-ipset fb" to "FirewallRule allow to -ipset fb" or else i got "Invalid or unexpected keyword to-ipset, expecting "to""
Removing the "-" just changes the error from "Invalid mask -ipset" to "Invalid mask ipset"
Any help would be greatly appreciated.
Thanks in advance.

Help :)

Hello, I would like to make a facebook login but have very little experience maybe you have a video for me where it explains what i have to do exactly where and what do i need to install on the router a lot thanks in advance

Stuck on login

Hi, i'm trying to test the script but i'm already stuck on the fake login part. it returns 404. Without login the startpage is served but the fb integration is not possible for me to test right now. What could be the problem? I'm trying the fake login. that causes 404. No where in the startpage is a FB functionality visible.

DD-WRT and wifidog - I will pay some money for a fix

Hi guys, i have a tp-link 740n with 4MB flash memory. I installed dd-wrt firmware and enable wifidog with follow configuration
Wifidog is working but it does not redirect to Auth Server after connect to wireless
I can see Auth web on my server
Kindly help me to redirect to auth server after connect or open some website on browser

I tried with OpenWRT but 4MB for flash memory is not enought to install wifidog + dnsmasq-full packeges

1-ddwrt-wifidog

2-status

3-fblan

PHP 5.3 error

I get some error in PHP 5.3
line //$postid = $response->asArray()['id'];
fb_handlers.php
FB SDK need PHP 5.4 too ...

Error posting to Facebook (No nonce in form submission! (0)

Hi,

I'm trying to use your captive portal, however on the last step (../checkin?...) I always get this error.

Is there any way to fix it?
Thanks in advance

500 Internal Server Error

No nonce in form submission! (0)
#0 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(160): handle_checkin()
#1 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(143): flight\core\Dispatcher::callFunction('handle_checkin', Array)
#2 /var/www/fbwlan/include/flight/flight/Engine.php(312): flight\core\Dispatcher::execute('handle_checkin', Array)
#3 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(191): flight\Engine->_start()
#4 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(142): flight\core\Dispatcher::invokeMethod(Array, Array)
#5 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(48): flight\core\Dispatcher::execute(Array, Array)
#6 /var/www/fbwlan/include/flight/flight/Engine.php(64): flight\core\Dispatcher->run('start', Array)
#7 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(191): flight\Engine->__call('start', Array)
#8 /var/www/fbwlan/include/flight/flight/core/Dispatcher.php(191): flight\Engine->start()
#9 /var/www/fbwlan/include/flight/flight/Flight.php(65): flight\core\Dispatcher::invokeMethod(Array, Array)
#10 /var/www/fbwlan/index.php(85): Flight::__callStatic('start', Array)
#11 /var/www/fbwlan/index.php(85): Flight::start()
#12 {main}

Facebook seems to be blocked

Hello
I'm running OpenWRT on a small router and somehow I got some trouble with "ipset". Is there somehow a trick how to fix that? I saw that "dnsmasq-full" is installed properly, do I still need "dnsmasq" if I have "dnsmasq-full"?

Following error messages appear:

root@OpenWrt:~# /etc/init.d/wifidog-fw-extra restart
iptables v1.4.21: Set fb doesn't exist.

Try 'iptables -h' or 'iptables --help' for more information.

And this:

root@OpenWrt:~# fw3 reaload
Warning: Unable to locate ipset utility, disabling ipset support

How about Multigateway support ?

I have question about if we have multigateway, with check-in facebook for each location so we must create many authserver and facebook app ?
I think if we can config for each gateway have setting to change page id to check-in
config for each gate apear in maps
That so good :D i see wifidog authserver and authpuppy have that config ?

Mikrotik

Its possible uses mikrotik as router?

"FacebookRedirectLoginHelper.php" fatal error

I am trying to set up a new gateway system on Raspberry Pi. My previous auth server stays unchanged. However after I set up wifidog, etc., I get the following error when I try to auth through Facebook. My previous gateway based on openwrt was working perfectly. I am not sure if this is an issue of my set up on Raspberry Pi, or the auth server? Auth through code is working fine.

Fatal error: Cannot use object of type stdClass as array in /include/facebook-php-sdk-v4/src/Facebook/FacebookRedirectLoginHelper.php on line 192

No valid answer from the central server

After setting up fbwlan on my server (shared hosting) and installing and configuring Wifidog, the captive portal worked and my requests were intercepted. I get redirected to the fbwlan page, I enter the access code and press to connect. Then I am redirect back to http://192.168.1.1:2060/wifidog/auth?token=a352c1d3d98f33e0ab7a0209540279d8bb6c5ad0 and the following message appears.
Error: We did not get a valid answer from the central server

I then started Wifidog with wifidog -f -d 7 to get all the debugging. I found the following things that are of interest, but I am unsure where the problem lies. Could you help with this? I am interested in the techniques as well and would like to add some functionality later as well.

Maybe useful to know, the webserver uses https and I tried both wifidog configurations with sslavailable true and false.

[7][Wed Jun 21 12:48:54 2017][5284](centralserver.c:312) Level 1: Connecting to auth server wifi.schutterstoernooi.nl:80
[7][Wed Jun 21 12:48:54 2017][5284](centralserver.c:341) Level 1: Successfully connected to auth server wifi.schutterstoernooi.nl:80
[7][Wed Jun 21 12:48:54 2017][5284](centralserver.c:158) Unlocking config
[7][Wed Jun 21 12:48:54 2017][5284](centralserver.c:158) Config unlocked
[7][Wed Jun 21 12:48:54 2017][5284](centralserver.c:164) Connected to auth server
[6][Wed Jun 21 12:48:54 2017][5284](wd_util.c:116) AUTH_ONLINE status became ON
[7][Wed Jun 21 12:48:54 2017][5284](simple_http.c:77) Sending HTTP request to auth server: [GET /ping/?gw_id=default&sys_uptime=2353&sys_memfree=33488&sys_load=0.01&wifidog_uptime=1 HTTP/1.0
User-Agent: WiFiDog 1.3.0
Host: wifi.schutterstoernooi.nl

]

[7][Wed Jun 21 12:48:54 2017][5284](simple_http.c:87) Reading response
[7][Wed Jun 21 12:48:54 2017][5284](simple_http.c:111) Read 719 bytes
[7][Wed Jun 21 12:48:54 2017][5284](simple_http.c:124) HTTP Response from Server: [HTTP/1.1 301 Moved Permanently
Date: Wed, 21 Jun 2017 12:48:54 GMT
Server: Apache
Location: https://wifi.schutterstoernooi.nl/ping/?gw_id=default&sys_uptime=2353&sys_memfree=33488&sys_load=0.01&wifidog_uptime=1
Content-Length: 417
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://wifi.schutterstoernooi.nl/ping/?gw_id=default&amp;sys_uptime=2353&amp;sys_memfree=33488&amp;sys_load=0.01&amp;wifidog_uptime=1">here</a>.</p>
<hr>
<address>Apache Server at wifi.schutterstoernooi.nl Port 80</address>
</body></html>
]
[4][Wed Jun 21 12:48:54 2017][5284](ping_thread.c:191) Auth server did NOT say Pong!
[7][Wed Jun 21 12:48:54 2017][5284](firewall.c:139) Marking auth server down
[7][Wed Jun 21 12:50:54 2017][5284](simple_http.c:77) Sending HTTP request to auth server: [GET /auth/?stage=counters&ip=192.168.1.150&mac=54:ee:75:34:91:02&token=a352c1d3d98f33e0ab7a0209540279d8bb6c5ad0&incoming=0&outgoing=0&gw_id=default HTTP/1.0
User-Agent: WiFiDog 1.3.0
Host: wifi.schutterstoernooi.nl

]

[7][Wed Jun 21 12:50:54 2017][5284](simple_http.c:87) Reading response
[7][Wed Jun 21 12:50:54 2017][5284](simple_http.c:111) Read 843 bytes
[7][Wed Jun 21 12:50:54 2017][5284](simple_http.c:124) HTTP Response from Server: [HTTP/1.1 301 Moved Permanently
Date: Wed, 21 Jun 2017 12:50:54 GMT
Server: Apache
Location: https://wifi.schutterstoernooi.nl/auth/?stage=counters&ip=192.168.1.150&mac=54:ee:75:34:91:02&token=a352c1d3d98f33e0ab7a0209540279d8bb6c5ad0&incoming=0&outgoing=0&gw_id=default
Content-Length: 483
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://wifi.schutterstoernooi.nl/auth/?stage=counters&amp;ip=192.168.1.150&amp;mac=54:ee:75:34:91:02&amp;token=a352c1d3d98f33e0ab7a0209540279d8bb6c5ad0&amp;incoming=0&amp;outgoing=0&amp;gw_id=default">here</a>.</p>
<hr>
<address>Apache Server at wifi.schutterstoernooi.nl Port 80</address>
</body></html>
]
[6][Wed Jun 21 12:50:54 2017][5284](firewall.c:295) Checking client 192.168.1.150 for timeout:  Last updated 1498049385 (69 seconds ago), timeout delay 300 seconds, current time 1498049454, 
[7][Wed Jun 21 12:50:54 2017][5284](firewall.c:318) Locking client list
[7][Wed Jun 21 12:50:54 2017][5284](firewall.c:318) Client list locked
[4][Wed Jun 21 12:50:54 2017][5284](firewall.c:373) Error communicating with auth server - leaving 192.168.1.150 as-is for now

Facebook DNS not Resolved on OpenWRT Chaos Calmer

Did you test the project on a box with OpenWRT 15.05 (Chaos Calmer)??

authsrv<-->internet<-->openwrtbox<-->apwifi<-->devicewifi

Steeps:

  1. burn firmware OpenWRT 15.05 on Linksys E900
  2. opkg install ipset
  3. opkg install dnsmasq-full
  4. opkg install wifidog
  5. config wifidog authsrv (Amazon AWS VM)
  6. finish running your scripts which appends init and hotplug files
    everything works! wifi connect, redirect to AuthSrv, static CODE (gives internet connection), but when I try to connect with facebook check-out facebook dns are not resolved!

what would you do? try installing openwrt 14.07?

Update ?

Hi,

It would be useful if you could update the project and document the changes with what is not needed now. I have it working with my own authserver solution but I have to start the script /etc/init.d/wifidog-fw-start manually otherwise I never get the facebook login.

kind regards

Peter

Stuck at setting up wifidog

Hi,

I have successfully setup the facebook check-in mechanism and is redirected to the 'http://localhost:8080/wifidog/auth?token=3d22ca3d0b29bedecba8e1dfb6fxxxxxxxxxxx'. Problem is now to how to setup wifi dog auth server. Can you elaborate a little bit to how to install wifi dog auth server? Where to get the code and how to install it? I have checked out the code for wifi dog auth server and wifi dog gateway but dont know how to install it. For instance, where to setup GatewayInterface and ExternalInterface in /etc/wifidog.conf?

P.S I am using DD wrt firmware.

fb_handlers.php error

Iget a error on the fb_handlers.php because the code (fbsdk) is not updated to the latest fb sdk version it is now on v5 and youre code is trying to use it for v4.

Is it possible to change that?

(i now installed v4 but maybe it is better to use the latest sdk version)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.