Hi,
I want to revise the nmap.xsl so that it would display IP addresses if a host has at least one port is opened AND group each IP into a group based on a SSH server. Here is the output that I want to get:
Open SSH:
Show each host’s IP address & host name in hyperlink that has at least one port is opened and it is running Open SSH
.....
BitWise:
F-secure:
Others SSH:
Here is the original nmap.xsl which displays all of the scanned host’s ip addresses. - <xsl:for-each select="host">
-
<xsl:sort select="substring ( address/@addr, 1, string-length ( sub string-before ( address/@addr, '.' ) ) )* (256*256*256) + substring ( substring-after (address/@addr, '.' ), 1, string-length ( substring-before ( substring-after ( address/@addr, '.' ), '.' ) ) )* (256*256) + substring ( substring-after (substring-after ( address/@addr, '.' ), '.' ), 1, string-length ( substring-before ( substring-after ( substring-after (address/@addr, '.' ), '.' ), '.' ) ) ) * 256 + substring ( substring-after ( substring-after ( substring-after ( address/@addr, '.' ), '.' ), '.' ), 1 )" order="ascending" data-type="number"/>
-
-
<li>
-
<xsl:element name="a">
-
-
<xsl:attribute name="href">#<xsl:value-of select="translate(address/@addr, '.', '_') " /></xsl:attribute>
-
-
<xsl:attribute name="class">
-
<xsl:choose>
-
<xsl:when test="status/@state ='up'">green</xsl:when>
-
<xsl:otherwise>red</xsl:otherwise>
-
</xsl:choose>
-
</xsl:attribute>
-
-
<xsl:value-of select="address/@addr"/>
-
-
<xsl:if test="count(hostnames/hostname) > 0">
-
<xsl:for-each select="hostnames/hostname">
-
<xsl:sort select="@name" order="ascending" data-type="text"/>
-
<xsl:text> / </xsl:text><xsl:value-of select="@name"/>
-
</xsl:for-each></xsl:if>
-
-
</xsl:element>
-
<xsl:text> | </xsl:text>
-
</li></xsl:for-each>
Couple examples of XML output: - <host><status state="up" />
-
<address addr="150.215.20.5" addrtype="ipv4" />
-
<hostnames />
-
<ports><extraports state="unknown" count="0" />
-
<port protocol="tcp" portid="22"><state state="open" /><service name="ssh" product="OpenSSH" version="1.2.3" extrainfo="protocol 1.5" method="probed" conf="10"/>
-
</port>
-
<port protocol="tcp" portid="2220"><state state="closed" /></port>
-
<port protocol="tcp" portid="2260"><state state="closed" /></port>
-
<port protocol="tcp" portid="2280"><state state="closed" /></port>
-
</ports>
-
</host>
- <host><status state="up" />
-
<address addr="150.215.20.40" addrtype="ipv4" />
-
<hostnames />
-
<ports><extraports state="unknown" count="0" />
-
<port protocol="tcp" portid="22"><state state="open" /><service name="ssh" product="SunSSH" version="1.1" extrainfo="protocol 2.0" method="probed" conf="10" />
-
</port>
-
<port protocol="tcp" portid="2220"><state state="closed" /></port>
-
<port protocol="tcp" portid="2260"><state state="closed" /></port>
-
<port protocol="tcp" portid="2280"><state state="closed" /></port>
-
</ports>
Any help is appreciated!!! Thank you very much.
Summer
0 1409 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Debbie Davis |
last post by:
Hi there,
SQL 2000
I have the following query:
SELECT sponsor, COUNT(sponsor) * 2 AS total FROM Referrals
GROUP BY sponsor
Works great, returns the sponsor and the total * 2 of their referrals
|
by: Graham |
last post by:
Hi,
I am having trouble getting XSL to count the members of a group. What
I am trying to do is group by <objectid.Contactid> and count the
number of <activityid>'s for each <objectid.contactid>. My XSL keeps
returning zero for the count. The results for the XML/XSLT files below
should look like:-
Contact # of Visits ...
|
by: Jody Greening |
last post by:
Transforming with XSLT, Grouping elements until difference found.
I am seeking some help with the following problem, I am fairly new at
XSLT transformations, and my problem may lie in looking at it from a
traditional programming point of view.
I have did quite a bit of searching but have found no answers to my
particular problem... please...
|
by: MEC6304 |
last post by:
I have the following fragment repeated mulitple times and need to sum the SKU_QUANTITY and transform the XML based upon a grouping of the SKU_TIE, SKU_NUMBER, and MFG_PART_NUM, ie display the resulting node-set where these element values are the same.
<SKU_INFO>
<DETAIL_SEQ_NUMBER>11</DETAIL_SEQ_NUMBER>
<SKU_TIE>1</SKU_TIE>...
|
by: Andreas Håkansson |
last post by:
Seeing how my previous post seem to have fallen between the
cracks, I thought I would have a second, more direct, go at it.
So my question is "Is it possible to group (Muenchian method)
over multiple nodes?" I will use an example to try to explain what
I need to do and what I have for data. The example might not be
very realistic but it's...
| |
by: Brian Coy |
last post by:
I am creating a database to track scrap on a daily basis at my plant.
I have to provide a weekly scrap report with the amount of each part
scrapped per day. I have the basic database set up, and am trying to
generate a report. I have created a report that will show all the
data. But I need to show either an empty group for the data on days...
|
by: ahaque38 |
last post by:
Hello.
Using A2K SP3, I am having the following problem with a report using
"Sorting and Grouping".
I have recently added a grouping in the reports for
"Category2<>'CONTRACTS'".
I have reports at the plan (overall totals), department and division
levels which have sorting and grouping implemented with this new
|
by: Mike MacSween |
last post by:
tblCourses one to many to tblEvents.
A course may have an intro workshop (a type of event), a mid course
workshop, a final exam. Or any combination. Or something different in the
future.
At the moment the printed output is usually going to Word. It's turning into
an unholy mess, because I'm having to prepare umpteen different Word...
|
by: Corey |
last post by:
hello,
I’m trying to run a query and I’m getting error messages
Can anyone help me get though this problem?
1: Tried this and got this error message
ORA-00923
, decode (grouping(dsd.Field1,'RETURNED', COUNT(*), 0)) Net1
, decode (grouping(dsd.field1,'COMPLETED', COUNT(*), 0)) Net2
|
by: Roman Bertle |
last post by:
Hello,
I try to format monetary values using the locale module, python2.5:
Python 2.5.2a0 (r251:54863, Jan 3 2008, 17:59:56)
on linux2
Type "help", "copyright", "credits" or "license" for more information.
'de_AT.utf8'
{'mon_decimal_point': ',', 'int_frac_digits': 2, 'p_sep_by_space': 1,
'frac_digits': 2, 'thousands_sep': '',...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |