Nscan 开源项目教程

Nscan 开源项目教程

NscanNscan: Fast internet-wide scanner项目地址:https://gitcode.com/gh_mirrors/ns/Nscan

项目介绍

Nscan 是一个用 Rust 编写的跨平台网络扫描工具,旨在进行主机和服务发现。它简单、快速且高效,特别适用于扫描特定任务。Nscan 提供了端口扫描、主机扫描、服务检测和操作系统家族检测等功能。

项目快速启动

安装 Nscan

你可以通过以下几种方式安装 Nscan:

通过 Shell 脚本安装
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/shellrow/nscan/releases/latest/download/nscan-installer.sh | sh
通过 PowerShell 脚本安装
irm https://github.com/shellrow/nscan/releases/latest/download/nscan-installer.ps1 | iex
通过 Homebrew 安装
brew install shellrow/tap-nscan/nscan

基本使用

默认端口扫描

要扫描目标上的默认端口,只需指定目标:

nscan --target scanme.nmap.org
扫描所有端口

要扫描所有端口(1-65535),可以使用 --full 选项:

nscan --target scanme.nmap.org -F

应用案例和最佳实践

应用案例

Nscan 可以用于以下场景:

  1. 网络安全评估:通过扫描目标网络,发现潜在的安全漏洞。
  2. 服务发现:在网络中查找运行中的服务和端口。
  3. 主机发现:在指定的网络或主机列表中查找活动主机。

最佳实践

  1. 定期扫描:定期对网络进行扫描,以发现新的服务和潜在的安全威胁。
  2. 详细日志:使用 --save 选项将扫描结果保存为 JSON 文件,便于后续分析。
  3. 权限管理:确保 Nscan 以管理员权限运行,因为它使用原始套接字需要提升的权限。

典型生态项目

Nscan 可以与其他网络安全工具和项目结合使用,例如:

  1. Nmap:一个强大的网络扫描工具,可以与 Nscan 结合使用,进行更深入的网络分析。
  2. Wireshark:网络协议分析工具,用于分析 Nscan 扫描过程中捕获的数据包。
  3. Metasploit:渗透测试框架,可以利用 Nscan 发现的服务漏洞进行进一步的渗透测试。

通过这些工具的结合使用,可以构建一个全面的网络安全评估和渗透测试环境。

NscanNscan: Fast internet-wide scanner项目地址:https://gitcode.com/gh_mirrors/ns/Nscan

  • 3
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
已知程序 import xarray as xr from collections import namedtuple import numpy as np from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.ticker as mticker import cartopy.feature as cfeature import cartopy.crs as ccrs import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib.colors as mcolors def region_mask(lon, lat, extents): lonmin, lonmax, latmin, latmax = extents return ( (lon >= lonmin) & (lon <= lonmax) & (lat >= latmin) & (lat <= latmax) ) Point = namedtuple('Point', ['x', 'y']) Pair = namedtuple('Pair', ['start', 'end']) time = '2023-05-04' filepath_DPR = r"C:\pythontest\zFactor\test1.nc4" extents = [110, 122, 25, 38] with xr.open_dataset(filepath_DPR) as f: lon_DPR = f['FS_Longitude'][:] lat_DPR = f['FS_Latitude'][:] zFactorFinalNearSurface = f['FS_SLV_zFactorFinalNearSurface'][:] nscan, nray = lon_DPR.shape midray = nray // 2 mask = region_mask(lon_DPR[:, midray], lat_DPR[:, midray], extents) index = np.s_[mask] lon_DPR = lon_DPR[index] lat_DPR = lat_DPR[index] zFactorFinalNearSurface = zFactorFinalNearSurface[index] for data in [ zFactorFinalNearSurface, ]: data.values[data <= -9999] = np.nan proj = ccrs.PlateCarree() fig = plt.figure(figsize=(10, 8)) ax = fig.add_subplot(111, projection=proj) ax.coastlines(resolution='50m', lw=0.5) ax.add_feature(cfeature.OCEAN.with_scale('50m')) ax.add_feature(cfeature.LAND.with_scale('50m')) ax.set_xticks(np.arange(-180, 181, 5), crs=proj) ax.set_yticks(np.arange(-90, 91, 5), crs=proj) ax.xaxis.set_minor_locator(mticker.AutoMinorLocator(2)) ax.yaxis.set_minor_locator(mticker.AutoMinorLocator(2)) ax.xaxis.set_major_formatter(LongitudeFormatter()) ax.yaxis.set_major_formatter(LatitudeFormatter()) ax.set_extent(extents, crs=proj) ax.tick_params(labelsize='large') def make_zF_cmap(levels): '''制作雷达反射率的colormap.''' nbin = len(levels) - 1 cmap = cm.get_cmap('jet', nbin) norm = mcolors.BoundaryNorm(levels, nbin) return cmap, norm levels_zF = [0, 1, 5, 10, 15, 20, 25, 30, 35, 40, 45] cmap_zF, norm_zF = make_zF_cmap(levels_zF) im = ax.contourf( lon_DPR, lat_DPR, zFactorFinalNearSurface, levels_zF, # 三个物理量为 (500, 49)就是在500*49的格点上赋予这三个物理量 cmap=cmap_zF, norm=norm_zF, extend='both', transform=proj ) cbar = fig.colorbar(im, ax=ax, ticks=levels_zF) cbar.set_label('zFactor (dBZ)', fontsize='large') cbar.ax.tick_params(labelsize='large') ax.set_title(f'DPR zFactor on {time}', fontsize='x-large') plt.show()如何将其中的zFactorFinal变量变为二维
05-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

邱进斌Olivia

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值