Outils pour utilisateurs

Outils du site


scripts

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
scripts [2026/01/02 15:43] – [COMMANDES DE BASES] huracanscripts [2026/01/07 14:07] (Version actuelle) – [MODIF PORT ECOUTE RDP] huracan
Ligne 282: Ligne 282:
 ---- ----
  
 +==== MODIF PORT ECOUTE RDP ====
 +
 +Pour vérif port actuel:
 +
 +  Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name 'PortNumber'
 +
 +Modifiez le port:
 +
 +  $portValue = '<Port Number>'
 +  Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name 'PortNumber' -Value $portValue
 +
 +Ajouter le port au FW:
 +
 +  $portValue = '<Port Number>'
 +  New-NetFirewallRule -DisplayName 'RDPPORTLatest-TCP-In' -Profile Public -Direction Inbound -Action Allow -Protocol TCP -LocalPort $portValue
 +  New-NetFirewallRule -DisplayName 'RDPPORTLatest-UDP-In' -Profile Public -Direction Inbound -Action Allow -Protocol UDP -LocalPort $portValue
 +
 +----
  
 ==== Afficher variables Windows CMD ==== ==== Afficher variables Windows CMD ====
Ligne 1304: Ligne 1322:
  
  
-#!/bin/bash +  #!/bin/bash 
-+  
-#exemple d'execution: ./scan_sub.sh 172.16.50.0/24 +  #exemple d'execution: ./scan_sub.sh 172.16.50.0/24 
-+  
-nmap -sP -PE -sn $1 -oG - | awk '/Up$/{print $2}'+  nmap -sP -PE -sn $1 -oG - | awk '/Up$/{print $2}'
  
  
scripts.1767364983.txt.gz · Dernière modification : 2026/01/02 15:43 de huracan

DokuWiki Appliance - Powered by TurnKey Linux