#/usr/bin/perl use warnings; use strict; use File::Copy; #enter here the path of your nmap! my $pathofnmap = "C:/Programmi/nmap-4.03"; #don't change :) my $mi = (localtime)[1]; #set in minute the gap between every scan my $gap=1; #don't change :) my $mid; increm(); ################################################## print "Your personal namp executor\n"; print "\n"; print " LordScinawa ;)\n"; ################################################## sub increm { $mid = ($mi + $gap) % 60; } sub meinz{ while(1) { sleep 1; $mi = (localtime)[1]; if ($mi >= $mid) { print"$mi, $mid\n"; increm(); esegui(); } } } sub esegui { chdir "$pathofnmap"; if (open(NMAP, "nmap.exe -sS -P0 -S 127.0.0.1 -f -vv -O 80.104.113 +.95 |")){ chdir "C:/Documents and Settings/Wxp/Documenti/pubz"; if (open CAC, "+>", "cache.html") { print"opened cache\n"; while (<NMAP>) { print"nmap!!\n"; if (/\n/) {print (CAC "$_<br>\n");} else {die "omfg";} } close CAC; my $filetobecopied = "cache.html."; my $newfile = "nmapresult.html."; copy($filetobecopied, $newfile) or die "File cannot be copied."; print"copiati\n"; } else { die "Impossibile aprire/creare il file +di cache $! \n"}; close NMAP;} else {die "Impossibile aprire Nmap $!\n"}} meinz();

In reply to ypne by LordScinawa

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.