You are not logged in.

#1 2022-02-13 3:06 pm

webeditor
Member
Registered: 2021-08-29
Posts: 6

asp.net code for stopforumspam API

Has anyone got, or know of an example, of asp.net code to call the API?? I want to do an automatic lookup of an IPaddress than comes in via a webform (I grab the senders IP address and at the moment I check them manually!)


I'm a bit of a beginner to external calls (I'm an ok asp.net coder).

Just want the simplest IP lookup at the moment then I can probably work out how to develp it further.


Many thanks in advance!

Offline

#2 2022-02-13 5:04 pm

Alex Kemp
Moderator
From: Nottingham, England
Registered: 2009-12-02
Posts: 2,423
Website

Re: asp.net code for stopforumspam API

Hi webeditor, welcome to SFS.

I cannot help you with asp.net (I work FOSS only). Look at this topic to find "sfsdiag.zip" (to help test your system for effective access) + the API Usage page for examples of how-to-access. Once you have it working, come back to this page & post some examples of asp code to help others. You are going to have to be the leader in this, I am afraid.

One piece of advice:-
Make sure that you cache all results & (for best) deal with new users at login only. If you do NOT implement & follow these sorts of guidelines then, inevitably, your auto-API searches will represent an intolerable burden on our site & your IP will go into the site Firewall as a permanent block.

Please do not take this advice in the wrong way. In the past we have had thousands of folks simultaneously effectively attempting to use SFS as their firewall. That behaviour represented a DDOS attack towards SFS & it quickly brought this site to it's knees. We now have a zero-tolerance policy towards such behaviour & act without warning to protect our service.

Offline

#3 2022-02-14 9:38 am

webeditor
Member
Registered: 2021-08-29
Posts: 6

Re: asp.net code for stopforumspam API

Thanks Alex,

The check I am considering would be low impact on the stopforumspam service as I would only be testing "New" forum registrations, not every login.

We only get around 6-8 requests per month and I'll run one check on each. If the IP address they used is flagged as known, I'll see if I can auto-update sfs with the latest attempt to keep the records updated. Saturday we saw two requests and both from the same "person" .. what rang alarm bells was they tried to use a membership number that didn't link to them and also the "justification" comments were a single "0". The fact they were within seconds of each other also suggested a spam attempt.

My initial attempt at an aspx/.NET routine partially worked .. I can send over an api check with an ip address and get a result back. I now need to work out how to interpret the result automatically to extract the important field(s). Once complete I'll find a way to get it to the forum .. with a caveat that my coding isn't world-class! :-)

Offline

#4 2022-02-14 2:12 pm

Alex Kemp
Moderator
From: Nottingham, England
Registered: 2009-12-02
Posts: 2,423
Website

Re: asp.net code for stopforumspam API

webeditor wrote:

If the IP address they used is flagged as known, I'll see if I can auto-update sfs with the latest attempt to keep the records updated.

No you will not.

To report a user to SFS the basic stipulation is that they have spammed your forum. On what basis is "making a request for a new forum registration" an attempt to spam your forum? Reporting such an act as spamming would be to pollute our database & eventually would render it worthless. We regard such acts as hostile & place such reporters in the Firewall.

You have every right to reject potential new users because they exist within the SFS database. You can only report users in to the database if you catch them spamming your service. Trying to signup is NOT an act of spamming. What you are thinking of doing is the exact opposite of helpful.

Further, relying solely on the IP Address as a means to ID a spammer is foolish. It is rare these days for an IPv4 Address to be assigned to a single user. ISPs tend to use NAT to assign & reassign the same IP to multiple users, often dozens, scores or hundreds of different users even in the same day.

I would certainly advocate building local lists of toxic ASN & using your firewall to reject all attempted accesses from any IP within that ASN. However, that is to reduce general abuse rather than just forum spam. If you wish to identify spammers then I would suggest to use email addresses (if you wish to use a single source for ID) or two or more of email, IP address & username (in that order, as a blend) to ID known spammers. Obviously, search only on signup request for the latter & maintain local caches with timed clear-outs.

Offline

#5 2022-02-14 4:25 pm

webeditor
Member
Registered: 2021-08-29
Posts: 6

Re: asp.net code for stopforumspam API

Personally Id prefer them not to even get a chance to spam ... the just adds to the work forum admins/moderators already do ... but I accept what you are saying.

But if I can explain: the IP address I found yesterday in two registration attempts has been reported on sfs 12 times in the last two months. Of those 7 are using what is deemed a "toxic email domain" ... the same domain used by my "potential spammer" ... so all I would be doing is adding to the list of email variations that are being used ... no doubt it will turn up at some point in the future on another forum ..

But if that is outside the remit, then I'll leave it as is and rely on my forums IP blocker to keep them at bay.

Offline

Board footer

Powered by FluxBB

Close
Close