• Geo Blocking Script

    From Mortifis@1:103/705 to All on Sat Nov 16 11:40:50 2019
    I am sure there are better ways to do this, however, I threw together a quick script that allows for Geo Blocking by Country. For me, it has already cut down on a significant number of 'fake login attempts'. The script can be evoked by simply calling it from within other scripts, ie: login.js

    the script can be found at http://alleycat.synchro.net:81/dls/coob.js ... simply copy/paste the code and save it as coob.js in /sbbs/exec/load

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Gamgee@1:103/705 to Mortifis on Sat Nov 16 13:50:00 2019
    Mortifis wrote to All <=-

    I am sure there are better ways to do this, however, I threw
    together a quick script that allows for Geo Blocking by Country.
    For me, it has already cut down on a significant number of 'fake
    login attempts'. The script can be evoked by simply calling it
    from within other scripts, ie: login.js

    the script can be found at
    http://alleycat.synchro.net:81/dls/coob.js ... simply copy/paste
    the code and save it as coob.js in /sbbs/exec/load

    Getting a 404-not found at that address...



    ... Nothing is so smiple that it can't get screwed up.
    --- MultiMail/Linux v0.52
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Mortifis@1:103/705 to Gamgee on Sun Nov 17 11:17:17 2019
    Mortifis wrote to All <=-

    I am sure there are better ways to do this, however, I threw
    together a quick script that allows for Geo Blocking by Country.
    For me, it has already cut down on a significant number of 'fake
    login attempts'. The script can be evoked by simply calling it
    from within other scripts, ie: login.js

    the script can be found at
    http://alleycat.synchro.net:81/dls/coob.js ... simply copy/paste
    the code and save it as coob.js in /sbbs/exec/load

    Getting a 404-not found at that address...

    Sorry, I had it as a zip but I extracted it, it should work now

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Richard Williamson@1:103/705 to Mortifis on Sun Nov 17 13:13:34 2019
    keeps yelling about an api key

    ---
    þ Synchronet þ Richard's Fun House BBS | http://richardf.ddns.net
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Mortifis@1:103/705 to Richard Williamson on Sun Nov 17 16:30:10 2019
    keeps yelling about an api key

    That's geoip.js, it works without one but it says "You should get an API key from ... " follow the link in the log message ... the key is free :-)

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Gamgee@1:103/705 to Mortifis on Sun Nov 17 13:20:00 2019
    Mortifis wrote to Gamgee <=-

    Mortifis wrote to All <=-

    I am sure there are better ways to do this, however, I threw
    together a quick script that allows for Geo Blocking by Country.
    For me, it has already cut down on a significant number of 'fake
    login attempts'. The script can be evoked by simply calling it
    from within other scripts, ie: login.js

    the script can be found at
    http://alleycat.synchro.net:81/dls/coob.js ... simply copy/paste
    the code and save it as coob.js in /sbbs/exec/load

    Getting a 404-not found at that address...

    Sorry, I had it as a zip but I extracted it, it should work now

    Yep, got it now. Gonna take a look, thanks!



    ... A woman drove me to drink, and I never had the courtesy to thank her.
    --- MultiMail/Linux v0.52
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Richard Williamson@1:103/705 to Gamgee on Sun Nov 17 18:53:06 2019
    lol got a key... still yelled at me , erased the log from the geoip.js

    ---
    þ Synchronet þ Richard's Fun House BBS | http://richardf.ddns.net
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Richard Williamson@1:103/705 to Gamgee on Sun Nov 17 19:01:04 2019
    love it, right when i added it started blocking china ip's

    ---
    þ Synchronet þ Richard's Fun House BBS | http://richardf.ddns.net
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Richard Williamson@1:103/705 to Mortifis on Sun Nov 17 21:31:52 2019
    That's geoip.js, it works without one but it says "You should get an API key from ... " follow the link in the log message ... the key is free :-)

    ---
    ¨ Synchronet ¨ AlleyCat! BBS - http://alleycat.synchro.net:81


    so why does it repeat it self 3 times

    Nov 17 21:23:04 richard-HP-6360t synchronet: term Node 3 COOB v0.1 Validating Country Code BR Nov 17 21:23:04 richard-HP-6360t synchronet: term Node 3 Reading COOB for BR...
    Nov 17 21:23:04 richard-HP-6360t synchronet: term Node 3 Country BR Blocked
    Nov 17 21:23:04 richard-HP-6360t synchronet: term Node 3 disconnected
    Nov 17 21:23:05 richard-HP-6360t synchronet: term Node 3 COOB v0.1 Validating Country Code BR Nov 17 21:23:05 richard-HP-6360t synchronet: term Node 3 Reading COOB for BR...
    Nov 17 21:23:05 richard-HP-6360t synchronet: term Node 3 Country BR Blocked
    Nov 17 21:23:05 richard-HP-6360t synchronet: term Node 3 Access Denied ... Hanging Up! Nov 17 21:23:05 richard-HP-6360t synchronet: term Node 3
    Nov 17 21:23:07 richard-HP-6360t synchronet: term Node 3 COOB v0.1 Validating Country Code BR Nov 17 21:23:07 richard-HP-6360t synchronet: term Node 3 Reading COOB for BR...
    Nov 17 21:23:07 richard-HP-6360t synchronet: term Node 3 Country BR Blocked
    Nov 17 21:23:07 richard-HP-6360t synchronet: term Node 3 Access Denied ... Hanging Up! Nov 17 21:23:07 richard-HP-6360t synchronet: term Node 3
    Nov 17 21:23:07 richard-HP-6360t synchronet: term Node 3 !JavaScript warning /sbbs/exec/load/modopts.js line 34: Disconnected

    ---
    þ Synchronet þ Richard's Fun House BBS | http://richardf.ddns.net
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Gamgee@1:103/705 to Richard Williamson on Sun Nov 17 21:32:00 2019
    Richard Williamson wrote to Gamgee <=-

    lol got a key... still yelled at me , erased the log from the
    geoip.js

    What? I have no idea what you're talking about, or why you're
    replying to me.



    ... So easy, a child could do it. Child sold separately.
    --- MultiMail/Linux v0.52
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Gamgee@1:103/705 to Richard Williamson on Sun Nov 17 21:32:00 2019
    Richard Williamson wrote to Gamgee <=-

    love it, right when i added it started blocking china ip's

    What? I have no idea what you're talking about, or why you're
    replying to me.



    ... So easy, a child could do it. Child sold separately.
    --- MultiMail/Linux v0.52
    þ Synchronet þ Palantir BBS * palantirbbs.ddns.net * Pensacola, FL
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Mortifis@1:103/705 to Richard Williamson on Mon Nov 18 10:32:13 2019
    That's geoip.js, it works without one but it says "You should get an API key from ... " follow the link in the log message ... the key is free
    :-)

    ---
    ­ Synchronet ­ AlleyCat! BBS - http://alleycat.synchro.net:81


    so why does it repeat it self 3 times

    I am guessing because it is inside a for loop in login.js. Try moving "load('coob.js');" in login.js to just before for(var c=0; c < options.login_prompts; c++) { ... } and see if that quiets it down ... I will add a 'quit = true' to modopts.ini if you'd like.

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Richard Williamson@1:103/705 to Mortifis on Mon Nov 18 11:43:38 2019
    I am guessing because it is inside a for loop in login.js. Try moving "load('coob.js');" in login.js to just before for(var c=0; c < options.login_prompts; c++) { ... } and see if that quiets it down ... I
    will
    add a 'quit = true' to modopts.ini if you'd like.

    ---
    ¨ Synchronet ¨ AlleyCat! BBS - http://alleycat.synchro.net:81


    That worked

    ---
    þ Synchronet þ Richard's Fun House BBS | http://richardf.ddns.net
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Mortifis@1:103/705 to Richard Williamson on Mon Nov 18 14:51:32 2019
    I am guessing because it is inside a for loop in login.js. Try moving "load('coob.js');" in login.js to just before for(var c=0; c < options.login_prompts; c++) { ... } and see if that quiets it down ... I will add a 'quit = true' to modopts.ini if you'd like.

    ---
    ­ Synchronet ­ AlleyCat! BBS - http://alleycat.synchro.net:81


    That worked


    Great! I updated the coob.js script a tad; added quiet = true/false to modopts.ini as well as an if(!block.quiet) log(...) as well as a proper exit();

    The updated script is still where it was http://alleycat.synchro.net:81/dls/coob.js if you're interested. Thanks for trying it out, I hope it is of use!

    ~Mortifis

    ---
    þ Synchronet þ AlleyCat! BBS - http://alleycat.synchro.net:81
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)