-
Notifications
You must be signed in to change notification settings - Fork 1
/
addCracked.cna
executable file
·44 lines (41 loc) · 1.39 KB
/
addCracked.cna
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#############
# Adds cracked credentials back into CS
# File must be in *hash*:*password* format to add correctly
# Should not add duplicates
#############
sub addCrackedCreds {
$currentCreds = credentials();
prompt_file_open("Choose hashcat.potfile:", $null, false,
{
$handle = openf($1);
while $crackedPass (readln($handle))
{
($hashFromPot, $password) = split(':',$crackedPass);
foreach $hash ($currentCreds)
{
if (($hashFromPot eq $hash['password']) && ($password ne ""))
{
$newCreds = credentials();
$isThere = false;
foreach $checkHash ($newCreds)
{
if (($hash['user'] eq $checkHash['user']) && ($checkHash['password'] eq $password))
{
$isThere = true;
}
}
if ($isThere eq false)
{
credential_add($hash['user'],$password,$hash['realm'],"Cracked",$hash['host']);
}
#privmsg("mike",$hash['user'] . " " . $password . " " . $hash['realm'] . " " . "Cracked" . " " . $hash['host'])
}
}
}
});
}
popup attacks
{
item "Add hashcat.potfile" {
addCrackedCreds();}
}