Fiddler Script for DBD dev build - Pastebin.com (2023)

  1. import System;

  2. import System.Windows.Forms;

  3. import Fiddler;

  4. // INTRODUCTION

  5. //

  6. // Well, hello there!

  7. //

  8. // Don't be scared! :-)

  9. //

  10. // This is the FiddlerScript Rules file, which creates some of the menu commands and

  11. // other features of Fiddler. You can edit this file to modify or add new commands.

  12. //

  13. // The original version of this file is named SampleRules.js and it is in the

  14. // \Program Files\Fiddler\ folder. When Fiddler first runs, it creates a copy named

  15. // CustomRules.js inside your \Documents\Fiddler2\Scripts folder. If you make a

  16. // mistake in editing this file, simply delete the CustomRules.js file and restart

  17. // Fiddler. A fresh copy of the default rules will be created from the original

  18. // sample rules file.

  19. // The best way to edit this file is to install the FiddlerScript Editor, part of

  20. // the free SyntaxEditing addons. Get it here: http://fiddler2.com/r/?SYNTAXVIEWINSTALL

  21. // GLOBALIZATION NOTE: Save this file using UTF-8 Encoding.

  22. // JScript.NET Reference

  23. // http://fiddler2.com/r/?msdnjsnet

  24. //

  25. // FiddlerScript Reference

  26. // http://fiddler2.com/r/?fiddlerscriptcookbook

  27. class Handlers

  28. {

  29. // *****************

  30. //

  31. // This is the Handlers class. Pretty much everything you ever add to FiddlerScript

  32. // belongs right inside here, or inside one of the already-existing functions below.

  33. //

  34. // *****************

  35. // The following snippet demonstrates a custom-bound column for the Web Sessions list.

  36. // See http://fiddler2.com/r/?fiddlercolumns for more info

  37. /*

  38. public static BindUIColumn("Method", 60)

  39. function FillMethodColumn(oS: Session): String {

  40. return oS.RequestMethod;

  41. }

  42. */

  43. // The following snippet demonstrates how to create a custom tab that shows simple text

  44. /*

  45. public BindUITab("Flags")

  46. static function FlagsReport(arrSess: Session[]):String {

  47. var oSB: System.Text.StringBuilder = new System.Text.StringBuilder();

  48. for (var i:int = 0; i<arrSess.Length; i++)

  49. {

  50. oSB.AppendLine("SESSION FLAGS");

  51. oSB.AppendFormat("{0}: {1}\n", arrSess[i].id, arrSess[i].fullUrl);

  52. for(var sFlag in arrSess[i].oFlags)

  53. {

  54. oSB.AppendFormat("\t{0}:\t\t{1}\n", sFlag.Key, sFlag.Value);

  55. }

  56. }

  57. return oSB.ToString();

  58. }

  59. */

  60. // You can create a custom menu like so:

  61. /*

  62. QuickLinkMenu("&Links")

  63. QuickLinkItem("IE GeoLoc TestDrive", "http://ie.microsoft.com/testdrive/HTML5/Geolocation/Default.html")

  64. QuickLinkItem("FiddlerCore", "http://fiddler2.com/fiddlercore")

  65. public static function DoLinksMenu(sText: String, sAction: String)

  66. {

  67. Utilities.LaunchHyperlink(sAction);

  68. }

  69. */

  70. public static RulesOption("Hide 304s")

  71. BindPref("fiddlerscript.rules.Hide304s")

  72. var m_Hide304s: boolean = false;

  73. // Cause Fiddler to override the Accept-Language header with one of the defined values

  74. public static RulesOption("Request &Japanese Content")

  75. var m_Japanese: boolean = false;

  76. // Automatic Authentication

  77. public static RulesOption("&Automatically Authenticate")

  78. BindPref("fiddlerscript.rules.AutoAuth")

  79. var m_AutoAuth: boolean = false;

  80. // Cause Fiddler to override the User-Agent header with one of the defined values

  81. // The page http://browserscope2.org/browse?category=selectors&ua=Mobile%20Safari is a good place to find updated versions of these

  82. RulesString("&User-Agents", true)

  83. BindPref("fiddlerscript.ephemeral.UserAgentString")

  84. RulesStringValue(0,"Netscape &3", "Mozilla/3.0 (Win95; I)")

  85. RulesStringValue(1,"WinPhone8.1", "Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 520) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537")

  86. RulesStringValue(2,"&Safari5 (Win7)", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1")

  87. RulesStringValue(3,"Safari9 (Mac)", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11) AppleWebKit/601.1.56 (KHTML, like Gecko) Version/9.0 Safari/601.1.56")

  88. RulesStringValue(4,"iPad", "Mozilla/5.0 (iPad; CPU OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F5027d Safari/600.1.4")

  89. RulesStringValue(5,"iPhone6", "Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4")

  90. RulesStringValue(6,"IE &6 (XPSP2)", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)")

  91. RulesStringValue(7,"IE &7 (Vista)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1)")

  92. RulesStringValue(8,"IE 8 (Win2k3 x64)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; WOW64; Trident/4.0)")

  93. RulesStringValue(9,"IE &8 (Win7)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)")

  94. RulesStringValue(10,"IE 9 (Win7)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)")

  95. RulesStringValue(11,"IE 10 (Win8)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)")

  96. RulesStringValue(12,"IE 11 (Surface2)", "Mozilla/5.0 (Windows NT 6.3; ARM; Trident/7.0; Touch; rv:11.0) like Gecko")

  97. RulesStringValue(13,"IE 11 (Win8.1)", "Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko")

  98. RulesStringValue(14,"Edge (Win10)", "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.11082")

  99. RulesStringValue(15,"&Opera", "Opera/9.80 (Windows NT 6.2; WOW64) Presto/2.12.388 Version/12.17")

  100. RulesStringValue(16,"&Firefox 3.6", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100625 Firefox/3.6.7")

  101. RulesStringValue(17,"&Firefox 43", "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0")

  102. RulesStringValue(18,"&Firefox Phone", "Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0")

  103. RulesStringValue(19,"&Firefox (Mac)", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0")

  104. RulesStringValue(20,"Chrome (Win)", "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.48 Safari/537.36")

  105. RulesStringValue(21,"Chrome (Android)", "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.78 Mobile Safari/537.36")

  106. RulesStringValue(22,"ChromeBook", "Mozilla/5.0 (X11; CrOS x86_64 6680.52.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.74 Safari/537.36")

  107. RulesStringValue(23,"GoogleBot Crawler", "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)")

  108. RulesStringValue(24,"Kindle Fire (Silk)", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.0.22.79_10013310) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true")

  109. RulesStringValue(25,"&Custom...", "%CUSTOM%")

  110. public static var sUA: String = null;

  111. // Cause Fiddler to delay HTTP traffic to simulate typical 56k modem conditions

  112. public static RulesOption("Simulate &Modem Speeds", "Per&formance")

  113. var m_SimulateModem: boolean = false;

  114. // Removes HTTP-caching related headers and specifies "no-cache" on requests and responses

  115. public static RulesOption("&Disable Caching", "Per&formance")

  116. var m_DisableCaching: boolean = false;

  117. public static RulesOption("Cache Always &Fresh", "Per&formance")

  118. var m_AlwaysFresh: boolean = false;

  119. // Force a manual reload of the script file. Resets all

  120. // RulesOption variables to their defaults.

  121. public static ToolsAction("Reset Script")

  122. function DoManualReload() {

  123. FiddlerObject.ReloadScript();

  124. }

  125. public static ContextAction("Decode Selected Sessions")

  126. function DoRemoveEncoding(oSessions: Session[]) {

  127. for (var x:int = 0; x < oSessions.Length; x++){

  128. oSessions[x].utilDecodeRequest();

  129. oSessions[x].utilDecodeResponse();

  130. }

  131. UI.actUpdateInspector(true,true);

  132. }

  133. //Log websocket traffic

  134. static function OnWebSocketMessage(oMsg: WebSocketMessage) {

  135. // Log Message to the LOG tab

  136. FiddlerApplication.Log.LogString(oMsg.ToString());

  137. }

  138. static function OnBeforeRequest(oSession: Session) {

  139. // Sample Rule: Color ASPX requests in RED

  140. // if (oSession.uriContains(".aspx")) {oSession["ui-color"] = "red";}

  141. // Sample Rule: Flag POSTs to fiddler2.com in italics

  142. // if (oSession.HostnameIs("www.fiddler2.com") && oSession.HTTPMethodIs("POST")) {oSession["ui-italic"] = "yup";}

  143. // Sample Rule: Break requests for URLs containing "/sandbox/"

  144. // if (oSession.uriContains("/sandbox/")) {

  145. // oSession.oFlags["x-breakrequest"] = "yup";// Existence of the x-breakrequest flag creates a breakpoint; the "yup" value is unimportant.

  146. // }

  147. if(oSession.hostname=="latest.dev.dbd.bhvronline.com")

  148. {

  149. oSession.hostname="latest.dev.bhvrdbd.com";

  150. oSession["X-OverrideCertCN"] = "*.dev.dbd.bhvronline.com";

  151. if(oSession.fullUrl.Contains("batch")) oSession.oRequest.FailSession(404,"Blocked","Analytics blocked with Fiddler");

  152. }

  153. if(oSession.hostname=="analytic.live.dbd.bhvronline.com") oSession.oRequest.FailSession(404,"Blocked","Analytics blocked with Fiddler");

  154. if ((null != gs_ReplaceToken) && (oSession.url.indexOf(gs_ReplaceToken)>-1)) { // Case sensitive

  155. oSession.url = oSession.url.Replace(gs_ReplaceToken, gs_ReplaceTokenWith);

  156. }

  157. if ((null != gs_OverridenHost) && (oSession.host.toLowerCase() == gs_OverridenHost)) {

  158. oSession["x-overridehost"] = gs_OverrideHostWith;

  159. }

  160. if ((null!=bpRequestURI) && oSession.uriContains(bpRequestURI)) {

  161. oSession["x-breakrequest"]="uri";

  162. }

  163. if ((null!=bpMethod) && (oSession.HTTPMethodIs(bpMethod))) {

  164. oSession["x-breakrequest"]="method";

  165. }

  166. if ((null!=uiBoldURI) && oSession.uriContains(uiBoldURI)) {

  167. oSession["ui-bold"]="QuickExec";

  168. }

  169. if (m_SimulateModem) {

  170. // Delay sends by 300ms per KB uploaded.

  171. oSession["request-trickle-delay"] = "300";

  172. // Delay receives by 150ms per KB downloaded.

  173. oSession["response-trickle-delay"] = "150";

  174. }

  175. if (m_DisableCaching) {

  176. oSession.oRequest.headers.Remove("If-None-Match");

  177. oSession.oRequest.headers.Remove("If-Modified-Since");

  178. oSession.oRequest["Pragma"] = "no-cache";

  179. }

  180. // User-Agent Overrides

  181. if (null != sUA) {

  182. oSession.oRequest["User-Agent"] = sUA;

  183. }

  184. if (m_Japanese) {

  185. oSession.oRequest["Accept-Language"] = "ja";

  186. }

  187. if (m_AutoAuth) {

  188. // Automatically respond to any authentication challenges using the

  189. // current Fiddler user's credentials. You can change (default)

  190. // to a domain\\username:password string if preferred.

  191. //

  192. // WARNING: This setting poses a security risk if remote

  193. // connections are permitted!

  194. oSession["X-AutoAuth"] = "(default)";

  195. }

  196. if (m_AlwaysFresh && (oSession.oRequest.headers.Exists("If-Modified-Since") || oSession.oRequest.headers.Exists("If-None-Match")))

  197. {

  198. oSession.utilCreateResponseAndBypassServer();

  199. oSession.responseCode = 304;

  200. oSession["ui-backcolor"] = "Lavender";

  201. }

  202. }

  203. // This function is called immediately after a set of request headers has

  204. // been read from the client. This is typically too early to do much useful

  205. // work, since the body hasn't yet been read, but sometimes it may be useful.

  206. //

  207. // For instance, see

  208. // http://blogs.msdn.com/b/fiddler/archive/2011/11/05/http-expect-continue-delays-transmitting-post-bodies-by-up-to-350-milliseconds.aspx

  209. // for one useful thing you can do with this handler.

  210. //

  211. // Note: oSession.requestBodyBytes is not available within this function!

  212. /*

  213. static function OnPeekAtRequestHeaders(oSession: Session) {

  214. var sProc = ("" + oSession["x-ProcessInfo"]).ToLower();

  215. if (!sProc.StartsWith("mylowercaseappname")) oSession["ui-hide"] = "NotMyApp";

  216. }

  217. */

  218. //

  219. // If a given session has response streaming enabled, then the OnBeforeResponse function

  220. // is actually called AFTER the response was returned to the client.

  221. //

  222. // In contrast, this OnPeekAtResponseHeaders function is called before the response headers are

  223. // sent to the client (and before the body is read from the server). Hence this is an opportune time

  224. // to disable streaming (oSession.bBufferResponse = true) if there is something in the response headers

  225. // which suggests that tampering with the response body is necessary.

  226. //

  227. // Note: oSession.responseBodyBytes is not available within this function!

  228. //

  229. static function OnPeekAtResponseHeaders(oSession: Session) {

  230. //FiddlerApplication.Log.LogFormat("Session {0}: Response header peek shows status is {1}", oSession.id, oSession.responseCode);

  231. if (m_DisableCaching) {

  232. oSession.oResponse.headers.Remove("Expires");

  233. oSession.oResponse["Cache-Control"] = "no-cache";

  234. }

  235. if ((bpStatus>0) && (oSession.responseCode == bpStatus)) {

  236. oSession["x-breakresponse"]="status";

  237. oSession.bBufferResponse = true;

  238. }

  239. if ((null!=bpResponseURI) && oSession.uriContains(bpResponseURI)) {

  240. oSession["x-breakresponse"]="uri";

  241. oSession.bBufferResponse = true;

  242. }

  243. }

  244. static function OnBeforeResponse(oSession: Session) {

  245. if (m_Hide304s && oSession.responseCode == 304) {

  246. oSession["ui-hide"] = "true";

  247. }

  248. if(oSession.hostname=="latest.dev.bhvrdbd.com")

  249. {

  250. if(oSession.uriContains("pips"))

  251. {

  252. var response = "{\"survivorPips\":0,\"killerPips\":0}";

  253. oSession.oResponse.headers.HTTPResponseCode = 200;

  254. oSession.oResponse.headers.HTTPResponseStatus = "200 OK";

  255. oSession.utilSetResponseBody(response);

  256. }

  257. if(oSession.uriContains("shrine/getAvailable"))

  258. {

  259. var response = "{\"items\":[{\"id\":\"SelfCare\",\"bloodpointValue\":150000,\"experienceValue\":150000,\"unique\":false,\"purchased\":false,\"version\":\"steam\",\"cost\":[{\"currencyId\":\"Shards\",\"price\":69}]},{\"id\":\"SelfCare\",\"bloodpointValue\":150000,\"experienceValue\":150000,\"unique\":false,\"purchased\":false,\"version\":\"steam\",\"cost\":[{\"currencyId\":\"Shards\",\"price\":69}]},{\"id\":\"SelfCare\",\"bloodpointValue\":150000,\"experienceValue\":150000,\"unique\":false,\"purchased\":false,\"version\":\"steam\",\"cost\":[{\"currencyId\":\"Shards\",\"price\":69}]},{\"id\":\"SelfCare\",\"bloodpointValue\":150000,\"experienceValue\":150000,\"unique\":false,\"purchased\":false,\"version\":\"steam\",\"cost\":[{\"currencyId\":\"Shards\",\"price\":69}]}],\"startDate\":\"2020-05-13T00:00:00\",\"endDate\":\"2027-05-19T23:59:59\",\"week\":187}";

  260. oSession.oResponse.headers.HTTPResponseCode = 200;

  261. oSession.oResponse.headers.HTTPResponseStatus = "200 OK";

  262. oSession.utilSetResponseBody(response);

  263. }

  264. }

  265. }

  266. /*

  267. // This function executes just before Fiddler returns an error that it has

  268. // itself generated (e.g. "DNS Lookup failure") to the client application.

  269. // These responses will not run through the OnBeforeResponse function above.

  270. static function OnReturningError(oSession: Session) {

  271. }

  272. */

  273. /*

  274. // This function executes after Fiddler finishes processing a Session, regardless

  275. // of whether it succeeded or failed. Note that this typically runs AFTER the last

  276. // update of the Web Sessions UI listitem, so you must manually refresh the Session's

  277. // UI if you intend to change it.

  278. static function OnDone(oSession: Session) {

  279. }

  280. */

  281. /*

  282. static function OnBoot() {

  283. MessageBox.Show("Fiddler has finished booting");

  284. System.Diagnostics.Process.Start("iexplore.exe");

  285. UI.ActivateRequestInspector("HEADERS");

  286. UI.ActivateResponseInspector("HEADERS");

  287. }

  288. */

  289. /*

  290. static function OnBeforeShutdown(): Boolean {

  291. // Return false to cancel shutdown.

  292. return ((0 == FiddlerApplication.UI.lvSessions.TotalItemCount()) ||

  293. (DialogResult.Yes == MessageBox.Show("Allow Fiddler to exit?", "Go Bye-bye?",

  294. MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)));

  295. }

  296. */

  297. /*

  298. static function OnShutdown() {

  299. MessageBox.Show("Fiddler has shutdown");

  300. }

  301. */

  302. /*

  303. static function OnAttach() {

  304. MessageBox.Show("Fiddler is now the system proxy");

  305. }

  306. */

  307. /*

  308. static function OnDetach() {

  309. MessageBox.Show("Fiddler is no longer the system proxy");

  310. }

  311. */

  312. // The Main() function runs everytime your FiddlerScript compiles

  313. static function Main() {

  314. var today: Date = new Date();

  315. FiddlerObject.StatusText = " CustomRules.js was loaded at: " + today;

  316. // Uncomment to add a "Server" column containing the response "Server" header, if present

  317. // UI.lvSessions.AddBoundColumn("Server", 50, "@response.server");

  318. // Uncomment to add a global hotkey (Win+G) that invokes the ExecAction method below...

  319. // UI.RegisterCustomHotkey(HotkeyModifiers.Windows, Keys.G, "screenshot");

  320. }

  321. // These static variables are used for simple breakpointing & other QuickExec rules

  322. BindPref("fiddlerscript.ephemeral.bpRequestURI")

  323. public static var bpRequestURI:String = null;

  324. BindPref("fiddlerscript.ephemeral.bpResponseURI")

  325. public static var bpResponseURI:String = null;

  326. BindPref("fiddlerscript.ephemeral.bpMethod")

  327. public static var bpMethod: String = null;

  328. static var bpStatus:int = -1;

  329. static var uiBoldURI: String = null;

  330. static var gs_ReplaceToken: String = null;

  331. static var gs_ReplaceTokenWith: String = null;

  332. static var gs_OverridenHost: String = null;

  333. static var gs_OverrideHostWith: String = null;

  334. // The OnExecAction function is called by either the QuickExec box in the Fiddler window,

  335. // or by the ExecAction.exe command line utility.

  336. static function OnExecAction(sParams: String[]): Boolean {

  337. FiddlerObject.StatusText = "ExecAction: " + sParams[0];

  338. var sAction = sParams[0].toLowerCase();

  339. switch (sAction) {

  340. case "bold":

  341. if (sParams.Length<2) {uiBoldURI=null; FiddlerObject.StatusText="Bolding cleared"; return false;}

  342. uiBoldURI = sParams[1]; FiddlerObject.StatusText="Bolding requests for " + uiBoldURI;

  343. return true;

  344. case "bp":

  345. FiddlerObject.alert("bpu = breakpoint request for uri\nbpm = breakpoint request method\nbps=breakpoint response status\nbpafter = breakpoint response for URI");

  346. return true;

  347. case "bps":

  348. if (sParams.Length<2) {bpStatus=-1; FiddlerObject.StatusText="Response Status breakpoint cleared"; return false;}

  349. bpStatus = parseInt(sParams[1]); FiddlerObject.StatusText="Response status breakpoint for " + sParams[1];

  350. return true;

  351. case "bpv":

  352. case "bpm":

  353. if (sParams.Length<2) {bpMethod=null; FiddlerObject.StatusText="Request Method breakpoint cleared"; return false;}

  354. bpMethod = sParams[1].toUpperCase(); FiddlerObject.StatusText="Request Method breakpoint for " + bpMethod;

  355. return true;

  356. case "bpu":

  357. if (sParams.Length<2) {bpRequestURI=null; FiddlerObject.StatusText="RequestURI breakpoint cleared"; return false;}

  358. bpRequestURI = sParams[1];

  359. FiddlerObject.StatusText="RequestURI breakpoint for "+sParams[1];

  360. return true;

  361. case "bpa":

  362. case "bpafter":

  363. if (sParams.Length<2) {bpResponseURI=null; FiddlerObject.StatusText="ResponseURI breakpoint cleared"; return false;}

  364. bpResponseURI = sParams[1];

  365. FiddlerObject.StatusText="ResponseURI breakpoint for "+sParams[1];

  366. return true;

  367. case "overridehost":

  368. if (sParams.Length<3) {gs_OverridenHost=null; FiddlerObject.StatusText="Host Override cleared"; return false;}

  369. gs_OverridenHost = sParams[1].toLowerCase();

  370. gs_OverrideHostWith = sParams[2];

  371. FiddlerObject.StatusText="Connecting to [" + gs_OverrideHostWith + "] for requests to [" + gs_OverridenHost + "]";

  372. return true;

  373. case "urlreplace":

  374. if (sParams.Length<3) {gs_ReplaceToken=null; FiddlerObject.StatusText="URL Replacement cleared"; return false;}

  375. gs_ReplaceToken = sParams[1];

  376. gs_ReplaceTokenWith = sParams[2].Replace(" ", "%20"); // Simple helper

  377. FiddlerObject.StatusText="Replacing [" + gs_ReplaceToken + "] in URIs with [" + gs_ReplaceTokenWith + "]";

  378. return true;

  379. case "allbut":

  380. case "keeponly":

  381. if (sParams.Length<2) { FiddlerObject.StatusText="Please specify Content-Type to retain during wipe."; return false;}

  382. UI.actSelectSessionsWithResponseHeaderValue("Content-Type", sParams[1]);

  383. UI.actRemoveUnselectedSessions();

  384. UI.lvSessions.SelectedItems.Clear();

  385. FiddlerObject.StatusText="Removed all but Content-Type: " + sParams[1];

  386. return true;

  387. case "stop":

  388. UI.actDetachProxy();

  389. return true;

  390. case "start":

  391. UI.actAttachProxy();

  392. return true;

  393. case "cls":

  394. case "clear":

  395. UI.actRemoveAllSessions();

  396. return true;

  397. case "g":

  398. case "go":

  399. UI.actResumeAllSessions();

  400. return true;

  401. case "goto":

  402. if (sParams.Length != 2) return false;

  403. Utilities.LaunchHyperlink("http://www.google.com/search?hl=en&btnI=I%27m+Feeling+Lucky&q=" + Utilities.UrlEncode(sParams[1]));

  404. return true;

  405. case "help":

  406. Utilities.LaunchHyperlink("http://fiddler2.com/r/?quickexec");

  407. return true;

  408. case "hide":

  409. UI.actMinimizeToTray();

  410. return true;

  411. case "log":

  412. FiddlerApplication.Log.LogString((sParams.Length<2) ? "User couldn't think of anything to say..." : sParams[1]);

  413. return true;

  414. case "nuke":

  415. UI.actClearWinINETCache();

  416. UI.actClearWinINETCookies();

  417. return true;

  418. case "screenshot":

  419. UI.actCaptureScreenshot(false);

  420. return true;

  421. case "show":

  422. UI.actRestoreWindow();

  423. return true;

  424. case "tail":

  425. if (sParams.Length<2) { FiddlerObject.StatusText="Please specify # of sessions to trim the session list to."; return false;}

  426. UI.TrimSessionList(int.Parse(sParams[1]));

  427. return true;

  428. case "quit":

  429. UI.actExit();

  430. return true;

  431. case "dump":

  432. UI.actSelectAll();

  433. UI.actSaveSessionsToZip(CONFIG.GetPath("Captures") + "dump.saz");

  434. UI.actRemoveAllSessions();

  435. FiddlerObject.StatusText = "Dumped all sessions to " + CONFIG.GetPath("Captures") + "dump.saz";

  436. return true;

  437. default:

  438. if (sAction.StartsWith("http") || sAction.StartsWith("www.")) {

  439. System.Diagnostics.Process.Start(sParams[0]);

  440. return true;

  441. }

  442. else

  443. {

  444. FiddlerObject.StatusText = "Requested ExecAction: '" + sAction + "' not found. Type HELP to learn more.";

  445. return false;

  446. }

  447. }

  448. }

  449. }

Top Articles
Latest Posts
Article information

Author: Zonia Mosciski DO

Last Updated: 03/26/2023

Views: 5651

Rating: 4 / 5 (51 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Zonia Mosciski DO

Birthday: 1996-05-16

Address: Suite 228 919 Deana Ford, Lake Meridithberg, NE 60017-4257

Phone: +2613987384138

Job: Chief Retail Officer

Hobby: Tai chi, Dowsing, Poi, Letterboxing, Watching movies, Video gaming, Singing

Introduction: My name is Zonia Mosciski DO, I am a enchanting, joyous, lovely, successful, hilarious, tender, outstanding person who loves writing and wants to share my knowledge and understanding with you.