i think i would use a self generated ruleset for this with rules to delete or truncate at position X see https://hashcat.net/wiki/doku.php?id=rule_based_attack for futher details
you can use maskprocessor from hashcat team or the option --stdout from hashcat to help you generate these ruleset
i'll give you a starting point, with the first rules to delete chars from the end of the password (which will be the first thing you mentioned
option -i1:120 will tell increment given mask from 1 to max 120 positions, you will have to "expand" the ?1?1?1?1 to the lenght you will need (use c&p on commandline, use a fixed lenght of lets say ten, and copy this till you reach your desired lenght
this will generate a ruleset ] to ]]]] meaning delete last, to delete last 4 times
to see that this works i made a pass.txt with string and ran hashcat with
output is
as you can see this would delete the pass from the end, given the the max length of the rules
to achieve the second point you will have to mostly do the same but with [ instead of ]
and combine the two rules with hahscat tool combinator
using this ruleset like above would do this to the string 0123456789
this ruleset "isnt really complete" you will have to manually copy the content of ruleend.rule and rulestart.rule into these rulefull.rule to get the basic delete combinations as well
yeah, this should do the whole trick you want to achieve
you can use maskprocessor from hashcat team or the option --stdout from hashcat to help you generate these ruleset
i'll give you a starting point, with the first rules to delete chars from the end of the password (which will be the first thing you mentioned
option -i1:120 will tell increment given mask from 1 to max 120 positions, you will have to "expand" the ?1?1?1?1 to the lenght you will need (use c&p on commandline, use a fixed lenght of lets say ten, and copy this till you reach your desired lenght
Code:
mp32.exe -i1:120 -1 ] ?1?1?1?1 >> ruleend.rulethis will generate a ruleset ] to ]]]] meaning delete last, to delete last 4 times
to see that this works i made a pass.txt with string
Code:
0123456789Code:
hashcat --stdout -r ruleend.rule pass.txtoutput is
Code:
012345678
01234567
0123456
012345as you can see this would delete the pass from the end, given the the max length of the rules
to achieve the second point you will have to mostly do the same but with [ instead of ]
Code:
mp32.exe -i1:120 -1 [ ?1?1?1?1 >> rulestart.ruleand combine the two rules with hahscat tool combinator
Code:
combinator ruleend.rule rulestart.rule > rulefull.ruleusing this ruleset like above would do this to the string 0123456789
Code:
12345678
2345678
345678
45678
1234567
234567
34567
4567
123456
23456
3456
456
12345
2345
345
45this ruleset "isnt really complete" you will have to manually copy the content of ruleend.rule and rulestart.rule into these rulefull.rule to get the basic delete combinations as well
yeah, this should do the whole trick you want to achieve
