Skip to content

Commit

Permalink
setup initial challenge OWASP/wrongsecrets#1243
Browse files Browse the repository at this point in the history
  • Loading branch information
commjoen committed Feb 27, 2024
1 parent 6759378 commit 4987365
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 11 deletions.
37 changes: 30 additions & 7 deletions dotnet/dotnetproject/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
// See https://aka.ms/new-console-template for more information
if(args.Length==0){

String getSecret()
{
return "This is a dotnet secret, huray.";
}

String evalAnswer(String answer)
{
if (String.Compare(answer, getSecret()) == 0)
{
return "This is correct! Congrats!";
}
else
{
return "This is incorrect. Try again";
}
}

if (args.Length == 0)
{
Console.WriteLine("Welcome to the wrongsecrets dotnet binary which hides a secret.");
Console.WriteLine("Use args spoil or a string to guess the password.");
} else {
if(args[0] == "spoil"){
}
else
{
if (args[0] == "spoil")
{
Console.WriteLine("spoil called");
} else {
Console.WriteLine(args[0]);
Console.WriteLine(getSecret());
}
else
{
Console.WriteLine(evalAnswer(args[0]));
}
}


8 changes: 4 additions & 4 deletions dotnet/dotnetproject/obj/project.nuget.cache
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@
"projectFilePath": "/Users/razr/workspace/owasp/wrongsecrets-binaries/dotnet/dotnetproject/dotnetproject.csproj",
"expectedPackageFiles": [
"/Users/razr/.nuget/packages/microsoft.net.illink.tasks/8.0.1/microsoft.net.illink.tasks.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.linux-musl-arm64/8.0.1/microsoft.netcore.app.runtime.linux-musl-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.osx-arm64/8.0.1/microsoft.netcore.app.runtime.osx-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.win-x64/8.0.1/microsoft.netcore.app.runtime.win-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.win-arm64/8.0.1/microsoft.netcore.app.runtime.win-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.linux-x64/8.0.1/microsoft.netcore.app.runtime.linux-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.linux-arm64/8.0.1/microsoft.netcore.app.runtime.linux-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.linux-musl-x64/8.0.1/microsoft.netcore.app.runtime.linux-musl-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.linux-musl-arm64/8.0.1/microsoft.aspnetcore.app.runtime.linux-musl-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.runtime.linux-musl-arm64/8.0.1/microsoft.netcore.app.runtime.linux-musl-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.osx-arm64/8.0.1/microsoft.aspnetcore.app.runtime.osx-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.win-x64/8.0.1/microsoft.aspnetcore.app.runtime.win-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.win-arm64/8.0.1/microsoft.aspnetcore.app.runtime.win-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.linux-x64/8.0.1/microsoft.aspnetcore.app.runtime.linux-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.linux-arm64/8.0.1/microsoft.aspnetcore.app.runtime.linux-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.linux-musl-x64/8.0.1/microsoft.aspnetcore.app.runtime.linux-musl-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.linux-musl-arm64/8.0.1/microsoft.netcore.app.host.linux-musl-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.aspnetcore.app.runtime.linux-musl-arm64/8.0.1/microsoft.aspnetcore.app.runtime.linux-musl-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.osx-arm64/8.0.1/microsoft.netcore.app.host.osx-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.win-x64/8.0.1/microsoft.netcore.app.host.win-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.win-arm64/8.0.1/microsoft.netcore.app.host.win-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.linux-x64/8.0.1/microsoft.netcore.app.host.linux-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.linux-arm64/8.0.1/microsoft.netcore.app.host.linux-arm64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.linux-musl-x64/8.0.1/microsoft.netcore.app.host.linux-musl-x64.8.0.1.nupkg.sha512"
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.linux-musl-x64/8.0.1/microsoft.netcore.app.host.linux-musl-x64.8.0.1.nupkg.sha512",
"/Users/razr/.nuget/packages/microsoft.netcore.app.host.linux-musl-arm64/8.0.1/microsoft.netcore.app.host.linux-musl-arm64.8.0.1.nupkg.sha512"
],
"logs": []
}

0 comments on commit 4987365

Please sign in to comment.