# Adaptive attack 102 - 5 iterations, new candidates based on old cracked passwords
# Inputs: dictionary and bruteforce parameters. Initial model based solely on dictionary
# Can further train if you provide the final cracked list as input again
#
# This rule is improved by applying togglecase. Cracked passwords tested against deletep.
# 
# Parameters:
#
# $1 - min. length
# $2 - max. length
# $3 - charset
# $4 - additional charset elements
# $5 - dictionary
#
# Example: hashkill ... -r adaptive102 -a '1:6:lalphanum:!@#$:mydict.txt'
#

$Generate initial candidates
begin
must add dict $5
end



$Iteration 1
begin
must add passwords
must deletep
end
begin
must add passwords
must add set $1:$2:$3:$4
end
begin
must add set $1:$2:$3:$4
must add passwords
end
begin
must add passwords
must togglecase
end


$Iteration 2
begin
must add passwords
must deletep
end
begin
must add passwords
must add set $1:$2:$3:$4
end
begin
must add set $1:$2:$3:$4
must add passwords
end
begin
must add passwords
must togglecase
end

$Iteration 3
begin
must add passwords
must deletep
end
begin
must add passwords
must add set $1:$2:$3:$4
end
begin
must add set $1:$2:$3:$4
must add passwords
end
begin
must add passwords
must togglecase
end

$Iteration 4
begin
must add passwords
must deletep
end
begin
must add passwords
must add set $1:$2:$3:$4
end
begin
must add set $1:$2:$3:$4
must add passwords
end
begin
must add passwords
must togglecase
end


$Iteration 5
begin
must add passwords
must deletep
end
begin
must add passwords
must add set $1:$2:$3:$4
end
begin
must add set $1:$2:$3:$4
must add passwords
end
begin
must add passwords
must togglecase
end
