MCPcopy Index your code
hub / github.com/secdev/scapy / edit_ticket

Method edit_ticket

scapy/modules/ticketer.py:1972–2331  ·  view source on GitHub ↗

Edit a Kerberos ticket using the GUI

(self, i, key=None, hash=None)

Source from the content-addressed store, hash-verified

1970 )
1971
1972 def edit_ticket(self, i, key=None, hash=None):
1973 """
1974 Edit a Kerberos ticket using the GUI
1975 """
1976 if tk is None:
1977 raise ImportError(
1978 "tkinter is not installed (`apt install python3-tk` on debian)"
1979 )
1980 tkt = self.dec_ticket(i, key=key, hash=hash)
1981 pac = tkt.authorizationData.seq[0].adData[0].seq[0].adData
1982
1983 # WIDTH, HEIGHT = 1120, 1000
1984
1985 # Note: for TK doc, use https://tkdocs.com
1986
1987 # Root
1988 root = tk.Tk()
1989 root.title("Ticketer++ (@secdev/scapy)")
1990 # root.geometry("%sx%s" % (WIDTH, HEIGHT))
1991 # root.resizable(0, 1)
1992
1993 scrollFrame = ScrollFrame(root)
1994 frm = scrollFrame.viewPort
1995
1996 tk_ticket = ttk.Frame(frm, padding=5)
1997 tk_pac = ttk.Frame(frm, padding=5)
1998
1999 ttk.Button(frm, text="Quit", command=root.destroy).grid(
2000 column=0, row=1, columnspan=2
2001 )
2002
2003 # TTK style
2004
2005 ttkstyle = ttk.Style()
2006 ttkstyle.theme_use("alt")
2007 ttkstyle.configure(
2008 "BorderFrame.TFrame",
2009 relief="groove",
2010 borderwidth=3,
2011 )
2012
2013 # MAIN TICKET
2014
2015 # Flags
2016 tk_flags = ttk.LabelFrame(
2017 tk_ticket,
2018 text="Flags",
2019 style="BorderFrame.TFrame",
2020 )
2021 tk_flags.pack(fill="x", pady=5)
2022 flags = tkt.get_field("flags").get_flags(tkt)
2023 self._data["flags"] = {}
2024 self._make_checkbox(tk_flags, _TICKET_FLAGS, flags, self._data["flags"])
2025
2026 # Key
2027 tk_key = ttk.LabelFrame(
2028 tk_ticket,
2029 text="key",

Callers

nothing calls this directly

Calls 15

dec_ticketMethod · 0.95
_make_checkboxMethod · 0.95
_make_fieldsMethod · 0.95
_make_tableMethod · 0.95
_getLogonInformationMethod · 0.95
_getClientInfoMethod · 0.95
_getUPNDnsInfoMethod · 0.95
_getClientClaimsMethod · 0.95
_getPACAttributesMethod · 0.95
_getPACRequestorMethod · 0.95
_getServerChecksumMethod · 0.95
_getKDCChecksumMethod · 0.95

Tested by

no test coverage detected