GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — InstaPy/proxy_extension.py at master · InstaPy/InstaPy Expand file tree/ Copy pathproxy_extension.pyMore file actions 78 lines (69 loc) · 2.03 KB / Copy pathproxy_extension.pyFile metadata and controls78 lines (69 loc) · 2.03 KB 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 import zipfile import os def create_proxy_extension(proxy): """takes proxy looks like login:password@ip:port""" ip = proxy.split("@")[1].split(":")[0] port = int(proxy.split(":")[-1]) login = proxy.split(":")[0] password = proxy.split("@")[0].split(":")[1] manifest_json = """ { "version": "1.0.0", "manifest_version": 2, "name": "Chrome Proxy", "permissions": [ "proxy", "tabs", "unlimitedStorage", "storage", "<all_urls>", "webRequest", "webRequestBlocking" ], "background": { "scripts": ["background.js"] }, "minimum_chrome_version":"22.0.0" } """ background_js = """ var config = { mode: "fixed_servers", rules: { singleProxy: { scheme: "http", host: "%s", port: parseInt(%s) }, bypassList: ["localhost"] } }; chrome.proxy.settings.set({value: config, scope: "regular"}, function() {}); function callbackFn(details) { return { authCredentials: { username: "%s", password: "%s" } }; } chrome.webRequest.onAuthRequired.addListener( callbackFn, {urls: ["<all_urls>"]}, ['blocking'] ); """ % ( ip, port, login, password, ) dir_path = "assets/chrome_extensions" if not os.path.exists(dir_path): os.makedirs(dir_path) pluginfile = "%s/proxy_auth_%s:%s.zip" % (dir_path, ip, port) with zipfile.ZipFile(pluginfile, "w") as zp: zp.writestr("manifest.json", manifest_json) zp.writestr("background.js", background_js) return pluginfile |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |