Skip to content

Commit d6d450f

Browse files
committed
nishang.psm1 is a bit more intelligent now.
1 parent e5ad0a4 commit d6d450f

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

Prasadhak/Prasadhak.ps1 renamed to Prasadhak/Invoke-Prasadhak.ps1

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Requires -Version 3
22

3-
function Prasadhak
3+
function Invoke-Prasadhak
44
{
55

66
<#
@@ -15,14 +15,14 @@ on the target system and search the hashes in the Virustotal database using the
1515
THe APIKEY provided when someone registers to virustotal
1616
1717
.EXAMPLE
18-
PS > Prasadhak -APIKEY 1fe0ef5feca2f84eb450bc3617f839e317b2a686af4d651a9bada77a522201b0
18+
PS > Invoke-Prasadhak -APIKEY 1fe0ef5feca2f84eb450bc3617f839e317b2a686af4d651a9bada77a522201b0
1919
2020
.LINK
21-
http://www.labofapenetrationtester.com/2013/01/introducing-prasadhak.html
21+
http://www.labofapenetrationtester.com/2013/01/introducing-Invoke-Prasadhak.html
2222
https://github.com/samratashok/nishang
2323
2424
.Notes
25-
The word Prasadhak means purifier in Sanskrit language.
25+
The word Invoke-Prasadhak means purifier in Sanskrit language.
2626
#>
2727
[CmdletBinding()] Param(
2828
[Parameter(Position = 0, Mandatory = $True)]

nishang.psm1

+14-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@ https://github.com/samratashok/nishang
99
#>
1010

1111

12-
#Code stolen from here https://github.com/mattifestation/PowerSploit
13-
Get-ChildItem -Recurse (Join-Path $PSScriptRoot *.ps1) | ForEach-Object { if ($_.Name -ne "Keylogger.ps1") {. $_.FullName}}
12+
if(!$PSScriptRoot)
13+
{
14+
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
15+
}
16+
17+
if ($PSVersionTable.PSVersion.Major -eq 2)
18+
{
19+
#Code stolen from here https://github.com/mattifestation/PowerSploit
20+
Get-ChildItem -Recurse $PSScriptRoot *.ps1 | Where-Object {($_.Name -ne 'Keylogger.ps1'-or $_.Name -ne 'Invoke-Prasadhak.ps1' -or $_.Name -ne 'Get-WebCredentials.ps1')} | ForEach-Object {Import-Module $_.FullName -DisableNameChecking}
21+
}
22+
else
23+
{
24+
Get-ChildItem -Recurse $PSScriptRoot *.ps1 | Where-Object {($_.Name -ne 'Keylogger.ps1')} | ForEach-Object {Import-Module $_.FullName -DisableNameChecking}
25+
}
1426

0 commit comments

Comments
 (0)