Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
This fixes a bug when `ysoserial.exe -f "json.net" --rawcmd --raf -c "calc"` returns invalid results
  • Loading branch information
irsdl committed Jul 21, 2022
1 parent a16d375 commit 7a337f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ysoserial/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static void Main(string[] args)
if (formatter.IndexOf(formatter_name, StringComparison.OrdinalIgnoreCase) >= 0)
{
// only keeping the first part of formatter that contains alphanumerical to ignore variants or other descriptions
string current_formatter_name = Regex.Split(formatter, @"[^\w$_\-]")[0];
string current_formatter_name = Regex.Split(formatter, @"[^\w$_\-.]")[0];
Console.Write("\r\n\r\n(*) Gadget: " + gg.Name() + " - Formatter: " + current_formatter_name + " - ");

outputformat = GetDefaultOutputFormat(current_formatter_name);
Expand Down

0 comments on commit 7a337f0

Please sign in to comment.