Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Stop remote posting

Reply
Thread Tools

Stop remote posting

 
 
Don Grover
Guest
Posts: n/a
 
      01-13-2004
How can I stop some one from trying to post my form from a remote site.
I am getting some one cycling through usernames trying fpr passwords on a
web site.
Don


 
Reply With Quote
 
 
 
 
Manohar Kamath [MVP]
Guest
Posts: n/a
 
      01-13-2004
You can block a range of IP addresses using the IIS administrator. For as
page level access goes, retrieve the user's IP address, and see if the IP
falls within the range, only then let the user through.

Request.ServerVariables("REMOTE_ADDR")

will give your the IP address of the client.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com


"Don Grover" <> wrote in message
news:...
> How can I stop some one from trying to post my form from a remote site.
> I am getting some one cycling through usernames trying fpr passwords on a
> web site.
> Don
>
>



 
Reply With Quote
 
 
 
 
Bill
Guest
Posts: n/a
 
      01-13-2004
"Don Grover" <> wrote in message
news:...
> How can I stop some one from trying to post my form from a remote site.
> I am getting some one cycling through usernames trying fpr passwords on a
> web site.
> Don
>
>


do an HTTP Referrer check from your login, to make sure the source of the
login attempt is from your website. If the source is not from your website,
it IS an intrusion, do not allow the login and ban their IP address for one
day.




 
Reply With Quote
 
Brynn
Guest
Posts: n/a
 
      01-14-2004

<%
Dim yourDomain, theReferer
yourDomain = "http://www.yourdomain.com/"
theReferer = Request.ServerVariables("HTTP_REFERER")
theReferer = left(theReferer, len(yourDomain))

If Not yourDomain = theReferer Then
Response.Redirect("/niceTryBuddy.asp")
%>


the reason for left in the referer instead of using somthing like
instr() is an instr statement could still be beat with an entry in the
querystring to satisfy it.

Brynn
www.coolpier.com

On Tue, 13 Jan 2004 16:02:22 -0500, "Bill" <>
wrote:

>"Don Grover" <> wrote in message
>news:...
>> How can I stop some one from trying to post my form from a remote site.
>> I am getting some one cycling through usernames trying fpr passwords on a
>> web site.
>> Don
>>
>>

>
>do an HTTP Referrer check from your login, to make sure the source of the
>login attempt is from your website. If the source is not from your website,
>it IS an intrusion, do not allow the login and ban their IP address for one
>day.
>
>
>
>


I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com
 
Reply With Quote
 
Brynn
Guest
Posts: n/a
 
      01-14-2004

On your post page ... even easier than my other post

<%
Dim yourDomain, theReferer
yourDomain = "http://" & Request.ServerVariables("HTTP_HOST")
theReferer = Request.ServerVariables("HTTP_REFERER")
theReferer = left(theReferer, len(yourDomain))

If Not yourDomain = theReferer Then
Response.Redirect("/niceTryBuddy.asp")
%>

put this at the top of any page that you want to protect from remote
submit ... no changes required in above.

Brynn
www.coolpier.com





On Wed, 14 Jan 2004 07:51:25 +1100, "Don Grover"
<> wrote:

>How can I stop some one from trying to post my form from a remote site.
>I am getting some one cycling through usernames trying fpr passwords on a
>web site.
>Don
>
>


I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com
 
Reply With Quote
 
Brynn
Guest
Posts: n/a
 
      01-14-2004

Except for the change of the /niceTryBuddy.asp page ... lol.

I just redirect them to my home page ... or off the site completely.

I suggest the follwing url

http://www.fun-greetings-jokes.com/g/hkr.htm





On Wed, 14 Jan 2004 03:44:06 GMT, (Brynn) wrote:

>
>On your post page ... even easier than my other post
>
><%
>Dim yourDomain, theReferer
> yourDomain = "http://" & Request.ServerVariables("HTTP_HOST")
> theReferer = Request.ServerVariables("HTTP_REFERER")
> theReferer = left(theReferer, len(yourDomain))
>
>If Not yourDomain = theReferer Then
>Response.Redirect("/niceTryBuddy.asp")
>%>
>
>put this at the top of any page that you want to protect from remote
>submit ... no changes required in above.
>
>Brynn
>www.coolpier.com
>
>
>
>
>
>On Wed, 14 Jan 2004 07:51:25 +1100, "Don Grover"
><> wrote:
>
>>How can I stop some one from trying to post my form from a remote site.
>>I am getting some one cycling through usernames trying fpr passwords on a
>>web site.
>>Don
>>
>>

>
>I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!
>
>Brynn
>www.coolpier.com


I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com
 
Reply With Quote
 
