IPreprocessingStep IPreprocessingManagerExtension.DetectFormat(PreprocessingStepParams fileInfo, IStreamHeader header) { if (IsHttpArchiveFormat(header)) { return(new TextConversionPreprocessingStep(preprocessingStepsFactory, harLogsFactory, fileInfo)); } return(null); }
async Task <PreprocessingStepParams> IPreprocessingStep.ExecuteLoadedStep(IPreprocessingStepCallback callback) { PreprocessingStepParams ret = null; await ExecuteInternal(callback, x => { ret = x; }); return(ret); }
internal DownloadStep( Preprocessing.IStepsFactory preprocessingStepsFactory, WebViewTools.IWebViewTools webViewTools, PreprocessingStepParams source ) : this(preprocessingStepsFactory, webViewTools) { this.source = source; }
IPreprocessingStep IPreprocessingManagerExtension.DetectFormat(PreprocessingStepParams fileInfo, IStreamHeader header) { if (IsWebrtcInternalsDump(header)) { return(new JsonUnpackPreprocessingStep(preprocessingStepsFactory, fileInfo)); } return(null); }
IPreprocessingStep IPreprocessingManagerExtension.DetectFormat(PreprocessingStepParams fileInfo, IStreamHeader header) { if (IsChromeDriverFormat(header)) { return(new TimeFixerPreprocessingStep(preprocessingStepsFactory, chromeDriverLogsFactory, fileInfo)); } return(null); }
internal DownloadStep( Preprocessing.IStepsFactory preprocessingStepsFactory, WebViewTools.IWebViewTools webViewTools, IReadOnlyCollection <string> ids, DateTime referenceTime, string env ) : this(preprocessingStepsFactory, webViewTools) { source = new PreprocessingStepParams(MakeUrl(ids, referenceTime, env)); }
internal TimeFixerPreprocessingStep( IPreprocessingStepsFactory preprocessingStepsFactory, ILogProviderFactory chromeDriverLogsFactory, PreprocessingStepParams srcFile ) { this.preprocessingStepsFactory = preprocessingStepsFactory; this.sourceFile = srcFile; this.chromeDriverLogsFactory = chromeDriverLogsFactory; }
internal TextConversionPreprocessingStep( IStepsFactory preprocessingStepsFactory, ILogProviderFactory harLogsFactory, PreprocessingStepParams srcFile ) { this.preprocessingStepsFactory = preprocessingStepsFactory; this.sourceFile = srcFile; this.harLogsFactory = harLogsFactory; }
internal TimeFixerPreprocessingStep( IStepsFactory preprocessingStepsFactory, ILogProviderFactory chromeDriverLogsFactory, PreprocessingStepParams srcFile, ITextLogParser textLogParser ) { this.preprocessingStepsFactory = preprocessingStepsFactory; this.sourceFile = srcFile; this.chromeDriverLogsFactory = chromeDriverLogsFactory; this.textLogParser = textLogParser; }
IPreprocessingStep IPreprocessingManagerExtension.DetectFormat(PreprocessingStepParams fileInfo, IStreamHeader header) { if (tshark.IsAvailable) { if (IsPcap(header)) { return new SaveParamsStep() { state = preprocessingsState, pcap = fileInfo } } ; else if (IsKeys(header)) { return new SaveParamsStep() { state = preprocessingsState, key = fileInfo } } ; } return(null); } IPreprocessingStep IPreprocessingManagerExtension.CreateStepByName(string stepName, PreprocessingStepParams stepParams) { if (stepName == PcapUnpackPreprocessingStep.stepName) { return(preprocessingStepsFactory.CreatePcapUnpackStep(stepParams, null)); } return(null); } IPreprocessingStep IPreprocessingManagerExtension.TryParseLaunchUri(Uri url) { return(null); } Task IPreprocessingManagerExtension.FinalizePreprocessing(IPreprocessingStepCallback callback) { if (preprocessingsState.preprocessings.TryRemove(callback.Owner, out var prepState)) { foreach (var pcap in prepState.pcaps) { callback.YieldNextStep(preprocessingStepsFactory.CreatePcapUnpackStep(pcap, prepState.keys.ToArray())); } } return(Task.FromResult(0)); }
internal PcapUnpackPreprocessingStep( Preprocessing.IStepsFactory preprocessingStepsFactory, ITShark tshark, PreprocessingStepParams srcFile, PreprocessingStepParams[] keyFiles) { this.preprocessingStepsFactory = preprocessingStepsFactory; this.sourceFile = srcFile; this.tshark = tshark; if (keyFiles != null) { this.getKeyFiles = (IPreprocessingStepCallback _) => Task.FromResult(keyFiles); } else if (srcFile?.Argument != null) { this.getKeyFiles = (IPreprocessingStepCallback callback) => Task.WhenAll(StepArgument.Parse(srcFile.Argument).Select(history => callback.ReplayHistory(history))); } else { this.getKeyFiles = (IPreprocessingStepCallback _) => Task.FromResult(new PreprocessingStepParams[0]); } }
internal JsonUnpackPreprocessingStep(Preprocessing.IStepsFactory preprocessingStepsFactory, PreprocessingStepParams srcFile) { this.preprocessingStepsFactory = preprocessingStepsFactory; this.sourceFile = srcFile; }
IPreprocessingStep IPreprocessingManagerExtension.CreateStepByName(string stepName, PreprocessingStepParams stepParams) { if (stepName == JsonUnpackPreprocessingStep.stepName) { return(new JsonUnpackPreprocessingStep(preprocessingStepsFactory, stepParams)); } return(null); }
IPreprocessingStep IPreprocessingStepsFactory.CreateDownloadBackendLogsStep( PreprocessingStepParams stepParams) { return(new DownloadStep(preprocessingStepsFactory, webViewTools, contentCache, stepParams)); }
IPreprocessingStep IPreprocessingManagerExtension.CreateStepByName(string stepName, PreprocessingStepParams stepParams) { if (stepName == DownloadStep.stepName) { return(preprocessingStepsFactory.CreateDownloadBackendLogsStep(stepParams)); } return(null); }
IPreprocessingStep IPreprocessingManagerExtension.DetectFormat(PreprocessingStepParams fileInfo, IStreamHeader header) { return(null); }
IPreprocessingStep IPreprocessingManagerExtension.CreateStepByName(string stepName, PreprocessingStepParams stepParams) { if (stepName == TimeFixerPreprocessingStep.stepName) { return(new TimeFixerPreprocessingStep(preprocessingStepsFactory, chromeDriverLogsFactory, stepParams)); } return(null); }
IPreprocessingStep IPreprocessingManagerExtension.CreateStepByName(string stepName, PreprocessingStepParams stepParams) { if (stepName == TextConversionPreprocessingStep.stepName) { return(new TextConversionPreprocessingStep(preprocessingStepsFactory, harLogsFactory, stepParams)); } return(null); }
IPreprocessingStep IPreprocessingStepsFactory.CreatePcapUnpackStep(PreprocessingStepParams fileInfo, PreprocessingStepParams[] keyInfo) { return(new PcapUnpackPreprocessingStep(preprocessingStepsFactory, tshark, fileInfo, keyInfo)); }