Date: Tue, 09 Jan 2007 15:51:04 +0000 From: Vince <jhary@unsane.co.uk> To: linux quest <linuxquest7570@yahoo.com>, Freebsd Questions <freebsd-questions@freebsd.org> Subject: Re: NMap Installation Problem - Thanks for the coding help :) Message-ID: <45A3B9E8.1070803@unsane.co.uk> In-Reply-To: <864708.55036.qm@web59209.mail.re1.yahoo.com> References: <864708.55036.qm@web59209.mail.re1.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hmm you shouldnt have a /usr/local/bin/nmap/ directory. whats the output of ls -l /usr/local/bin/nmap if it is a directory delete the directory, then try cd /usr/ports/security/nmap make deinstall clean make install clean which nmap cheers, Vince linux quest wrote: > Hi Vince, > > Thanks for the automated emailing code guide. However, after running > nmap for some time, I have got problem running a simple command of nmap > ... like > > nmap 192.168.1.2 > nmap: Command not found > > I think there is something wrong with my installation procedures. I type > in "make install clean" command in /usr/local/bin/nmap and > /usr/ports/security/nmap - but somehow I still see the command not found. > > I have also typed in "make deinstall clean" on both of the directory > location, restart the OS, and install everything again using the "make > install clean" command (on both of the directory location) - but I still > receive the same "nmap: Command not found" message. > > Thanks for the help :) > > Regards, > Linux Quest > > */Vince <jhary@unsane.co.uk>/* wrote: > > linux quest wrote: > > I am currently doing a simple penetration testing for my company > in a LAN environment. Yes, I have already downloaded NMap by using > the 'make install' command... and it did fetched the required files > from insecure.org successfully. > > > > My question will be, how can I create a Network Program in .c that > will invoke the > nmap capabilities to scan the network or computers? Example, lets say, I > want an automated nmap scan to run on FreeBSD to scan 192.168.1.10 and > 192.168.1.11 , every morning at 10am - may I know how do I achieve that? > I hope someone can show me a simple coding to invoke nmap scan, > thanks :) > > > you dont really need c for this, a simple shell script run from cron > would do fine. > something like > ===========start============== > #!/bin/sh > > TARGETS="192.168.1.10 192.168.1.11" > NMAP="/usr/local/bin/nmap" > NMAPOPTIONS="" > RECEPIENTS="someone@somewhere.com" > SUBJECT="namp scan results" > > $NMAP $NMAPOPTIONS $TARGETS | /usr/bin/mail -s "$SUBJECT" $RECEPIENTS > ===========end================= > save that somewhere and remember to chmod it to be executable > > > > add a line like > 1 10 * * * /path/to/script > > to the appropriate users crontab > (change /path/to/script to the location of the script) > > and you should get the output emailed to you every morning. > > Vince > > Thanks :) > > > > Regards, > > Linux Quest > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45A3B9E8.1070803>