03/05/2013

Commandes Linux

Table des matières

Commandes Linux

 


Je signale à tout hasard, à celui qui serait tenté de recopier et lancer la commande sur la baniere :


Pour commencer quelques liens utiles:
Des commandes de base command reference de FOSSwire.com
Un site permettant l'explication détaillée des commandes explainshell.com


La Filesystem Hierarchy Standard  « FHS »  est un standard sur la hiérarchie des systèmes GNU/Linux. Sa première version date de du 14 février 1994. La norme sur la hiérarchie des systèmes de fichiers définit une organisation standard concernant ces répertoires. Ainsi, peu importe la distribution GNU/Linux (ou tout autre système d’exploitation adhérant à cette norme) que vous utilisez, vous serez en mesure de retrouver l’information que vous recherchez.

Audio

Pour connaître les détails de la carte son:

lspci recherche les cartes reliées à un port PCI

lspci | grep -i audio

lsusb recherche les cartes reliées à un port usb

lsusb | grep -i audio

pour connaître le chipset  son:

cat /proc/asound/pcm

 

Info système

 

INXI Pour la détection Hardware rapide et sans se fouler est un super outil, utilisé avec les bons argument -rfv7, il fait ressortir l'essentiel du matériel. Inxi a d'ailleurs fait l'objet d'un petit How-to. Inxi est installé par défaut sur pas mal de distributions.


vrms

Virtual Richard Matthew Stallman est un paquet dont le but est de savoir si vous avez des paquets non libres installés sur votre système.

sudo apt install vrms

lancer "vrms" dans le terminal.

Spoiler:

Sauvegarder le contenu de la commande top dans un fichier log

echo -ne "$(top -n 1 -b -o %CPU)\n" >>top.log

Connaître la date d'installation du système :

ls -lct /etc | tail -1 | awk '{print $6, $7, $8}'

lshw est une commande qui affiche des informations très détaillées sur les périphériques d'un ordinateur, elle doit s’exécuter avec les droits root. sudo lshw sort un pâté assez indigeste à appréhender, voyons comment rendre cela plus lisible.

sudo lshw -short
Spoiler:

