PowerShell - Ejecucion Powershell Pentesting

 
Vista:

Ejecucion Powershell Pentesting

Publicado por Miguel (1 intervención) el 25/02/2020 20:31:07
Buenas,

Estoy intentando crear un script para ejecutar ciertas utilidades de powershell como escanear ips, escanear puertos,etc
si ejecuto linea por linea me funciona bastante bien, pero al ejecutar en ps1 no me funciona.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Aplicacion para hacer pentesting
Set-ExecutionPolicy Unrestricted
#Carpeta destino
Set-Location C:\Pentesting
#Desbloquear las carpetas
Get-ChildItem .\nishang-master\ -Recurse | Unblock-File
Get-ChildItem .\Posh-SecMod-master\ -Recurse | Unblock-File
Get-ChildItem .\Posh-Shodan-master\ -Recurse | Unblock-File
Get-ChildItem .\PowerSploit-master\ -Recurse | Unblock-File
#Importar Modulo de Nishang
Import-Module .\nishang-master\nishang.psm1
#Leer Primera Variable
$IP1 = Read-Host -Prompt "Introduce la direccion IP inicial"
#Leer Segunda Variable
$IP2 = Read-Host -Prompt "Introduce la direccion IP inicial"
#Ejectura Escaneo de Puertos conNishan
invoke-Portscan -StartAddress $IP1 -EndAddress $IP2
Pause



Atento a sus comentarios
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder