Hey perlmonks, I finally brought myself to make an account on here as I use it every day. I'm pretty new to perl so please excuse how fail my code is :)
Well anyway I'm working on a tool for my pentests, just to quickly scan url's for cross site scripting vulnerabilities.
It just grabs a list of urls and uses LWP to load it with the XSS payload attached. If the payload is returned on the page without any encoding or filtering it will print out "site is vulnerable".
But I'm getting this wierd error when I run it.Can anyone help me? Here's the codeUnsuccessful open on filename containing newline at
#!/usr/bin/perl -w use LWP::UserAgent; my $ua = LWP::UserAgent->new(); my $payload = "\"/><h1>XSS</h1>"; my $html; print "list --> "; my $list = <>; open(URLS, $list); my @list = <URLS>; close(URLS); foreach $url(@list) { $html = $ua->get($url.$payload); $html = $html->decoded_content; if($html =~ m/\<h1\>XSS\<\/h1\>/i) { print "$url is vulnerable\n"; } }
In reply to Pentesting tool by Sketch-
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |