Esempio n. 1
0
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]
Esempio n. 2
0
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"),
]
Esempio n. 3
0
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"),
]
Esempio n. 4
0
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")
]
Esempio n. 5
0
        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(
Esempio n. 6
0
from countershape import Page

pages = [
     Page("testing.html", "Testing"),
     Page("architecture.html", "Architecture"),
#    Page("addingviews.html", "Writing Content Views"),
]
Esempio n. 7
0
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")
]
Esempio n. 8
0
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"),
]
Esempio n. 9
0
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"),
]
Esempio n. 10
0
    )
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"),
Esempio n. 11
0
from countershape import Page

pages = [
    Page("testing.html", "Testing"),
    #    Page("addingviews.html", "Writing Content Views"),
]
Esempio n. 12
0
from countershape import Page

pages = [
    Page("30second.html", "Client playback: a 30 second example"),
]
Esempio n. 13
0
from countershape import Page

pages = [
    Page("osx.html", "OSX"),
    Page("linux.html", "Linux"),
]
Esempio n. 14
0
from countershape import Page

pages = [
    Page("firefox.html", "Firefox"),
    Page("osx.html", "OSX"),
    Page("windows7.html", "Windows 7"),
    Page("ios.html", "IOS"),
]
Esempio n. 15
0
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"),
]
Esempio n. 16
0
from countershape import Page

pages = [
    Page("inlinescripts.html", "Inline Scripts"),
    Page("libmproxy.html", "libmproxy"),
]
Esempio n. 17
0
from countershape import Page

pages = [
    Page("30second.html", "Client playback: a 30 second example"),
    Page("gamecenter.html", "Setting highscores on Apple's GameCenter"),
]
Esempio n. 18
0
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"),
]
Esempio n. 19
0
    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")
]
Esempio n. 20
0
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"),
]
Esempio n. 21
0
        ("|", "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"),
]
Esempio n. 22
0
from countershape import Page

pages = [
    Page("linux.html", "Linux"),
    Page("osx.html", "OSX"),
    Page("openbsd.html", "OpenBSD"),
]