public object GenerateWithNoTest(string formatter, InputArgs inputArgs) { InputArgs tempInputArgs = inputArgs.DeepCopy(); tempInputArgs.Test = false; return(GenerateWithInit(formatter, tempInputArgs)); }
public object SerializeWithNoTest(object payloadObj, string formatter, InputArgs inputArgs) { InputArgs tempInputArgs = inputArgs.DeepCopy(); tempInputArgs.Test = false; return(SerializeWithInit(payloadObj, formatter, tempInputArgs)); }
public virtual void Init(InputArgs inputArgs) { // Overridable to provide more flexibility for rare cases OptionSet options = Options(); if (options != null) { InputArgs tempInputArgs = inputArgs.DeepCopy(); if (tempInputArgs.ExtraInternalArguments.Count > 0) { // This means it is an internal call from other gadgets or plugins so current ExtraArguments becomes irrelevant and ExtraInternalArguments are important tempInputArgs.ExtraArguments = tempInputArgs.ExtraInternalArguments; tempInputArgs.ExtraInternalArguments = new List <string>(); // Clearing the list to prevent double use just in case! } try { List <String> extraArguments = Options().Parse(tempInputArgs.ExtraArguments); } catch (OptionException e) { Console.Write("ysoserial: "); Console.WriteLine(e.Message); Console.WriteLine("Extra options for " + Name() + " are as follows:"); options.WriteOptionDescriptions(Console.Out); System.Environment.Exit(-1); } } }