Bill
Guest
Posts: n/a
 
      01-15-2004
There's one problem with that - what if they access your site from
http://yourdomain.com ?

I suggest the following:

<%
Dim yourDomain, theReferer, theLen
yourDomain = "http://www.yourdomain.com"
theLen = len(yourDomain) - len("http://www.")
theReferer = Request.ServerVariables("HTTP_REFERER")
theReferer = RIGHT( left(theReferer, len(yourDomain)) , theLen )
....etc...






"Brynn" <> wrote in message
news:...
>
> <%
> Dim yourDomain, theReferer
> yourDomain = "http://www.yourdomain.com/"
> theReferer = Request.ServerVariables("HTTP_REFERER")
> theReferer = left(theReferer, len(yourDomain))
>
> If Not yourDomain = theReferer Then
> Response.Redirect("/niceTryBuddy.asp")
> %>
>
>
> the reason for left in the referer instead of using somthing like
> instr() is an instr statement could still be beat with an entry in the
> querystring to satisfy it.
>
> Brynn
> www.coolpier.com
>
> On Tue, 13 Jan 2004 16:02:22 -0500, "Bill" <>
> wrote:
>
> >"Don Grover" <> wrote in message
> >news:...
> >> How can I stop some one from trying to post my form from a remote site.
> >> I am getting some one cycling through usernames trying fpr passwords on

a
> >> web site.
> >> Don
> >>
> >>

> >
> >do an HTTP Referrer check from your login, to make sure the source of the
> >login attempt is from your website. If the source is not from your

website,
> >it IS an intrusion, do not allow the login and ban their IP address for

one
> >day.
> >
> >
> >
> >

>
> I participate in the group to help give examples of code. I do not

guarantee the effects of any code posted. Test all code before use!
>
> Brynn
> www.coolpier.com



 
Reply With Quote
 
Brynn
Guest
Posts: n/a
 
      01-16-2004

Checkout my other post on in this thread ... I placed some code that
won't care what site, etc ...


On Wed, 14 Jan 2004 22:26:47 -0500, "Bill" <>
wrote:

>There's one problem with that - what if they access your site from
>http://yourdomain.com ?
>
>I suggest the following:
>
><%
>Dim yourDomain, theReferer, theLen
>yourDomain = "http://www.yourdomain.com"
>theLen = len(yourDomain) - len("http://www.")
>theReferer = Request.ServerVariables("HTTP_REFERER")
>theReferer = RIGHT( left(theReferer, len(yourDomain)) , theLen )
>...etc...
>
>
>
>
>
>
>"Brynn" <> wrote in message
>news:.. .
>>
>> <%
>> Dim yourDomain, theReferer
>> yourDomain = "http://www.yourdomain.com/"
>> theReferer = Request.ServerVariables("HTTP_REFERER")
>> theReferer = left(theReferer, len(yourDomain))
>>
>> If Not yourDomain = theReferer Then
>> Response.Redirect("/niceTryBuddy.asp")
>> %>
>>
>>
>> the reason for left in the referer instead of using somthing like
>> instr() is an instr statement could still be beat with an entry in the
>> querystring to satisfy it.
>>
>> Brynn
>> www.coolpier.com
>>
>> On Tue, 13 Jan 2004 16:02:22 -0500, "Bill" <>
>> wrote:
>>
>> >"Don Grover" <> wrote in message
>> >news:...
>> >> How can I stop some one from trying to post my form from a remote site.
>> >> I am getting some one cycling through usernames trying fpr passwords on

>a
>> >> web site.
>> >> Don
>> >>
>> >>
>> >
>> >do an HTTP Referrer check from your login, to make sure the source of the
>> >login attempt is from your website. If the source is not from your

>website,
>> >it IS an intrusion, do not allow the login and ban their IP address for

>one
>> >day.
>> >
>> >
>> >
>> >

>>
>> I participate in the group to help give examples of code. I do not

>guarantee the effects of any code posted. Test all code before use!
>>
>> Brynn
>> www.coolpier.com

>
>


I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URL Posting Fails in Medium Trust (3rd time posting this w/ zero replies so far) AmitKu ASP .Net 7 01-08-2007 07:31 PM
CROSS-POSTING, OR MULTI-POSTING, OR NEITHER? Colin D Digital Photography 56 03-08-2006 08:31 PM
Top Posting vs. Bottom Posting scaredkitty Computer Support 37 04-06-2005 12:27 AM
Remote Assistance fails to connect, remote remote host name could not be resolved Peter Sale Wireless Networking 1 12-11-2004 09:09 PM
Everytime I hover cursro over a posting, it crosses out with red mark on it.. on every posting alanb ASP .Net 2 04-23-2004 02:23 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57