Chocolateyでnmapコマンドをインストールする

Chocolateyでnmapコマンドをインストールする

windows10でChocoleteyを使用してnmapコマンドをインストールする手順を記述してます。

環境

  • OS windows10 pro 64bit
  • Chocoletey 0.11.3

Chocoleteyアップデート

まずはChocoleteyをアップデートしておきます。

choco upgrade chocolatey

nmapインストール

コマンドプロンプトを管理者で起動して、以下のコマンドを実行して、nmapコマンドをインストールします。

choco install nmap


<出力結果>
Chocolatey v0.10.15
Upgrading the following packages:
chocolatey
By upgrading you accept licenses for the packages.

You have chocolatey v0.10.15 installed. Version 0.11.3 is available based on your source(s).
Progress: Downloading chocolatey 0.11.3... 100%

chocolatey v0.11.3
chocolatey package files upgrade completed. Performing other installation steps.
The package chocolatey wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): y

Creating ChocolateyInstall as an environment variable (targeting 'Machine')
  Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell
  before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
  (i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
  and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.

Creating Chocolatey folders if they do not already exist.

WARNING: You can safely ignore errors related to missing log files when
  upgrading from a version of Chocolatey less than 0.9.9.
  'Batch file could not be found' is also safe to ignore.
  'The system cannot find the file specified' - also safe.
Adding Chocolatey to the profile. This will provide tab completion, refreshenv, etc.
WARNING: Chocolatey profile installed. Reload your profile - type . $profile
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 The upgrade of chocolatey was successful.
  Software install location not explicitly set, could be in package or
  default install location if installer.

Chocolatey upgraded 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log

一度、コマンドプロンプトを閉じて起動すると「nmap」が利用できるようになります。

nmap -v

<出力結果>
Starting Nmap 7.92 ( https://nmap.org ) at 2021-10-29 19:18 東京 (標準時)
Read data files from: C:\Program Files (x86)\Nmap
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.39 seconds
           Raw packets sent: 0 (0B) | Rcvd: 0 (0B)