import System;
import System.Windows.Forms;
import Fiddler;
//INTRODUCTION
//
// Well, hello there!
//
// Don't be scared! :-)
//
// This is the FiddlerScript Rules file, which creates some of the menu commands and
// other features of Fiddler. You can edit this file to modify or add new commands.
// The original version of this file is named SampleRules.js and it is in the
// \Program Files\Fiddler\ folder. When Fiddler first runs, it creates a copy named
// CustomRules.js inside your \Documents\Fiddler2\Scripts folder. If you make a
// mistake in editing this file, simply delete the CustomRules.js file and restart
// Fiddler. A fresh copy of the default rules will be created from the original
// sample rules file.
// The best way to edit this file is to install the FiddlerScript Editor, part of
// the free SyntaxEditing addons. Get it here: http://fiddler2.com/r/?SYNTAXVIEWINSTALL
// GLOBALIZATION NOTE: Save this file using UTF-8 Encoding.
// JScript.NET Reference
// http://fiddler2.com/r/?msdnjsnet
//
// FiddlerScript Reference
// http://fiddler2.com/r/?fiddlerscriptcookbook
/******************************************************************************************
1、我们可以通过修改这个rules文件来定制一些命令
2、样例规则默认在 \Program Files\Fiddler\文件夹下
3、fiddler第一次运行时生成,copy在\Documents\Fiddler2\Scripts,名为CustomRules.js
4、如果修改了CustomRules.js文件,需要restart fiddler
5、建议文件以“UTF-8”编码格式保存
********************************************************************************************/
class Handlers
{
// *******************************************************************************
// This is the Handlers class. Pretty much everything you ever add to FiddlerScript
// belongs right inside here, or inside one of the already-existing functions below.
// ******************************************************************************
// The following snippet demonstrates a custom-bound column for the Web Sessions list.
// See http://fiddler2.com/r/?fiddlercolumns for more info
/*
//在UI上添加一列,展示请求的method,宽度是60
public static BindUIColumn("Method", 60)
function FillMethodColumn(oS: Session): String {
//获取请求的method的值
return oS.RequestMethod;
}
*/
// The following snippet demonstrates how to create a custom tab that shows simple text
public BindUITab("Flags")
static function FlagsReport(arrSess: Session[]):String {
var oSB: System.Text.StringBuilder = new System.Text.StringBuilder();
for (var i:int = 0; i<arrSess.Length; i++)
{
oSB.AppendLine("SESSION FLAGS");
oSB.AppendFormat("{0}: {1}\n", arrSess[i].id, arrSess[i].fullUrl);
for(var sFlag in arrSess[i].oFlags)
{
oSB.AppendFormat("\t{0}:\t\t{1}\n", sFlag.Key, sFlag.Value);
}
}
return oSB.ToString();
}
// 自定义菜单
/*
QuickLinkMenu("&Links")
QuickLinkItem("IE GeoLoc TestDrive", "http://ie.microsoft.com/testdrive/HTML5/Geolocation/Default.html")
QuickLinkItem("FiddlerCore", "http://fiddler2.com/fiddlercore")
public static function DoLinksMenu(sText: String, sAction: String)
{
Utilities.LaunchHyperlink(sAction);
}
*/
//添加菜单项QuickLinkMenu
QuickLinkMenu("友情链接&l")
QuickLinkItem("我的博客", "http://www.cnblogs.com/heiyexiaoguai/")
QuickLinkItem("FiddlerCore", "http://fiddler2.com/fiddlercore")
public static function DoLinksMenu(sText: String, sAction: String)
{
//打开选中的链接的URL
Utilities.LaunchHyperlink(sAction);
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//添加rule下的菜单RulesOption
public static RulesOption("Non-Exclusive-Test", "User-Agent")
var m_UANONRad: boolean = true;
//lcl add 2015年12月13日 02:22:52
public static RulesOption("过滤显示404请求--黑夜小怪")
var m_Filter404: boolean=false;
public static RulesOption("过滤显示>1M的请求--黑夜小怪")
var m_FilterBigResponse: boolean=false;
//==============添加rule下的菜单
public static RulesOption("&Webview漏洞测试(暴力版)")
var m_Webviewscan: boolean = false;
// Cause Fiddler to delay HTTP traffic to simulate typical 56k modem conditions
public static RulesOption("限速(延时20ms:50kb/s)--黑夜小怪", "Per&formance")
var m_SimulateModem50: boolean = false;
public static RulesOption("限速(延时50ms:20kb/s)--黑夜小怪", "Per&formance")
var m_SimulateModem20: boolean = false;
public static RulesOption("限速(延时100ms:10kb/s)--黑夜小怪", "Per&formance")
var m_SimulateModem10: boolean = false;
// Removes HTTP-caching related headers and specifies "no-cache" on requests and responses
public static RulesOption("&Disable Caching", "Per&formance")
var m_DisableCaching: boolean = false;
public static RulesOption("Cache Always &Fresh", "Per&formance")
var m_AlwaysFresh: boolean = false;
//2016-6-1 设置开关
/**
public static RulesOption("展示服务器IP","Per&formance")
//2016-6-1 默认是true为开启
var m_ShowServerIP: boolean = false;
**/
//public static RulesOption("&Webview漏洞测试(温柔版)")
//var m_Webviewscan_response: boolean = false;
public static RulesOption("Hide 304s")
BindPref("fiddlerscript.rules.Hide304s")
var m_Hide304s: boolean = false;
// Cause Fiddler to override the Accept-Language header with one of the defined values
public static RulesOption("Request &Japanese Content")
var m_Japanese: boolean = false;
// Automatic Authentication
public static RulesOption("&Automatically Authenticate")
BindPref("fiddlerscript.rules.AutoAuth")
var m_AutoAuth: boolean = false;
// Cause Fiddler to override the User-Agent header with one of the defined values
// The page http://browserscope2.org/browse?category=selectors&ua=Mobile%20Safari is a good place to find updated versions of these
RulesString("&User-Agents", true)
BindPref("fiddlerscript.ephemeral.UserAgentString")
RulesStringValue(0,"Netscape &3", "Mozilla/3.0 (Win95; I)")
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")
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")
RulesStringValue(3,"Safari7 (Mac)", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9) AppleWebKit/537.71 (KHTML, like Gecko) Version/7.0 Safari/537.71")
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")
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")
RulesStringValue(6,"IE &6 (XPSP2)", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)")
RulesStringValue(7,"IE &7 (Vista)", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1)")
RulesStringValue(8,"IE 8 (Win2k3 x64)", "Mozilla/4.0 (com

黑夜小怪
- 粉丝: 149
最新资源
- JSPJSP房产中介系统设计方案与实现.doc
- 计算机网络教学模式改革方案.doc
- 企业现代计算机信息化管理中网络技术的应用探究.docx
- 计算机视觉技术中的三维测量与建模课程官方课件
- 电力系统电气工程自动化的智能化运用.docx
- Python语言输出10个文本文件562进制随机5首诗句程序代码.txt
- WindowsPE急救系统安装步骤.doc
- 网络工程设计项目管理.ppt
- Python语言输出10个文本文件481进制正面词语诗诀代码.txt
- 计算机网络(AndrewSTanenbaum)复习.doc
- C#程序设计第章循环结构程序设计.doc
- 无线网络中的数字监控系统技术方案-公共场所其他.docx
- 污水处理过程PLC模糊控制器方案设计书与应用1.doc
- 工科Java期末考试阅读程序题题库.doc
- PLC控制的全自动洗衣机课程方案设计书程序及调试图.doc
- 项目管理在电力信息化建设中的应用.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



- 1
- 2
- 3
- 4
- 5
- 6
前往页