Chemin matériel Périphérique Classe Description
===============================================================
system System Product Name (To be filled by O.E.M.)
/0 bus P8P67 DELUXE
/0/0 memory 64KiB BIOS
/0/4 processor Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
/0/4/5 memory 256KiB L1 cache
/0/4/6 memory 1MiB L2 cache
/0/4/7 memory 8MiB L3 cache
/0/24 memory 6GiB Mémoire Système
/0/24/0 memory 2GiB DIMM DDR3 Synchrone 1333 MHz (0,8 ns)
/0/24/1 memory 4GiB DIMM DDR3 Synchrone 1333 MHz (0,8 ns)
/0/24/2 memory DIMMProject-Id-Version: @(#) $Id$Report-Msgid-Bugs-To: POT-Creation-Da
/0/24/3 memory DIMMProject-Id-Version: @(#) $Id$Report-Msgid-Bugs-To: POT-Creation-Da
/0/100 bridge 2nd Generation Core Processor Family DRAM Controller
/0/100/1 bridge Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Por
/0/100/1/0 display GM204 [GeForce GTX 970]
/0/100/1/0.1 multimedia GM204 High Definition Audio Controller
/0/100/16 communication 6 Series/C200 Series Chipset Family MEI Controller #1
/0/100/19 eno1 network 82579V Gigabit Network Connection
/0/100/1a bus 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2
/0/100/1a/1 usb1 bus EHCI Host Controller
/0/100/1a/1/1 bus Integrated Rate Matching Hub
/0/100/1a/1/1/1 input USB OPTICAL MOUSE
/0/100/1a/1/1/2 input SteelSeries Call of Duty Gaming Mouse
/0/100/1c bridge 6 Series/C200 Series Chipset Family PCI Express Root Port 1
/0/100/1c.4 bridge 6 Series/C200 Series Chipset Family PCI Express Root Port 5
/0/100/1c.4/0 bus uPD720200 USB 3.0 Host Controller
/0/100/1c.4/0/0 usb4 bus xHCI Host Controller
/0/100/1c.4/0/1 usb3 bus xHCI Host Controller
/0/100/1c.6 bridge 6 Series/C200 Series Chipset Family PCI Express Root Port 7
/0/100/1c.6/0 bus uPD720200 USB 3.0 Host Controller
/0/100/1c.6/0/0 usb6 bus xHCI Host Controller
/0/100/1c.6/0/1 usb5 bus xHCI Host Controller
/0/100/1c.7 bridge 6 Series/C200 Series Chipset Family PCI Express Root Port 8
/0/100/1c.7/0 bridge PEX 8608 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch
/0/100/1c.7/0/1 bridge PEX 8608 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch
/0/100/1c.7/0/1/0 bus VT6315 Series Firewire Controller
/0/100/1c.7/0/4 bridge PEX 8608 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch
/0/100/1c.7/0/5 bridge PEX 8608 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch
/0/100/1c.7/0/5/0 storage JMB362 SATA Controller
/0/100/1c.7/0/6 bridge PEX 8608 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch
/0/100/1c.7/0/6/0 storage 88SE9128 PCIe SATA 6 Gb/s RAID controller with HyperDuo
/0/100/1c.7/0/7 bridge PEX 8608 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch
/0/100/1c.7/0/8 bridge PEX 8608 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch
/0/100/1c.7/0/8/0 bridge ASM1083/1085 PCIe to PCI Bridge
/0/100/1c.7/0/8/0/1 multimedia CMI8788 [Oxygen HD Audio]
/0/100/1c.7/0/9 bridge PEX 8608 8-lane, 8-Port PCI Express Gen 2 (5.0 GT/s) Switch
/0/100/1c.7/0/9/0 enp14s0 network RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
/0/100/1d bus 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1
/0/100/1d/1 usb2 bus EHCI Host Controller
/0/100/1d/1/1 bus Integrated Rate Matching Hub
/0/100/1d/1/1/5 input USB Receiver
/0/100/1f bridge P67 Express Chipset Family LPC Controller
/0/100/1f.2 storage 6 Series/C200 Series Chipset Family SATA AHCI Controller
/0/100/1f.3 bus 6 Series/C200 Series Chipset Family SMBus Controller
/0/1 scsi0 storage
/0/1/0.0.0 /dev/sda disk 2TB ST2000DM001-1CH1
/0/1/0.0.0/1 /dev/sda1 volume 1863GiB Windows NTFS volume
/0/2 scsi2 storage
/0/2/0.0.0 /dev/cdrom disk iHAS124 B
/0/3 scsi8 storage
/0/3/0.0.0 /dev/sdb disk 128GB SanDisk SDSSDHP1
/0/3/0.0.0/1 /dev/sdb1 volume 500MiB Windows NTFS volume
/0/3/0.0.0/2 /dev/sdb2 volume 118GiB Windows NTFS volume
/0/5 scsi9 storage
/0/5/0.0.0 /dev/sdc disk 64GB M4-CT064M4SSD2
/0/5/0.0.0/1 /dev/sdc1 volume 14GiB Volume EXT4
/0/5/0.0.0/2 /dev/sdc2 volume 43GiB Volume EXT4
/0/5/0.0.0/3 /dev/sdc3 volume 1956MiB Linux swap volume
/0/6 scsi15 storage
/0/6/0.0.0 processor SCSI Processor
/1 power To Be Filled By O.E.M.
/2 power To Be Filled By O.E.M.

Une autre méthode consiste à renvoyer la sortie dans le navigateur (adapter la commande à votre navigateur par défaut)
Chromium

sudo lshw -html > info-system.html && chromium-browser info-system.html

Firefox

sudo lshw -html > info-system.html && firefox info-system.html

Connaitre la version installée:

lsb_release -a

afficher la version du noyau Linux :

uname -a

Détails Carte mère et Bios:

sudo dmidecode -t baseboard OU sudo lshw -C bus | head -6 OU sudo dmidecode 

Lister les périphériques du bus PCI :

lspci

Lister les périphériques USB :

lsusb

Espace disque et pourcentage d’occupation:

df -h

Mais ce n'est pas très lisible ou pourra idéalement placer un alias df=:

df -PBM -xtmpfs -xdevtmpfs

Occupation partition swap:

swapon -s

Info de fonctionnement:

uptime, top, who

Info Processeur:

cat /proc/cpuinfo

Carte graphique:

lspci | grep VGA

Réseau

Retrouver sa clé wifi :

sudo egrep -h 'ssid=|psk=' --color /etc/NetworkManager/system-connections/*

Scan réseau local (interfaces & adresses MAC):

sudo nmap -T4 -sP 192.168.0.0/24

Connaître son adresse IP externe :

curl ipinfo.io/ip

Quels sont les ports ouverts :

sudo netstat -lp –inet
netstat -lapute --inet
netstat -taupe --inet

Avec lsof, il est intéressant de voir à quel point certains navigateurs peuvent être bavards en les lançant simplement, sans faire de requête:

lsof -i


Spoiler:

chromium
chromium- 32504 fmr 97u IPv4 6472889 0t0 TCP 192.168.0.1:33064->par21s03-in-f148.1e100.net:https (ESTABLISHED)
chromium- 32504 fmr 100u IPv4 6469989 0t0 TCP 192.168.0.1:33932->par21s03-in-f10.1e100.net:https (ESTABLISHED)
chromium- 32504 fmr 107u IPv4 6469990 0t0 TCP 192.168.0.1:59634->par21s03-in-f142.1e100.net:https (ESTABLISHED)
chromium- 32504 fmr 118u IPv4 6472960 0t0 UDP *:mdns
chromium- 32504 fmr 121u IPv4 6471477 0t0 TCP 192.168.0.1:54102->par21s03-in-f3.1e100.net:https (ESTABLISHED)
chromium- 32504 fmr 130u IPv4 6471478 0t0 TCP 192.168.0.1:54104->par21s03-in-f3.1e100.net:https (ESTABLISHED)
chromium- 32504 fmr 134u IPv4 6470006 0t0 TCP 192.168.0.1:54130->par21s03-in-f4.1e100.net:https (ESTABLISHED)
chromium- 32504 fmr 170u IPv4 6471888 0t0 TCP 192.168.0.1:54094->par21s03-in-f3.1e100.net:https (ESTABLISHED)
chromium- 32504 fmr 171u IPv4 6471889 0t0 TCP 192.168.0.1:54096->par21s03-in-f3.1e100.net:https (ESTABLISHED)
chromium- 32504 fmr 173u IPv4 6471890 0t0 TCP 192.168.0.1:54098->par21s03-in-f3.1e100.net:https (ESTABLISHED)

Firefox
firefox 4125 fmr 37u IPv4 6479846 0t0 TCP 192.168.0.1:58482->ec2-54-213-123-171.us-west-2.compute.amazonaws.com:https (ESTABLISHED)
firefox 4125 fmr 38u IPv4 6479713 0t0 TCP 192.168.0.1:60054->mxr-zlb.vips.scl3.mozilla.com:https (ESTABLISHED)
firefox 4125 fmr 59u IPv4 6479858 0t0 TCP 192.168.0.1:56276->server-54-192-185-221.cdg51.r.cloudfront.net:https (ESTABLISHED)
firefox 4125 fmr 62u IPv4 6479870 0t0 TCP 192.168.0.1:58486->ec2-54-213-123-171.us-west-2.compute.amazonaws.com:https (ESTABLISHED)
firefox 4125 fmr 77u IPv4 6483151 0t0 TCP 192.168.0.1:51352->a23-14-146-170.deploy.static.akamaitechnologies.com:https (ESTABLISHED)
Qupzilla : RIEN


les ports tcp/udp ouverts:

netstat -atun

Interfaces réseau filaire:

ifconfig

Interfaces réseau Wifi:

iwconfig

Scanner les réseaux sans fil:

iwlist scan

Activer une interface: (ex eth0)

ifup eth0

Désactiver une interface:

ifdown eth0

Redémarrer la configuration réseau:

/etc/init.d/networking restart && ifup wlan0

Contrôler la présence d' un serveur Samba sur le réseau:

findsmb

IP ADDR         NETBIOS NAME     WORKGROUP/OS/VERSION 
---------------------------------------------------------------------
192.168.x.x     "nomduserveur"+[WORKGROUP] [Unix] [Samba 3.x.x]
(ip locale)                                        (version smb)

findsmb ne fonctionne plus sur les dernières versions de Ubuntu on pourra remplacer par nmblookup -+arg, qui dépend de samba-common-bin

sudo apt install samba-common-bin

Puis :

nmblookup -S WORKGROUP

ou

nmblookup -S '*'

192.168.X.X *<00>
Looking up status of 192.168.X.X
	MONSERVEUR_SMB <00> -         B 
	MONSERVEUR_SMB <03> -         B 
	MONSERVEUR_SMB <20> -         B 
	WORKGROUP      <00> -         B 
	WORKGROUP      <1e> -         B 

	MAC Address = 00-00-00-00-00-00

Trouver le serveur DHCP:
Prérequis : Identifier l’interface réseau active, avec la commande ip [ifconfig fonctionne encore sur Ubuntu (17.10)]:

ip a

Puis :

sudo nmap --script broadcast-dhcp-discover -e eno1

Périf

Tester les débits des perifs USB & HDD:

Lister les périfs de stockage avec

sudo fdisk -l

Périphérique Amorce Début Fin Blocs Id Système
/dev/sdb1 * 2048 625141759 312569856 5 Étendue
/dev/sdb5 4096 25010175 12503040 83 Linux
/dev/sdb6 25012224 89827327 32407552 83 Linux
/dev/sdb7 89829376 94111743 2141184 82 partition d'échange Linux / Solaris
/dev/sdb8 94113792 115355647 10620928 83 Linux
/dev/sdb9 115357696 177551359 31096832 83 Linux
/dev/sdb10 177553408 625141759 223794176 7 HPFS/NTFS/exFAT

Puis choisir son HDD/USB, par ex sdb5 :

sudo hdparm -tT /dev/sdb5

/dev/sdb5:
Timing cached reads: 7864 MB in 2.00 seconds = 3933.59 MB/sec
Timing buffered disk reads: 238 MB in 3.01 seconds = 78.95 MB/sec

HDD

Identifier modèle & numéro de série d'un disque dur:

hdparm -I /dev/sd?|grep -E "Number|/dev"

/dev/sda:
 Model Number: HDS722516VLSA80
 Serial Number: VN6D3ECDD7RG1D
/dev/sdb:
 Model Number: WDC WD740GD-00FLA1
 Serial Number: WD-WMAKE1690676

Commande plus complète (rpm, smart, version SATA, etc...), dépend de smartmontools

sudo apt install smartmontools
sudo smartctl -a /dev/sdX


Spoiler:

smartctl 6.4 2014-10-07 r4002 [i686-linux-3.16.0-4-686-pae] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family: Western Digital Scorpio Blue Serial ATA (AF)
Device Model: WDC WD7500BPVT-22HXZT1
Serial Number: WD-WXH1A9179081
LU WWN Device Id: 5 0014ee 6571e9703
Firmware Version: 01.01A01
User Capacity: 750 156 374 016 bytes [750 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS (minor revision not indicated)
SATA Version is: SATA 2.6, 3.0 Gb/s
Local Time is: Sun Feb 5 05:17:33 2017 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (15600) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 153) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x7035) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 0
3 Spin_Up_Time 0x0027 205 154 021 Pre-fail Always - 750
4 Start_Stop_Count 0x0032 067 067 000 Old_age Always - 33468
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 089 089 000 Old_age Always - 8241
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 086 086 000 Old_age Always - 14894
191 G-Sense_Error_Rate 0x0032 001 001 000 Old_age Always - 28402
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 163
193 Load_Cycle_Count 0x0032 001 001 000 Old_age Always - 984730
194 Temperature_Celsius 0x0022 105 095 000 Old_age Always - 42
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 5595 -

SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.


Test des secteurs défectueux:

sudo badblocks -v /dev/sda1 > bad-blocks-result

*Adapter sda1 au HDD souhaité

détecter si un disque est SSD ou mécanique :

cat /sys/block/sda/queue/rotational

0=SSD
1=HDD

Mémoire

vider le cache de la mémoire vive : 

sudo sh -c 'echo 1 > /proc/sys/vm/drop_caches'

Info ram :

free -h

MAN :

Spoiler:

usage:free [-b|-k|-m|-g] [-l] [-o] [-t] [-s delay] [-c count] [-V]
-b,-k,-m,-g show output in bytes, KB, MB, or GB
-l show detailed low and high memory statistics
-o use old format (no -/+buffers/cache line)
-t display total for RAM + swap
-s update every [delay] seconds
-c update [count] times
-V display version information and exit

 

 

Systemd

 

Un peu de ménage

 

Un script permettant de retirer les anciens noyaux, maintenu dans le paquet byobu qui est disponible dans les dépôts Ubuntu.

sudo apt-get install byobu
sudo purge-old-kernels

Je viens de récupérer 750 Mo. Bon ça fait double emploi si on utilise BleachBeat.

Gestion des Polices (Fonts)

Généralement, il suffit de les copier dans le dossier ~/.fonts et de taper

fc-cache -fv

 

NMAP

Les Tableaux Nmap sont tous piqués à stationx.net  merci à eux 🙂

Target Specification

Switch

Example

Description

nmap 192.168.1.1 Scan a single IP
nmap 192.168.1.1 192.168.2.1 Scan specific IPs
nmap 192.168.1.1-254 Scan a range
nmap scanme.nmap.org Scan a domain
nmap 192.168.1.0/24 Scan using CIDR notation
-iL nmap -iL targets.txt Scan targets from a file
-iR nmap -iR 100 Scan 100 random hosts
--exclude nmap --exclude 192.168.1.1 Exclude listed hosts

Scan Techniques

Switch

Example

Description

-sS nmap 192.168.1.1 -sS TCP SYN port scan (Default)
-sT nmap 192.168.1.1 -sT

TCP connect port scan
(Default without root privilege)

-sU nmap 192.168.1.1 -sU UDP port scan
-sA nmap 192.168.1.1 -sA TCP ACK port scan
-sW nmap 192.168.1.1 -sW TCP Window port scan
-sM nmap 192.168.1.1 -sM TCP Maimon port scan

 

Host Discovery

Switch

Example

Description

-sL nmap 192.168.1.1-3 -sL No Scan. List targets only
-sn nmap 192.168.1.1/24 -sn Disable port scanning. Host discovery only.
-Pn nmap 192.168.1.1-5 -Pn Disable host discovery. Port scan only.
-PS nmap 192.168.1.1-5 -PS22-25,80 TCP SYN discovery on port x.

Port 80 by default

-PA nmap 192.168.1.1-5 -PA22-25,80 TCP ACK discovery on port x.

Port 80 by default

-PU nmap 192.168.1.1-5 -PU53 UDP discovery on port x.

Port 40125 by default

-PR nmap 192.168.1.1-1/24 -PR ARP discovery on local network
-n nmap 192.168.1.1 -n Never do DNS resolution

Port Specification

Switch

Example

Description

-p nmap 192.168.1.1 -p 21 Port scan for port x
-p nmap 192.168.1.1 -p 21-100 Port range
-p nmap 192.168.1.1 -p U:53,T:21-25,80 Port scan multiple TCP and UDP ports
-p- nmap 192.168.1.1 -p- Port scan all ports
-p nmap 192.168.1.1 -p http,https Port scan from service name
-F nmap 192.168.1.1 -F Fast port scan (100 ports)
--top-ports nmap 192.168.1.1 --top-ports 2000 Port scan the top x ports
-p-65535 nmap 192.168.1.1 -p-65535 Leaving off initial port in range
makes the scan start at port 1
-p0- nmap 192.168.1.1 -p0- Leaving off end port in range

makes the scan go through to port 65535

Service and Version Detection

Switch

Example

Description

-sV nmap 192.168.1.1 -sV Attempts to determine the version of the service running on port
-sV --version-intensity nmap 192.168.1.1 -sV --version-intensity 8 Intensity level 0 to 9. Higher number increases possibility of correctness
-sV --version-light nmap 192.168.1.1 -sV --version-light Enable light mode. Lower possibility of correctness. Faster
-sV --version-all nmap 192.168.1.1 -sV --version-all Enable intensity level 9. Higher possibility of correctness. Slower
-A nmap 192.168.1.1 -A Enables OS detection, version detection, script scanning, and traceroute

OS Detection

Switch

Example

Description

-O nmap 192.168.1.1 -O Remote OS detection using TCP/IP
stack fingerprinting
-O --osscan-limit nmap 192.168.1.1 -O --osscan-limit If at least one open and one closed
TCP port are not found it will not try
OS detection against host
-O --osscan-guess nmap 192.168.1.1 -O --osscan-guess Makes Nmap guess more aggressively
-O --max-os-tries nmap 192.168.1.1 -O --max-os-tries 1 Set the maximum number x of OS
detection tries against a target
-A nmap 192.168.1.1 -A Enables OS detection, version detection, script scanning, and traceroute

Timing and Performance

Switch

Example

Description

-T0 nmap 192.168.1.1 -T0 Paranoid (0) Intrusion Detection
System evasion
-T1 nmap 192.168.1.1 -T1 Sneaky (1) Intrusion Detection System
evasion
-T2 nmap 192.168.1.1 -T2 Polite (2) slows down the scan to use
less bandwidth and use less target
machine resources
-T3 nmap 192.168.1.1 -T3 Normal (3) which is default speed
-T4 nmap 192.168.1.1 -T4 Aggressive (4) speeds scans; assumes
you are on a reasonably fast and
reliable network
-T5 nmap 192.168.1.1 -T5 Insane (5) speeds scan; assumes you
are on an extraordinarily fast network

Switch

Example input

Description

--host-timeout <time> 1s; 4m; 2h Give up on target after this long
--min-rtt-timeout/max-rtt-timeout/initial-rtt-timeout <time> 1s; 4m; 2h Specifies probe round trip time
--min-hostgroup/max-hostgroup <size<size> 50; 1024 Parallel host scan group
sizes
--min-parallelism/max-parallelism <numprobes> 10; 1 Probe parallelization
--scan-delay/--max-scan-delay <time> 20ms; 2s; 4m; 5h Adjust delay between probes
--max-retries <tries> 3 Specify the maximum number
of port scan probe retransmissions
--min-rate <number> 100 Send packets no slower than <numberr> per second
--max-rate <number> 100 Send packets no faster than <number> per second

etc...

pdf dispo pour la suite

 

 

FMR

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *