On Fri, Mar 19, 2004 at 01:15:56PM -0500, Skill2Die4 wrote: > I am coding a nasl_script which requests for a webpage and then tries to > gain the IP-address information. > > The returned page is like :: > ================================================ > <div align=right><font color=#000000><b><font size=2 face=Arial>IP > Address </font></b></font></div> > </td> > <td width=78% height=25><font size=2 face=Arial> > 192.168.2.1 > </font></td> > <td width=22% height=25> > > <div align=right><font color=#000000><b><font face=Arial size=2>Subnet > Mask </font></b></font></div> > </td> > <td width=78% height=25><font size=2 face=Arial> > 255.255.255.0 > </font></td> > =============================================== > > As you see , [0-9]+.[0-9]+.[0-9]+.[0-9]+ wont work here as it comes > many times on the page ! (there are other ip-addresses too...) all_ips = egrep(pattern:"[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+", string:foo); array = split(all_ips, sep:'\n'); the_ip = ereg_replace(pattern:" *([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[^0-9].*", string:array[0]); -- Renaud _______________________________________________ Plugins-writers mailing list Plugins-writers@private http://mail.nessus.org/mailman/listinfo/plugins-writers
This archive was generated by hypermail 2b30 : Fri Mar 19 2004 - 10:21:50 PST