Is there a way to detect if the separator is : and not ;?

Sometimes the separator I get on wordlists is ; and not :. This is acceptable to replace all ; with : in the wordlists as some passwords contain ;. Looking for an efficient solution to this.

Any ideas on what to do? I’m thinking of doing Regex with something like:

(\@.*\..*)(\;) - and then replace $1 with :

I’m confused with Regex Replace function.

BLOCK:ConstantList
  value = ["[email protected];;dlr;rlt!", "[email protected];:f!ftl78", "[email protected]:glgl;!"]
  => VAR @var
ENDBLOCK

FOREACH elem IN var
BLOCK:Parse
  input = $"<elem>"
  pattern = ".+\\@\\w+\\.\\w+(\\;?).+"
  outputFormat = "[1]"
  MODE:Regex
  => VAR @parseOutput
ENDBLOCK

IF STRINGKEY @parseOutput EqualTo ";"
BLOCK:RegexReplace
  original = $"<elem>"
  pattern = "(.+\\@\\w+\\.\\w+)\\;(.+)"
  replacement = "$1:$2"
  => VAR @regexReplaceOutput
ENDBLOCK

BLOCK:FileAppend
  path = "combonew.txt"
  content = $"<regexReplaceOutput>\\n"
ENDBLOCK

ELSE
BLOCK:FileAppend
  path = "combonew.txt"
  content = $"<elem>\\n"
ENDBLOCK
END
END

gives

[email protected]:;dlr;rlt!
[email protected]::f!ftl78
[email protected]:glgl;!
1 Like