Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
952
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.63 KB | None | 0 0
  1. /**
  2. The original template was created by Sam Gleske
  3. This author and license block must stay intact for use even if this script is
  4. modified!
  5.  
  6. License:
  7. This file falls under the MIT Licence
  8. http://www.opensource.org/licenses/mit-license.php
  9. Take responsibility for your own actions.
  10.  
  11. Generated using Python and predefined proxy lists!
  12. http://sourceforge.net/projects/webtechtools/files/Proxy%20wpad.dat%20Generator/
  13.  
  14. You are not authorized to use this proxy configuration for illegal purposes.
  15. This file follows the Netscape WPAD standard. Please read the documentation
  16. after the configuration options for additional warnings and tips information.
  17. **/
  18.  
  19. /*
  20. * Configuration Options
  21. */
  22.  
  23. //Enables console logging (true/false, default true)
  24. var ENABLE_LOGGING=true;
  25.  
  26.  
  27. //Enable friendly excludes (true/false, default true)
  28. //If a request matches an exclude then it will create a direct connection rather than proxy
  29. //This option must be disabled for user defined excludes to work
  30. var ENABLE_EXCLUDES=true;
  31.  
  32. //User defined Protocol excludes (array)
  33. var protocol_excludes=[];
  34.  
  35. //User defined IP excludes (array)
  36. var ip_excludes=[];
  37.  
  38. //User defined Domain excludes (array)
  39. var domain_excludes=[];
  40.  
  41.  
  42. //Enable predefined proxy list (true/false, default true)
  43. //This option must be disabled for the user defined proxy list
  44. var ENABLE_PREDEFINED_PROXY_LIST=true;
  45.  
  46. //User defined proxy list (array)
  47. var proxylist=[];
  48.  
  49. /*
  50. * End of Configuration Options
  51. */
  52.  
  53.  
  54.  
  55.  
  56.  
  57. /************************************************************************************
  58. WARNINGS, INFORMATION, AND ADDITIONAL DOCUMENTATION
  59. *************************************************************************************
  60. It is highly recommended that you keep this documentation block if you modify
  61. this file.
  62.  
  63. DO NOT, I repeat, DO NOT log into web portals where financial or personal
  64. information is at risk using an anonymous/3rd party proxy. It is possible that
  65. an anonymous proxy is set up to record all traffic and to mine usernames and
  66. passwords for websites. Monitoring insecure authentication or cookies are just a
  67. few of many methods to achieve this. I have set up some rules which will help
  68. minimize the effect of this but it is still recommended to disable this proxy
  69. whenever handling such information. This is not a flaw of this software or
  70. wpad.dat but more the nature of an anonymous proxy.
  71.  
  72. Public Proxies and the Law
  73. According to U.S. law, 18 U.S.C. Section 1030 (Fraud and Related Activity in
  74. Connection with Computers) applies only when anyone who knowingly accesses a
  75. computer without authorization or has knowingly exceeds his authorized access on
  76. that computer. Because an opened proxy, by default, allows connections and use of
  77. the service by anyone in the WWW, its administrator has essentially authorized
  78. everyone to use the proxy. Therefore browsing the web, via anonymous proxies, is
  79. not illegal.
  80.  
  81.  
  82. This software is geared towards advanced end users and security professionals. By
  83. using this software you agree to the MIT license which governs any unlicensed
  84. software or files related to this file.
  85.  
  86.  
  87. What is wpad.dat?
  88. wpad.dat is a Web Proxy Automatic Detection (WPAD) file. Your browser selects a
  89. proxy based on the pre-defined rules specified in the wpad.dat file. The language
  90. is JavaScript for wpad.dat.
  91.  
  92.  
  93. Pros/Cons of proxying using my wpad.dat method?
  94. Pros:
  95. * Your IP address is constantly changing from the perspective of the web
  96. server making you impossible to track.
  97. * There are pre-defined rules which help to protect your information if you
  98. accidently forget to turn off this proxy method while browsing websites
  99. where financial or personal information are at risk.
  100. * If a website is using an encrypted connection then it does not go through
  101. any anonymous proxy. PLEASE NOTE if you opt out of my predefined rules
  102. then this is no longer the case.
  103.  
  104. Cons:
  105. * Your browsing speed is slightly diminished because you are visiting
  106. websites via a proxy.
  107. * Your browsing habits and information are not guarunteed to be protected
  108. from the anonymous proxy if by some happance this file is misconfigured.
  109.  
  110. *************************************************************************************
  111. End of Documentation
  112. *************************************************************************************/
  113.  
  114.  
  115.  
  116.  
  117.  
  118. //////////////// No need to edit beyond this point ///////////////
  119.  
  120. //Custom defined functions for cleaner processing
  121. function exclude(source,rules)
  122. {
  123. try
  124. {
  125. for(var i=0;i<rules.length;i++)
  126. if(shExpMatch( source, rules[i]))
  127. return true;
  128. return false;
  129. }
  130. catch(e)
  131. {
  132. if(ENABLE_LOGGING)
  133. alert("An exception has been encountered!\n" + source + "\n" + rules);
  134. return false;
  135. }
  136. }
  137.  
  138. //Initialization Function
  139. function FindProxyForURL(url, host)
  140. {
  141. //These are my personal excludes just in case I accidently go to a login site with this proxy enabled
  142. if(ENABLE_EXCLUDES)
  143. {
  144. ip_excludes=[
  145. "10.*", //private address range
  146. "172.*", //private address range
  147. "192.*", //private address range
  148. "127.*", //loopback or localhost
  149. "144.118.*", //Drexel University
  150. "74.125.*", //Google
  151. "67.195.*", //Yahoo Inc
  152. "170.201.*", //PNC Bank
  153. "66.95.*", //United Bank
  154. "12.*", //AT&T WorldNet Services (covers AES and other banking websites)
  155. "164.109.*" //Digex, Incorporated. (Covers PECO and Exelon Corp)
  156. ];
  157. domain_excludes=[
  158. "*accuweather.com",
  159. "*mozdev.org",
  160. "*mozilla.org",
  161. "*bankofamerica.com",
  162. "*campusfood.com",
  163. "*chase.com*",
  164. "*clubbleach.org",
  165. "*crunchyroll.com",
  166. "*dccc.edu*",
  167. "*domaintools.com",
  168. "*ea.com",
  169. "*ebay.com",
  170. "*ebayrtm.com",
  171. "*ebaystatic.com",
  172. "*expedia.com",
  173. "*experts-exchange.com",
  174. "*facebook.com",
  175. "*fbcdn.net",
  176. "*flagfox.net",
  177. "*fsdn.com",
  178. "*godaddy.com",
  179. "www.google.*", //Needed for when Google randomly decides to load files from another country like www.google.ca or www.google.com.ph
  180. "*.gov",
  181. "*geotrust.com",
  182. "*ingdirect.com",
  183. "*ittoolbox.com",
  184. "*live.com",
  185. "*logmein.com",
  186. "*mqcdn.com",
  187. "*msn.com",
  188. "*newegg.ca",
  189. "*newegg.com",
  190. "*neweggimages.com",
  191. "*passport.com",
  192. "*passport.net",
  193. "*passportimages.com",
  194. "*paypal.com",
  195. "*paypalobjects.com",
  196. "*register.com",
  197. "*sf.net",
  198. "*sourceforge.net",
  199. "*steampowered.com",
  200. "*thawte.com",
  201. "*verisign.com",
  202. "*yahoo.com",
  203. "*whois.net"
  204. ];
  205. protocol_excludes=[
  206. "about:*",
  207. "aim:*",
  208. "chrome:*",
  209. "file:*",
  210. "https:*",
  211. "sftp:*",
  212. "socks:*",
  213. "steam:*",
  214. "telnet:*"
  215. ];
  216. };
  217.  
  218. //Run exclude rules for protocols, domain names, and ip addresses
  219. if(exclude(url.toLowerCase(),protocol_excludes))
  220. {
  221. if(ENABLE_LOGGING)
  222. alert("Exclude rule triggered: protocol\n" + url);
  223. return "DIRECT";
  224. };
  225. if(exclude(dnsResolve(host),ip_excludes))
  226. {
  227. if(ENABLE_LOGGING)
  228. alert("Exclude rule triggered: ip\n" + dnsResolve(host));
  229. return "DIRECT";
  230. };
  231. if(exclude(host.toLowerCase(),domain_excludes))
  232. {
  233. if(ENABLE_LOGGING)
  234. alert("Exclude rule triggered: domain\n" + dnsResolve(host) + "\n" + host);
  235. return "DIRECT";
  236. };
  237.  
  238. //Pre-defined proxy list
  239. if(ENABLE_PREDEFINED_PROXY_LIST)
  240. {
  241. proxylist=[
  242. "91.209.24.4:3128",
  243. "91.209.24.3:3128",
  244. "222.124.189.93:8080",
  245. "192.99.169.33:80",
  246. "202.166.218.136:8080",
  247. "193.60.133.147:80",
  248. "190.152.167.163:3128",
  249. "36.75.212.171:8080",
  250. "190.92.49.203:8080",
  251. "118.193.134.80:3128",
  252. "120.237.3.227:80",
  253. "176.35.226.195:3128",
  254. "210.75.14.157:80",
  255. "116.213.211.130:80",
  256. "190.29.24.23:8080",
  257. "23.102.160.68:3128",
  258. "190.102.17.84:80",
  259. "211.162.39.98:80",
  260. "201.18.145.149:3128",
  261. "188.120.254.160:3128",
  262. "58.26.17.167:8080",
  263. "79.136.250.37:3128",
  264. "111.7.128.135:8080",
  265. "207.223.117.198:3128",
  266. "115.114.148.71:80",
  267. "58.254.132.87:80",
  268. "183.221.247.122:80",
  269. "202.152.196.141:8080",
  270. "200.86.217.67:3128",
  271. "189.1.97.44:3128",
  272. "106.185.26.65:3128",
  273. "190.167.198.157:8080",
  274. "36.75.215.86:80",
  275. "111.7.128.132:8080",
  276. "153.120.25.103:80",
  277. "187.53.61.43:8080",
  278. "111.11.184.103:80",
  279. "183.57.78.93:80",
  280. "193.36.34.10:3128",
  281. "118.98.73.122:80",
  282. "202.21.181.110:3128",
  283. "218.213.227.186:8080",
  284. "65.19.227.253:8080",
  285. "93.76.255.80:8080",
  286. "185.14.251.242:8080",
  287. "177.99.164.167:8080",
  288. "118.26.224.160:80",
  289. "61.247.188.66:8080",
  290. "200.199.73.189:3128",
  291. "180.153.32.9:8080",
  292. "111.26.20.75:8080",
  293. "117.121.21.222:80",
  294. "61.7.231.139:3128",
  295. "116.218.129.154:8080",
  296. "152.26.7.16:8080",
  297. "77.89.244.102:80",
  298. "186.103.171.76:3128",
  299. "218.204.131.250:3128",
  300. "203.81.93.38:8080",
  301. "212.68.51.58:80",
  302. "78.38.101.2:8080",
  303. "210.101.131.232:8080",
  304. "103.10.61.3:8080",
  305. "118.96.58.82:8080",
  306. "202.106.16.36:3128",
  307. "203.144.170.99:3128",
  308. "36.79.179.74:3128",
  309. "111.11.184.83:80",
  310. "202.118.10.101:8080",
  311. "176.108.100.229:8080",
  312. "183.207.229.137:80",
  313. "111.11.184.45:80",
  314. "223.197.55.81:8080"
  315. ];
  316. };
  317.  
  318. //Generate a random index for the proxy list
  319. try
  320. {
  321. var index=-1;
  322. while(index<0)
  323. index=Math.ceil(proxylist.length*Math.random())-1;
  324.  
  325. if(proxylist.length)
  326. {
  327. if(ENABLE_LOGGING)
  328. alert("Rule not triggered!\n" + dnsResolve(host) + "\n" + host.toLowerCase() + "\n" + url.toLowerCase() + "\nUsing Proxy: " + proxylist[index]);
  329. return "PROXY "+proxylist[index];
  330. }
  331. else
  332. return "DIRECT";
  333. }
  334. catch(e)
  335. {
  336. if(ENABLE_LOGGING)
  337. alert("An exception has been encountered!\n" + proxylist);
  338. return "DIRECT";
  339. };
  340. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement