Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: the multiple thread port scanner scripts issue

by roboticus (Chancellor)
on Jan 26, 2013 at 14:34 UTC ( #1015493=note: print w/replies, xml ) Need Help??

in reply to the multiple thread port scanner scripts issue


The reason that the date isn't being updated in your database is because you're not telling it to do so. I'd change your update statement from:

my $upd_sth = $dbh->prepare("update psinfo set port=\'$myport\' where +domainname=\'$line\'"); $upd_sth->execute() or die "unable to execute update line where name i +s $line! error $DBI::errstr";

to something like this:

my $upd_sth = $dbh->prepare(q{ update psinfo set port=?, last_checked=getdate() where domainname=? }); $upd_sth->execute($myport, $line) or die "unable to update: name=$line! error\n$DBI::errstr\n";

Note: I don't recall the method to get the current date/time in MSSQL, so I just guessed. I also converted your code to use placeholders, because:

  • they're safer,
  • they're easy to use
  • they make the SQL more readable (in my opinion)

I'm sorry, but I can't quite make out all of your question, nor can I make much sense from your code, so that's about all I can offer for now.


When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: the multiple thread port scanner scripts issue
by jeremy.fang (Initiate) on Jan 28, 2013 at 07:13 UTC
    thanks your reply
    can you added the thread into the scripts

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015493]
[1nickt]: the tick that can make you a vegetarian
[perldigious]: Your Mother: Yeah, I have a tool for ticks that I use (mostly on my dogs thankfully), but it's just a cheapo one I got from my vets office... it works pretty good though.
erix saw a tick in a natural history museum collected from the scrotum of the curator (it was removed)
[Your Mother]: The exhibit, the tick, or the scrotum?
[erix]: (the man is even a paleontologist )
[1nickt]: erix unfortunately that's there favourite spot. That's why they are usually spotted crawling *up* your leg.
[erix]: ha, the tick and, as it happens, also the curator (now a professor of Paleont.)
[1nickt]: s/there/their/, ugh sorry.
[Your Mother]: Heh. The only one I ever had on me, I caught on my shin, headed north.
erix looks nervously I got away cleanly from my run , it seems :)

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (12)
As of 2017-05-24 13:14 GMT
Find Nodes?
    Voting Booth?