plugin.py 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. """
  2. # 安装
  3. apt-get install -y libpcap-dev masscan
  4. # --- test ssh ---
  5. masscan -p22 192.168.131.0/24 --rate=1000
  6. Discovered open port 22/tcp on 192.168.131.100
  7. Discovered open port 22/tcp on 192.168.131.102
  8. Discovered open port 22/tcp on 192.168.131.243
  9. Discovered open port 22/tcp on 192.168.131.138
  10. Discovered open port 22/tcp on 192.168.131.16
  11. Discovered open port 22/tcp on 192.168.131.136
  12. Discovered open port 22/tcp on 192.168.131.242
  13. Discovered open port 22/tcp on 192.168.131.61
  14. Discovered open port 22/tcp on 192.168.131.46
  15. Discovered open port 22/tcp on 192.168.131.42
  16. Discovered open port 22/tcp on 192.168.131.43
  17. Discovered open port 22/tcp on 192.168.131.133
  18. Discovered open port 22/tcp on 192.168.131.11
  19. Discovered open port 22/tcp on 192.168.131.101
  20. Discovered open port 22/tcp on 192.168.131.23
  21. Discovered open port 22/tcp on 192.168.131.21
  22. Discovered open port 22/tcp on 192.168.131.22
  23. Discovered open port 22/tcp on 192.168.131.103
  24. Discovered open port 22/tcp on 192.168.131.241
  25. Discovered open port 22/tcp on 192.168.131.13
  26. Discovered open port 22/tcp on 192.168.131.17
  27. Discovered open port 22/tcp on 192.168.131.253
  28. Discovered open port 22/tcp on 192.168.131.137
  29. Discovered open port 22/tcp on 192.168.131.130
  30. Discovered open port 22/tcp on 192.168.131.139
  31. Discovered open port 22/tcp on 192.168.131.132
  32. # --- test 3网段 ---
  33. masscan 192.168.3.0/24 --rate=1000 --ports 0-65535
  34. # --- test sqlserver ---
  35. nmap -p 1433 192.168.131.0/24
  36. Starting Nmap 7.80 ( https://nmap.org ) at 2023-12-18 17:44 CST
  37. Nmap scan report for 192.168.131.1
  38. Host is up (0.00028s latency).
  39. PORT STATE SERVICE
  40. 1433/tcp closed ms-sql-s
  41. Nmap scan report for 192.168.131.11
  42. Host is up (0.00021s latency).
  43. PORT STATE SERVICE
  44. 1433/tcp closed ms-sql-s
  45. Nmap scan report for 192.168.131.12
  46. Host is up (0.00030s latency).
  47. PORT STATE SERVICE
  48. 1433/tcp closed ms-sql-s
  49. Nmap scan report for 192.168.131.13
  50. Host is up (0.00015s latency).
  51. PORT STATE SERVICE
  52. 1433/tcp closed ms-sql-s
  53. Nmap scan report for 192.168.131.16
  54. Host is up (0.00012s latency).
  55. PORT STATE SERVICE
  56. 1433/tcp filtered ms-sql-s
  57. Nmap scan report for 192.168.131.17
  58. Host is up (0.00028s latency).
  59. PORT STATE SERVICE
  60. 1433/tcp closed ms-sql-s
  61. Nmap scan report for 192.168.131.20
  62. Host is up (0.00022s latency).
  63. PORT STATE SERVICE
  64. 1433/tcp closed ms-sql-s
  65. Nmap scan report for 192.168.131.21
  66. Host is up (0.00013s latency).
  67. PORT STATE SERVICE
  68. 1433/tcp closed ms-sql-s
  69. Nmap scan report for 192.168.131.22
  70. Host is up (0.00024s latency).
  71. PORT STATE SERVICE
  72. 1433/tcp closed ms-sql-s
  73. Nmap scan report for 192.168.131.23
  74. Host is up (0.000024s latency).
  75. PORT STATE SERVICE
  76. 1433/tcp closed ms-sql-s
  77. Nmap scan report for 192.168.131.41
  78. Host is up (0.018s latency).
  79. PORT STATE SERVICE
  80. 1433/tcp closed ms-sql-s
  81. Nmap scan report for 192.168.131.42
  82. Host is up (0.011s latency).
  83. PORT STATE SERVICE
  84. 1433/tcp closed ms-sql-s
  85. Nmap scan report for 192.168.131.43
  86. Host is up (0.031s latency).
  87. PORT STATE SERVICE
  88. 1433/tcp closed ms-sql-s
  89. Nmap scan report for 192.168.131.45
  90. Host is up (0.00090s latency).
  91. PORT STATE SERVICE
  92. 1433/tcp closed ms-sql-s
  93. Nmap scan report for 192.168.131.46
  94. Host is up (0.031s latency).
  95. PORT STATE SERVICE
  96. 1433/tcp closed ms-sql-s
  97. Nmap scan report for 192.168.131.61
  98. Host is up (0.00056s latency).
  99. PORT STATE SERVICE
  100. 1433/tcp closed ms-sql-s
  101. Nmap scan report for 192.168.131.62
  102. Host is up (0.00059s latency).
  103. PORT STATE SERVICE
  104. 1433/tcp closed ms-sql-s
  105. Nmap scan report for 192.168.131.99
  106. Host is up (0.00021s latency).
  107. PORT STATE SERVICE
  108. 1433/tcp filtered ms-sql-s
  109. Nmap scan report for 192.168.131.100
  110. Host is up (0.000095s latency).
  111. PORT STATE SERVICE
  112. 1433/tcp filtered ms-sql-s
  113. Nmap scan report for 192.168.131.101
  114. Host is up (0.00014s latency).
  115. PORT STATE SERVICE
  116. 1433/tcp filtered ms-sql-s
  117. Nmap scan report for 192.168.131.102
  118. Host is up (0.00013s latency).
  119. PORT STATE SERVICE
  120. 1433/tcp filtered ms-sql-s
  121. Nmap scan report for 192.168.131.103
  122. Host is up (0.00015s latency).
  123. PORT STATE SERVICE
  124. 1433/tcp filtered ms-sql-s
  125. Nmap scan report for 192.168.131.130
  126. Host is up (0.0049s latency).
  127. PORT STATE SERVICE
  128. 1433/tcp closed ms-sql-s
  129. Nmap scan report for 192.168.131.131
  130. Host is up (0.012s latency).
  131. PORT STATE SERVICE
  132. 1433/tcp closed ms-sql-s
  133. Nmap scan report for 192.168.131.132
  134. Host is up (0.015s latency).
  135. PORT STATE SERVICE
  136. 1433/tcp closed ms-sql-s
  137. Nmap scan report for 192.168.131.133
  138. Host is up (0.011s latency).
  139. PORT STATE SERVICE
  140. 1433/tcp closed ms-sql-s
  141. Nmap scan report for 192.168.131.136
  142. Host is up (0.014s latency).
  143. PORT STATE SERVICE
  144. 1433/tcp closed ms-sql-s
  145. Nmap scan report for 192.168.131.137
  146. Host is up (0.0039s latency).
  147. PORT STATE SERVICE
  148. 1433/tcp closed ms-sql-s
  149. Nmap scan report for 192.168.131.138
  150. Host is up (0.010s latency).
  151. PORT STATE SERVICE
  152. 1433/tcp closed ms-sql-s
  153. Nmap scan report for 192.168.131.139
  154. Host is up (0.0043s latency).
  155. PORT STATE SERVICE
  156. 1433/tcp closed ms-sql-s
  157. Nmap scan report for 192.168.131.241
  158. Host is up (0.00036s latency).
  159. PORT STATE SERVICE
  160. 1433/tcp closed ms-sql-s
  161. Nmap scan report for 192.168.131.242
  162. Host is up (0.00038s latency).
  163. PORT STATE SERVICE
  164. 1433/tcp closed ms-sql-s
  165. Nmap scan report for 192.168.131.243
  166. Host is up (0.00048s latency).
  167. PORT STATE SERVICE
  168. 1433/tcp closed ms-sql-s
  169. Nmap scan report for 192.168.131.252
  170. Host is up (0.0023s latency).
  171. PORT STATE SERVICE
  172. 1433/tcp closed ms-sql-s
  173. Nmap scan report for 192.168.131.253
  174. Host is up (0.00016s latency).
  175. PORT STATE SERVICE
  176. 1433/tcp closed ms-sql-s
  177. Nmap scan report for _gateway (192.168.131.254)
  178. Host is up (0.0010s latency).
  179. PORT STATE SERVICE
  180. 1433/tcp closed ms-sql-s
  181. Nmap done: 256 IP addresses (36 hosts up) scanned in 63.19 seconds
  182. """