Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: (nrd) CGI frontend for mySQL

by newrisedesigns (Curate)
on Feb 28, 2003 at 16:56 UTC ( #239478=note: print w/replies, xml ) Need Help??

in reply to CGI frontend for mySQL

This might be just my paranoia, but if I were you, I wouldn't let anyone but you have access to it.

use DBI; print "Content-type: text/html\n\n"; if($ENV{REMOTE_ADDR} ne ''){ #your IP exit; }

Of course, if you don't have a static IP, you can't do this.

John J Reiser

Replies are listed 'Best First'.
Re: Re: (nrd) CGI frontend for mySQL
by jonadab (Parson) on Feb 28, 2003 at 18:29 UTC
    Of course, if you don't have a static IP, you can't do this.

    You can, it's just more involved. First, you have to signup for dynamic DNS service (e.g., with dyndns), then set up your system to automatically update that whenever your IP changes. Then the script has to resolve your dynamic DNS into its current IP and compare that against $ENV{REMOTE_ADDR}. This opens up in theory a window for someone who has your IP after your connection dies and is terminated and before you reconnect and update your dynamic DNS record. In practice, if you don't have a static IP that probably means you get your IP via DHCP from your ISP, so that a potential attacker would not only have to use your same ISP but also would not have any way to arrange to have your IP right after you disconnect; the most he could do (without 0wning your ISP's DHCP server at least) would be to monitor your dynamic DNS address via ping to know when you disconnect, and immediately redial just hoping to get the IP you just released. After enough tries he might get it, in theory. But that's less risk than an easily-guessed password.

    for(unpack("C*",'GGGG?GGGG?O__\?WccW?{GCw?Wcc{?Wcc~?Wcc{?~cc' .'W?')){$j=$_-63;++$a;for$p(0..7){$h[$p][$a]=$j%2;$j/=2}}for$ p(0..7){for$a(1..45){$_=($h[$p-1][$a])?'#':' ';print}print$/}

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://239478]
[Corion]: In a way, it's sad that Firefox kills off the add-on functionality... But, as n-gate usually writes, "Firefox tries to be more like Chrome"
[holli]: it's not always possible to do a complete rewrite without cutting off some pigtails
[Discipulus]: indeed! new firefox seems poorer: many tab crash, and you open this link in FF?
[Discipulus]: problem scrolling even main page..;=(
[LanX]: holli -> Good Intentions: Wikisyntax for the Monastery
[LanX]: monklinks are automatically converted ...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2017-11-20 19:05 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (291 votes). Check out past polls.