@@ -190,6 +190,7 @@ private async Task MessageShufflerForExtension()
190
190
string sNewBody = await response . Content . ReadAsStringAsync ( ) ;
191
191
if ( ! sNewBody . Contains ( "Fiddler Echo" ) )
192
192
{
193
+ log ( "Replacing message body with overridden text from Fiddler." ) ;
193
194
sMessage = sNewBody ;
194
195
}
195
196
}
@@ -199,11 +200,13 @@ private async Task MessageShufflerForExtension()
199
200
log ( $ "Call to Fiddler failed: { e . Message } ") ;
200
201
}
201
202
}
203
+
202
204
if ( oSettings . bReflectToExtension &&
203
205
( sMessage . Length < ( 1024 * 1024 ) ) ) // Don't reflect messages over 1mb. They're illegal!
204
206
{
205
207
await WriteToExtension ( sMessage ) ;
206
208
}
209
+
207
210
if ( null != oSettings . strmToApp )
208
211
{
209
212
await WriteToApp ( sMessage ) ;
@@ -281,6 +284,7 @@ private async Task MessageShufflerForApp()
281
284
string sNewBody = await response . Content . ReadAsStringAsync ( ) ;
282
285
if ( ! sNewBody . Contains ( "Fiddler Echo" ) )
283
286
{
287
+ log ( "Replacing message body with overridden text from Fiddler." ) ;
284
288
sMessage = sNewBody ;
285
289
}
286
290
}
@@ -290,6 +294,7 @@ private async Task MessageShufflerForApp()
290
294
log ( $ "Call to Fiddler failed: { e . Message } ") ;
291
295
}
292
296
}
297
+
293
298
if ( null != oSettings . strmToExt )
294
299
{
295
300
await WriteToExtension ( sMessage ) ;
@@ -352,6 +357,10 @@ private void frmMain_Load(object sender, EventArgs e)
352
357
) ;
353
358
tcApp . SelectedTab = pageAbout ;
354
359
}
360
+ else
361
+ {
362
+ log ( $ "extension: { oSettings . sExtensionID } ") ;
363
+ }
355
364
if ( arrArgs . Length > 2 )
356
365
{
357
366
// The parent-window value is only non-zero when the calling context is not a background script.
@@ -368,9 +377,11 @@ private void frmMain_Load(object sender, EventArgs e)
368
377
toolTip1 . SetToolTip ( pbApp , $ "Click to set the ClientHandler to another instance of this app.") ;
369
378
log ( "Listening for messages..." ) ;
370
379
371
- // clbOptions.SetItemChecked(1, true); Fiddler
372
- clbOptions . SetItemChecked ( 2 , true ) ;
373
- clbOptions . SetItemChecked ( 3 , true ) ;
380
+ clbOptions . SetItemChecked ( 2 , true ) ; // Propagate closures
381
+ clbOptions . SetItemChecked ( 3 , true ) ; // Record bodies
382
+ string sCurrentExe = Application . ExecutablePath ;
383
+ if ( sCurrentExe . Contains ( ".fiddler." ) ) clbOptions . SetItemChecked ( 1 , true ) ;
384
+ if ( sCurrentExe . Contains ( ".log." ) ) clbOptions . SetItemChecked ( 4 , true ) ;
374
385
375
386
if ( oSettings . sExtensionID != "unknown" ) ConnectMostLikelyApp ( ) ;
376
387
WaitForMessages ( ) ;
@@ -425,8 +436,9 @@ private void pbApp_Click(object sender, EventArgs e)
425
436
private bool ConnectMostLikelyApp ( )
426
437
{
427
438
// If we are RealHost.proxy.exe, then see whether RealHost.exe exists, and if so, use that.
428
- string sCurrentExe = Application . ExecutablePath ;
429
- if ( sCurrentExe . IndexOf ( "proxy." , StringComparison . OrdinalIgnoreCase ) > - 1 )
439
+ // Remove any option flags in the command line.
440
+ string sCurrentExe = Application . ExecutablePath . Replace ( ".log" , string . Empty ) . Replace ( ".fiddler" , string . Empty ) ;
441
+ if ( sCurrentExe . Contains ( ".proxy" ) )
430
442
{
431
443
string sCandidate = sCurrentExe . Replace ( ".proxy" , string . Empty ) ;
432
444
log ( $ "Checking for { sCandidate } ...") ;
@@ -688,18 +700,30 @@ private void lvHosts_KeyDown(object sender, KeyEventArgs e)
688
700
( sender as HostListView ) . SelectAll ( ) ;
689
701
return ;
690
702
}
703
+ if ( ( e . Modifiers == Keys . Alt ) && e . KeyCode == Keys . Enter )
704
+ {
705
+ e . SuppressKeyPress = true ;
706
+ ShowSelectedManifestInExplorer ( ) ;
707
+ return ;
708
+ }
691
709
}
692
710
693
711
private void lvHosts_MouseDoubleClick ( object sender , MouseEventArgs e )
694
712
{
695
713
if ( ( Control . ModifierKeys == Keys . Alt ) && ( lvHosts . SelectedItems . Count == 1 ) )
696
714
{
697
- ListViewItem oLVI = lvHosts . SelectedItems [ 0 ] ;
698
- RegisteredHosts . HostEntry oHE = ( RegisteredHosts . HostEntry ) oLVI . Tag ;
699
- Utilities . OpenRegeditTo ( oHE . RegistryKeyPath ) ;
715
+ ShowSelectedManifestInExplorer ( ) ;
700
716
}
701
717
}
702
718
719
+ private void ShowSelectedManifestInExplorer ( )
720
+ {
721
+ ListViewItem oLVI = lvHosts . SelectedItems [ 0 ] ;
722
+ RegisteredHosts . HostEntry oHE = ( RegisteredHosts . HostEntry ) oLVI . Tag ;
723
+ Utilities . OpenExplorerTo ( oHE . ManifestFilename ) ;
724
+ // Utilities.OpenRegeditTo(oHE.RegistryKeyPath);
725
+ }
726
+
703
727
private void frmMain_FormClosed ( object sender , FormClosedEventArgs e )
704
728
{
705
729
detachApp ( ) ;
0 commit comments