| 213 | assert repr(s) == '<Software(vendor=HP, product=iLO (Integrated Lights-Out) sshd, version=0.2.1)>' |
| 214 | |
| 215 | def test_cisco_software(self): |
| 216 | ps = lambda x: self.software.parse(self.banner.parse(x)) # noqa |
| 217 | # common |
| 218 | s = ps('SSH-1.5-Cisco-1.25') |
| 219 | assert s.vendor == 'Cisco' |
| 220 | assert s.product == 'IOS/PIX sshd' |
| 221 | assert s.version == '1.25' |
| 222 | assert s.patch is None |
| 223 | assert s.os is None |
| 224 | assert str(s) == 'Cisco IOS/PIX sshd 1.25' |
| 225 | assert str(s) == s.display() |
| 226 | assert s.display(True) == str(s) |
| 227 | assert s.display(False) == str(s) |
| 228 | assert repr(s) == '<Software(vendor=Cisco, product=IOS/PIX sshd, version=1.25)>' |
| 229 | |
| 230 | def test_software_os(self): |
| 231 | ps = lambda x: self.software.parse(self.banner.parse(x)) # noqa |