mirror of
https://github.com/carlospolop/privilege-escalation-awesome-scripts-suite.git
synced 2025-12-07 17:41:29 +00:00
Compare commits
1 Commits
codex/repl
...
codex/modi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
64a6bb0ff6 |
@@ -33,7 +33,7 @@ if __name__ == "__main__":
|
||||
parser.add_argument('--small', action='store_true', help='Build small version of linpeas.')
|
||||
parser.add_argument('--include', type=str, help='Build linpeas only with the modules indicated you can indicate section names or module IDs).')
|
||||
parser.add_argument('--exclude', type=str, help='Exclude the given modules (you can indicate section names or module IDs).')
|
||||
parser.add_argument('--output', required=True, type=str, help='Path to write the final linpeas file to.')
|
||||
parser.add_argument('--output', required=True, type=str, help='Parth to write the final linpeas file to.')
|
||||
args = parser.parse_args()
|
||||
|
||||
all_modules = args.all
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace winPEAS.Tests
|
||||
{
|
||||
@@ -25,17 +26,28 @@ namespace winPEAS.Tests
|
||||
[TestMethod]
|
||||
public void ShouldDisplayHelp()
|
||||
{
|
||||
var originalOut = Console.Out;
|
||||
var sw = new StringWriter();
|
||||
try
|
||||
{
|
||||
Console.SetOut(sw);
|
||||
string[] args = new string[] {
|
||||
"help",
|
||||
};
|
||||
Program.Main(args);
|
||||
|
||||
string output = sw.ToString();
|
||||
Assert.IsTrue(output.Contains("WinPEAS is a binary"),
|
||||
"Help output did not contain expected text.");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Assert.Fail($"Exception thrown: {e.Message}");
|
||||
}
|
||||
finally
|
||||
{
|
||||
Console.SetOut(originalOut);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user