This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ruby> | |
| if Process.uid == 0 | |
| # Set Variables | |
| scanned_hosts = [] | |
| # Collect host already scanned with nmap | |
| print_status("Collecting hosts already scanned by nmap.") | |
| framework.db.notes.each do |n| | |
| if n.ntype =~ /host.nmap/ | |
| scanned_hosts << n.host_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ruby> | |
| if Process.uid == 0 | |
| # Set Variables | |
| scanned_hosts = [] | |
| # Collect host already scanned with nmap | |
| print_status("Collecting hosts already scanned by nmap.") | |
| framework.db.notes.each do |n| | |
| if n.ntype =~ /host.nmap/ | |
| scanned_hosts << n.host_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PS C:\Users\Carlos\Desktop> Import-NessusKB -KBFile .\lab.txt -InfoType Successful | |
| PluginID Stated | |
| -------- ------ | |
| 11011 Successful | |
| 10736 Successful | |
| 10150 Successful | |
| 10785 Successful |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $webclient = New-Object System.Net.WebClient | |
| $url = "https://github.com/darkoperator/Posh-SSH/archive/master.zip" | |
| Write-Host "Downloading latest version of Posh-SSH from $url" -ForegroundColor Cyan | |
| $file = "$($env:TEMP)\Posh-SSH.zip" | |
| $webclient.DownloadFile($url,$file) | |
| Write-Host "File saved to $file" -ForegroundColor Green | |
| $targetondisk = "$($env:USERPROFILE)\Documents\WindowsPowerShell\Modules" | |
| New-Item -ItemType Directory -Force -Path $targetondisk | out-null | |
| $shell_app=new-object -com shell.application | |
| $zip_file = $shell_app.namespace($file) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Make sure the module is not loaded | |
| Remove-Module posh-secmod -ErrorAction SilentlyContinue | |
| # Download latest version | |
| $webclient = New-Object System.Net.WebClient | |
| $url = "https://github.com/darkoperator/Posh-SecMod/archive/master.zip" | |
| Write-Host "Downloading latest version of Posh-SecMod from $url" -ForegroundColor Cyan | |
| $file = "$($env:TEMP)\Posh-SecMod.zip" | |
| $webclient.DownloadFile($url,$file) | |
| Write-Host "File saved to $file" -ForegroundColor Green | |
| # Unblock and Decompress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| import smtplib | |
| import socket | |
| from email.mime.text import MIMEText | |
| import datetime | |
| # Change to your own account information | |
| to = '<your number>@txt.att.net ' | |
| gmail_user = '' | |
| gmail_password = '' | |
| smtpserver = smtplib.SMTP('smtp.gmail.com', 587) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"reply":{"status":"OK", "contents":{"reports":{"report":[{"id":3, "name":"Pcap Vulnerability Scanning Report - Jan 14 2014 07:19:00", "status":"completed", "last_upd | |
| ated_time":"2014-01-14 07:19:00", "snapshot_id":0}, {"id":4, "name":"Monitoring Snapshot - Jan 15 2014 20:06:52", "status":"completed", "last_updated_time":"2014-01-1 | |
| 5 20:06:52", "snapshot_id":1}, {"id":5, "name":"Monitoring Snapshot - Jan 15 2014 20:21:52", "status":"completed", "last_updated_time":"2014-01-15 20:21:52", "snapsho | |
| t_id":2}, {"id":6, "name":"Monitoring Snapshot - Jan 15 2014 20:36:52", "status":"completed", "last_updated_time":"2014-01-15 20:36:52", "snapshot_id":3}, {"id":7, "n | |
| ame":"Monitoring Snapshot - Jan 15 2014 21:02:23", "status":"completed", "last_updated_time":"2014-01-15 21:02:23", "snapshot_id":4}, {"id":8, "name":"Monitoring Snap | |
| shot - Jan 15 2014 21:17:23", "status":"completed", "last_updated_time":"2014-01-15 21:17:23", "snapshot_id":5}, {"id":9, "name":"Monitoring Snapshot - Jan 15 2014 21 | |
| :32:23", "status":"com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [void][System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") | |
| $Serializer = New-Object System.Web.Script.Serialization.JavaScriptSerializer | |
| $json = $server_reply.Content | |
| $Deserialized = $Serializer.DeserializeObject($json) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Make sure the module is not loaded | |
| Remove-Module Posh-VirusTotal -ErrorAction SilentlyContinue | |
| # Download latest version | |
| $webclient = New-Object System.Net.WebClient | |
| $url = "https://github.com/darkoperator/Posh-VirusTotal/archive/master.zip" | |
| Write-Host "Downloading latest version of Posh-VirusTotal from $url" -ForegroundColor Cyan | |
| $file = "$($env:TEMP)\Posh-VirusTotal.zip" | |
| $webclient.DownloadFile($url,$file) | |
| Write-Host "File saved to $file" -ForegroundColor Green | |
| # Unblock and Decompress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function Import-ShodanAPIKey | |
| { | |
| [CmdletBinding()] | |
| Param | |
| ( | |
| [Parameter(Mandatory=$true, | |
| ValueFromPipelineByPropertyName=$true, | |
| Position=1)] | |
| [securestring]$MasterPassword |