Which asp file has restricted domestic IPs? If available, you can add up to 200 points.

Updated on technology 2024-02-09
11 answers
  1. Anonymous users2024-02-05

    The asp source ** is as follows.

    ip="remote_addr")

    iscnip=false

    ipnum=ip2num(ip)

    set fso="")

    set adminipfile=""),1,true)if not then adminip=set adminipfile=nothingset file=""))

    do while not

    ipline=

    minandmax=split(ipline,"-")minip=ip2num(minandmax(0))maxip=ip2num(minandmax(1))if ipnum>=minip and ipnum<=maxip then

    iscnip=true

    exit do

    end if

    loopset file=nothing

    set fso=nothing

    if ip=adminip then iscnip=falseif iscnip then

    Prohibition of Access"end if

    function ip2num(strip)strarray=split(strip,".")for i=0 to 3

    strarray(i)=int(strarray(i))next resultnum=""

    for i=0 to 3

    next ip2num=resultnumend function

    Content in Effect:

    ip="remote_addr")

    set fso="")

    set file=""),2)

    ipset file=nothing

    set fso=nothing

    Put it in the same directory, change the file name to be a little more complicated, store it in a bookmark, and just access this file when you log in.

  2. Anonymous users2024-02-04

    There is a global IP allocation table on the Internet, and the global IP allocation table is used as a library. Then, when a client accesses, it gets the IP address of the client and queries it in the database. If it is found, a specific error page is returned.

  3. Anonymous users2024-02-03

    100 points to buy a commercial app, it's worth it.

  4. Anonymous users2024-02-02

    Create a main page under the root directory.

    This webpage is used to determine which number segment the IP address belongs to and then redirect.

    The abbreviation of ASP is as follows.

    userip obtains the IP address of the user

    userip="remote_addr"If (the number segment that determines the userIP condition) then you will jump to if it is satisfied.

    else meets the requirements and jumps to.

    end if

  5. Anonymous users2024-02-01

    Determine the IP address of the accessing customer, if it is a domestic IP, prohibit access, is this feasible?

  6. Anonymous users2024-01-31

    You can set the access range of an IP address.

  7. Anonymous users2024-01-30

    The acquisition of the real IP should be like this:

    ip = "http_x_forwarded_for")

    if ip = then

    ip="remote_addr")

    end if

    if instr(ip,"'0 then

    ip=""end if

    In this way, you can break through the **IP to view the real IP. Rather than simply using an ip=

    remote_addr")。In this way, if people use **, they can only get the IP of the service game shouter.

    We know that the IP format looks like this:

    Each bit is 0 to 255. So, we can convert any IP into a number of ipnums

    asp formula:

    ip=""arr=split(ip,".

    ipnums=int(arr(0))*16777216+int(arr(1))*65536+int(arr(2))*256+int(arr(3))-1

    ipnums

    The result obtained in this way is unique, and the relationship between the size of the hunger and the size of the IP is the same.

    When comparing IPs, directly compare the size of IPNUMS to determine whether it is within the IP segment you need.

    For example, the first IP segment in the school is like this:

    Post: 2886729728 - 2886926333

    Existing private IP address: 2886820963 after conversion

    You can know 2886729728<2886820963<2886926333

    Therefore, you can know that this IP is in the intranet, so you can jump to it.

    ip = "http_x_forwarded_for"Rotten) This sentence, if you use **IP to surf the Internet, this will get the real IP through **. But if you don't use **, you'll get a null value. Therefore, the following is to judge whether the obtained IP is used**:

    if ip = then ip="remote_addr"end if if it is not used, then ip="http_x_forwarded_for"If the value is empty, ip= is used"remote_addr") to get the real IP.

    Let's talk more about the first part. ip = "http_x_forwarded_for") if ip = then ip="remote_addr") end if if instr(ip,"'0 then ip="" end if

    If the IP contains a symbol', the IP is if instr(IP,"'0 then ip=""end if This method is mainly to determine the canonical IP, so that split(ip,".You can't go wrong under any circumstances.

  8. Anonymous users2024-01-29

    I sent you an email.

    Remember to give me a grade. I'm tired.

  9. Anonymous users2024-01-28

    I was blocked with the Safe Dog blacklist. I don't know what kind of way you want to use to block domestic IPs, whether it's firewall blocking or **program blocking.

    Times Connect will answer your questions by copying the translation results of Google Translate.

  10. Anonymous users2024-01-27

    <%str0 = "remote_addr")str1=left(str0,9)

    if (str1>="**.

    and str1<="**.

    or str1="**.

    or str1="**.

    or (str0>="**.

    " and str0<="**.

    *") or (str0>="**.

    " and str0<="**.

    *") or str0="**.

    " then

    <%else

    "")"Non-unit users, access is prohibited! ")

    end if

    The above is allowed, and the following paragraph is <% of the limit

    dim badip

    badip="remote_host")

    if badip="**.

    or badip="***

    " or badip="***

    *" then

    end if

  11. Anonymous users2024-01-26

    I'll show you the function, just use it.

    function getip()

    dim dulip,proip

    dulip="http_x_forwarded_for")proip="remote_addr")

    if dulip="" then

    getip=proip

    elsegetip=dulip

    end if

    end function

Related questions