-
Notifications
You must be signed in to change notification settings - Fork 3
/
SampleRules.xml
148 lines (148 loc) · 3.96 KB
/
SampleRules.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?xml version="1.0" encoding="utf-8"?>
<rules>
<!-- White lists -->
<rule name="Whitelist" enabled="false">
<match>||blinkbox.com^$thirdparty</match>
<actions>
<request>
<break />
</request>
<response>
<break />
</response>
</actions>
</rule>
<!-- Black lists -->
<rule name="Python Example Block">
<match>||www.example.com</match>
<actions>
<python>
session.oRequest.FailSession(403, "Forbidden By Proxy", "Request blocked due to the rule: " + rule.Name)
True
</python>
</actions>
</rule>
<rule name="Facebook 'like' Block">
<matches>
<match>||facebook.com/plugins/like.php</match>
<match>||facebook.com/plugins/recommendations.php</match>
<match>||facebook.com/plugins/likebox.php</match>
<match>||connect.facebook.net/en_US/all.js</match>
<match>||facebook.com/extern/login_status.php</match>
<match>||facebook.com/widget/</match>
</matches>
<actions>
<block />
</actions>
</rule>
<rule name="Google Analytics Block">
<match>||google-analytics.com</match>
<actions>
<block />
</actions>
</rule>
<rule name="DoubleClick Block">
<matches>
<match>||doubleclick.net</match>
</matches>
<actions>
<block />
</actions>
</rule>
<rule name="AdBlock">
<actions>
<adblock url="https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt" />
</actions>
</rule>
<!-- Redirects -->
<rule name="HttpsEverywhere">
<actions>
<httpseverywhere path="Rules\HttpsEverywhere" fakeHttps="false" />
</actions>
</rule>
<rule name="Google search result click">
<match>||google.com/url</match>
<match>||google.co.uk/url</match>
<actions>
<python>
<![CDATA[
from System import Uri
querystring = session.PathAndQuery
startindex = querystring.index("&url=")
endindex = querystring.index("&ei", startindex)
url = querystring[startindex + 5:endindex]
session.url = Uri.UnescapeDataString(url)[7:]
False
]]>
</python>
</actions>
</rule>
<!-- Request modifiers -->
<rule name="Google Search (no cookies)">
<matches>
<match>/google.com?.?(uk|au)?/(search|csi|maps|product|images|videosearch)/</match>
</matches>
<paths>
<path>/search</path>
<path>/csi</path>
<path>/maps</path>
<path>/product</path>
<path>/images</path>
<path>/videoSearch</path>
</paths>
<actions>
<header name="Accept-Encoding">
<removeValue type="delimited" delimiter=",">sdch</removeValue>
</header>
<cookie name="PREF">
<remove />
</cookie>
<cookie name="SID">
<remove />
</cookie>
<cookie name="NID">
<remove />
</cookie>
<cookie name="HSID">
<remove />
</cookie>
</actions>
</rule>
<rule name="Referer Header Block" logEnabled="false">
<actions>
<header name="Referer">
<remove />
</header>
</actions>
</rule>
<rule name="facebook Auto login">
<match>||facebook.com</match>
<actions>
<respond path="/login.php" method="post" url="https://login.facebook.com/login.php?login_attempts=1">
<value key="email">#{Email}</value>
<value key="pass">#{Password}</value>
</respond>
<cookie name="lxe">
<keep timeout="3600" path="/login.php" />
</cookie>
<cookie name="c_user">
<keep timeout="3600" path="/login.php" />
</cookie>
<cookie name="datr">
<keep timeout="3600" path="/login.php" />
</cookie>
<cookie name="lo">
<keep timeout="3600" path="/login.php" />
</cookie>
<cookie name="sct">
<keep timeout="3600" path="/login.php" />
</cookie>
<cookie name="presence">
<keep timeout="3600" path="/login.php" />
</cookie>
<cookie name="lsd">
<keep timeout="3600" path="/login.php" />
</cookie>
</actions>
</rule>
</rules>