I am running a script to scan my website for vulnerabilities, when it finds them I want it to print the page, then continue, so it is running a while statement.
I don't run it in a browser, I run it in shell:
perl scanSite.cgi shell=1 dir=pathToStart
So the script runs for 1 hundred thousand scans, always looking for vulnerabilities and sleeping 1 second in between, I have it print a period every 1 minute so that I know it is still running and when it finds something that matches what I have it looking for on the page, it prints the url and what it found.
The problem is the print commands do not print anything, no periods or anything, but if I put a exit command in then it prints everything all at one time.
What I want it to do is print stuff as it comes across the print command and not wait until the script is done with everything and comes across the exit command.
Is there a perl command to have it print the output as it comes across it and not wait until the script is done?
Thanks,
Richard
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.