def section(fname, dirname, title, pageTitle): mfname=fname filename=os.path.splitext(fname) if filename[1] not in htmlfiles: mfname = "%s%s"%(filename[0],htmlext) menu = countershape.widgets.ExtendedParentPageIndex( '/%s'%mfname, depth = 1, divclass = "navBarLineTwo", currentActive = True ) page = Page( fname, title, pageTitle = pageTitle, ) page.namespace["blk_submenu"] = menu page.namespace["submenuTitle"] = title directory = Directory(dirname) directory.namespace["blk_submenu"] = menu return [page, directory]
ns.filt_help = filt.help def nav(page, current, state): if current.match(page, False): pre = '<li class="active">' else: pre = "<li>" p = state.application.getPage(page) return pre + '<a href="%s">%s</a></li>'%(model.UrlTo(page), p.title) ns.nav = nav ns.navbar = countershape.template.File(None, "_nav.html") pages = [ Page("index.html", "Introduction"), Page("install.html", "Installation"), Page("howmitmproxy.html", "How mitmproxy works"), Page("modes.html", "Modes of Operation"), Page("mitmproxy.html", "mitmproxy"), Page("mitmdump.html", "mitmdump"), Page("config.html", "configuration"), Page("ssl.html", "Overview"), Directory("certinstall"), Directory("scripting"), Directory("tutorials"), Page("transparent.html", "Overview"), Directory("transparent"), ]
from countershape import Page pages = [ Page("testing.html", "Testing"), Page("architecture.html", "Architecture"), Page("sslkeylogfile.html", "TLS Master Secrets"), # Page("addingviews.html", "Writing Content Views"), ]
from countershape import Page pages = [ Page("30second.html", "Client playback: a 30 second example"), Page("gamecenter.html", "Setting highscores on Apple's GameCenter"), Page("transparent-dhcp.html", "Transparently proxify virtual machines") ]
url = image if not klass == "" or not kaption == "": url=""" <div %s> %s %s </div> """ % (klass, image, kaption) return url ns.Image = Image pages = [ Page("index.md", title="Overview", pageTitle="an Overview" ), Page("install.md", title="Install", pageTitle="a quick Install" ), Directory("install"), Page( "client.md", title="Client", pageTitle = "Client Use" ), Directory("client"), Page(
from countershape import Page pages = [ Page("testing.html", "Testing"), Page("architecture.html", "Architecture"), # Page("addingviews.html", "Writing Content Views"), ]
ns.imgBanner = countershape.html.IMG( src=countershape.model.UrlTo("countershape.png"), width="280", height="77", align="right") class ShowSrc: def __init__(self, d): self.d = os.path.abspath(d) def __call__(self, path): return countershape.doc.readFrom(os.path.join(self.d, path)) ns.readFrom = ShowSrc(".") pages = [ Page("index.md", title="Introduction", pageTitle="Introduction to Countershape"), Directory("intro"), Page("markup/markup.md", title="Text Formatting", pageTitle="Text Formatting Options"), Directory("markup"), PythonModule(name="../countershape", title="Source"), Page("admin.md", title="Administrivia", pageTitle="Novella Administrivia") ]
from countershape import Page pages = [ Page("firefox.html", "Firefox"), Page("osx.html", "OSX"), Page("windows7.html", "Windows 7"), Page("ios.html", "IOS"), Page("ios-simulator.html", "IOS Simulator"), Page("android.html", "Android"), ]
from countershape import Page pages = [ Page("anticache.html", "Anticache"), Page("clientreplay.html", "Client-side replay"), Page("filters.html", "Filter expressions"), Page("forwardproxy.html", "Forward proxy mode"), Page("setheaders.html", "Set Headers"), Page("serverreplay.html", "Server-side replay"), Page("sticky.html", "Sticky cookies and auth"), Page("proxyauth.html", "Proxy Authentication"), Page("replacements.html", "Replacements"), Page("reverseproxy.html", "Reverse proxy mode"), Page("upstreamcerts.html", "Upstream Certs"), ]
) filt_help.sort() filt_help.extend( [ ("!", "unary not"), ("&", "and"), ("|", "or"), ("(...)", "grouping"), ] ) ns.filt_help = filt_help pages = [ Page("index.html", "docs"), Page("intro.html", "Introduction"), Page("install.html", "Installation"), Page("mitmproxy.html", "mitmproxy"), Page("mitmdump.html", "mitmdump"), Page("clientreplay.html", "Client-side replay"), Page("serverreplay.html", "Server-side replay"), Page("sticky.html", "Sticky cookies and auth"), Page("upstreamcerts.html", "Upstream Certs"), Page("replacements.html", "Replacements"), Page("reverseproxy.html", "Reverse proxy mode"), Page("anticache.html", "Anticache"), Page("filters.html", "Filter expressions"), Page("ssl.html", "Setting up SSL interception"), Directory("certinstall"), Directory("scripting"),
from countershape import Page pages = [ Page("testing.html", "Testing"), # Page("addingviews.html", "Writing Content Views"), ]
from countershape import Page pages = [ Page("30second.html", "Client playback: a 30 second example"), ]
from countershape import Page pages = [ Page("osx.html", "OSX"), Page("linux.html", "Linux"), ]
from countershape import Page pages = [ Page("firefox.html", "Firefox"), Page("osx.html", "OSX"), Page("windows7.html", "Windows 7"), Page("ios.html", "IOS"), ]
from countershape import Page pages = [ Page("webapp.html", "Using the Web App"), Page("firefox.html", "Firefox"), Page("osx.html", "OSX"), Page("windows7.html", "Windows 7"), Page("ios.html", "IOS"), Page("ios-simulator.html", "IOS Simulator"), Page("android.html", "Android"), Page("java.html", "Java"), Page("mitm.it-error.html", "Error: No proxy configured"), ]
from countershape import Page pages = [ Page("inlinescripts.html", "Inline Scripts"), Page("libmproxy.html", "libmproxy"), ]
from countershape import Page pages = [ Page("30second.html", "Client playback: a 30 second example"), Page("gamecenter.html", "Setting highscores on Apple's GameCenter"), ]
from countershape import Page pages = [ Page("webapp.html", "Using the Web App"), Page("firefox.html", "Firefox"), Page("osx.html", "OSX"), Page("windows7.html", "Windows 7"), Page("ios.html", "IOS"), Page("ios-simulator.html", "IOS Simulator"), Page("android.html", "Android"), Page("java.html", "Java"), ]
filt_help.append(("~%s" % i.code, i.help)) for i in filt.filt_rex: filt_help.append(("~%s regex" % i.code, i.help)) for i in filt.filt_int: filt_help.append(("~%s int" % i.code, i.help)) filt_help.sort() filt_help.extend([ ("!", "unary not"), ("&", "and"), ("|", "or"), ("(...)", "grouping"), ]) ns.filt_help = filt_help pages = [ Page("index.html", "docs"), Page("intro.html", "Introduction"), Page("interception.html", "Interception"), Page("clientreplay.html", "Client-side replay"), Page("serverreplay.html", "Server-side replay"), Page("sticky.html", "Sticky cookies and auth"), Page("anticache.html", "Anticache"), Page("filters.html", "Filter expressions"), Page("scripts.html", "External scripts"), Page("ssl.html", "SSL"), Directory("certinstall"), Page("library.html", "libmproxy: mitmproxy as a library"), Directory("tutorials"), Page("faq.html", "FAQ"), Page("admin.html", "Administrivia") ]
from countershape import Page pages = [ Page("anticache.html", "Anticache"), Page("clientreplay.html", "Client-side replay"), Page("filters.html", "Filter expressions"), Page("passthrough.html", "Ignore Domains"), Page("proxyauth.html", "Proxy Authentication"), Page("replacements.html", "Replacements"), Page("responsestreaming.html", "Response Streaming"), Page("reverseproxy.html", "Reverse proxy mode"), Page("setheaders.html", "Set Headers"), Page("serverreplay.html", "Server-side replay"), Page("sticky.html", "Sticky cookies and auth"), Page("upstreamcerts.html", "Upstream Certs"), Page("upstreamproxy.html", "Upstream proxy mode"), ]
("|", "or"), ("(...)", "grouping"), ] ) ns.filt_help = filt_help def nav(page, current, state): if current.match(page, False): pre = '<li class="active">' else: pre = "<li>" p = state.application.getPage(page) return pre + '<a href="%s">%s</a></li>'%(model.UrlTo(page), p.title) ns.nav = nav pages = [ Page("index.html", "Introduction"), Page("install.html", "Installation"), Page("mitmproxy.html", "mitmproxy"), Page("mitmdump.html", "mitmdump"), Page("howmitmproxy.html", "How mitmproxy works"), Page("ssl.html", "Overview"), Directory("certinstall"), Directory("scripting"), Directory("tutorials"), Page("transparent.html", "Overview"), Directory("transparent"), ]
from countershape import Page pages = [ Page("linux.html", "Linux"), Page("osx.html", "OSX"), Page("openbsd.html", "OpenBSD"), ]