Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.LOWER = tk.IntVar()
self.UPPER = tk.IntVar()
self.DIGITS = tk.IntVar()
self.CUSTOM = tk.IntVar()
self.CUSTVALS = tk.StringVar()
min_label = ttk.Label(self.mainframe, text='Length min/max: ')
min_label.grid(row=20, column=0, sticky=tk.E)
createToolTip(min_label, 'Select minimum and maximum password length')
lframe = ttk.Frame(self.mainframe)
lframe.grid(row=20, column=1, sticky=tk.W)
self.min_value = tk.Spinbox(lframe, from_=1, to=16, textvariable=self.MIN, width=3, command=self.updatemin)
createToolTip(self.min_value, "Minimum password length")
self.min_value.pack(side=tk.LEFT)
self.max_value = tk.Spinbox(lframe, from_=1, to=16, textvariable=self.MAX, width=3, command=self.updatemax)
createToolTip(self.max_value, "Maximum password length")
self.max_value.pack()
char_label = ttk.Label(self.mainframe, text='Characters: ')
char_label.grid(row=30, column=0, sticky=tk.E)
createToolTip(char_label, "Choose characters combination for the password")
iframe = ttk.Frame(self.mainframe)
iframe.grid(row=30, column=1, sticky=tk.W)
ttk.Checkbutton(iframe, text='Lowercase [a-z]', var=self.LOWER).pack(side=tk.TOP, fill=tk.BOTH, expand=True)
ttk.Checkbutton(iframe, text='Uppercase [A-Z]', var=self.UPPER).pack(side=tk.TOP, fill=tk.BOTH, expand=True)
ttk.Checkbutton(iframe, text='Digits [0-9]', var=self.DIGITS).pack(side=tk.TOP, fill=tk.BOTH, expand=True)
ttk.Checkbutton(iframe, text='Custom:', var=self.CUSTOM).pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
ttk.Entry(iframe, textvariable=self.CUSTVALS, width=15).pack(fill=tk.BOTH, expand=True)
self.extract_button = ttk.Button(extract_adb_frame, text='Extract')
self.extract_button.bind('', self.RunUsbExtraction)
self.extract_button.grid(row=2, column=0, sticky=tk.W)
createToolTip(self.extract_button, 'Extract and decode data from a connected Android device')
# self.open_report = tk.IntVar()
# self.open_report.set(1)
# self.open_report_button = ttk.Checkbutton(extract_adb_frame, text='Open REPORT.html in browser', var=self.open_report)
# self.open_report_button.grid(row=3, column=0, columnspan=2, sticky=tk.W)
# createToolTip(self.open_report_button, 'On successful extraction open the result in the browser')
self.force_backup = tk.IntVar()
self.force_backup_button = ttk.Checkbutton(extract_adb_frame, text='Use AB method (ignore root)', var=self.force_backup)
self.force_backup_button.grid(row=4, column=0, columnspan=2, sticky=tk.W)
createToolTip(self.force_backup_button, 'If rooted - force Android Backup extraction instead')
self.extract_shared = tk.IntVar()
self.extract_shared_button = ttk.Checkbutton(extract_adb_frame, text='Extract Shared Storage', var=self.extract_shared)
self.extract_shared_button.grid(row=5, column=0, columnspan=2, sticky=tk.W)
createToolTip(self.extract_shared_button, 'File system extraction of shared storage\n(Pictutes, Videos, Audios, other files)')
# Forder extract controls
extract_folder_frame = ttk.Frame(noteframe, padding=(5, 0))
noteframe.add(extract_folder_frame, text='Parse (Folder)')
self.extract_folder = ttk.Button(extract_folder_frame, text='Directory..', )
self.extract_folder.grid(row=1, column=0, sticky=tk.W)
self.extract_folder.bind('', self.RunDirExtraction)
createToolTip(self.extract_folder, "Choose the '/data/data' directory to be parsed and data decoded")
# TAR extract controls
extract_tar_frame = ttk.Frame(noteframe, padding=(5, 0))
noteframe.pack(fill=tk.X, expand=0, side=tk.TOP)
# ADB extract controls
extract_adb_frame = ttk.Frame(noteframe, padding=(5, 0))
noteframe.add(extract_adb_frame, text='Extraction (USB)')
self.check_button = ttk.Button(extract_adb_frame, text='Check')
self.check_button.bind('', self.check_usb)
createToolTip(self.check_button, 'Check if any Android devices are connected')
self.check_button.grid(row=1, column=0, sticky=tk.W)
ttk.Label(extract_adb_frame, font=self.FontStatus, textvariable=self.DeviceStatus, padding=(5, 0))\
.grid(row=1, column=1, sticky=tk.W)
self.extract_button = ttk.Button(extract_adb_frame, text='Extract')
self.extract_button.bind('', self.RunUsbExtraction)
self.extract_button.grid(row=2, column=0, sticky=tk.W)
createToolTip(self.extract_button, 'Extract and decode data from a connected Android device')
# self.open_report = tk.IntVar()
# self.open_report.set(1)
# self.open_report_button = ttk.Checkbutton(extract_adb_frame, text='Open REPORT.html in browser', var=self.open_report)
# self.open_report_button.grid(row=3, column=0, columnspan=2, sticky=tk.W)
# createToolTip(self.open_report_button, 'On successful extraction open the result in the browser')
self.force_backup = tk.IntVar()
self.force_backup_button = ttk.Checkbutton(extract_adb_frame, text='Use AB method (ignore root)', var=self.force_backup)
self.force_backup_button.grid(row=4, column=0, columnspan=2, sticky=tk.W)
createToolTip(self.force_backup_button, 'If rooted - force Android Backup extraction instead')
self.extract_shared = tk.IntVar()
self.extract_shared_button = ttk.Checkbutton(extract_adb_frame, text='Extract Shared Storage', var=self.extract_shared)
self.extract_shared_button.grid(row=5, column=0, columnspan=2, sticky=tk.W)
createToolTip(self.extract_shared_button, 'File system extraction of shared storage\n(Pictutes, Videos, Audios, other files)')
# Guide
ttk.Button(assist_frame, text='Help', command=messages.screen_guide).pack(side=tk.TOP, expand=0, fill=tk.X)
# Note
self.note_text = ttk.Entry(self.mainframe, width=27)
self.note_text.configure(state=tk.DISABLED)
self.note_text.bind("", self.capture)
createToolTip(self.note_text, 'Type a comment press ENTER to Capture and Save.')
# Snap
self.snap_button = ttk.Button(self.mainframe, text='Capture', command=self.capture, takefocus=True)
self.snap_button.grid(row=15, column=0, columnspan=1, sticky=(tk.W,))
# Close
ttk.Button(self.mainframe, text='Close', command=self.root.destroy)\
.grid(row=15, column=1, columnspan=2, sticky=(tk.N, tk.E))
self.remember_button = ttk.Checkbutton(self.mainframe, text='Remember', var=self.REMEMBER)
createToolTip(self.remember_button, 'Keep last entered comment in field.')
# Status
status_frame = ttk.Frame(self.mainframe, padding=(5, 1), relief='groove')
status_frame.grid(row=20, column=0, columnspan=3, sticky=(tk.W, tk.E))
self.status_label = ttk.Label(status_frame, text='Ready', font=self.FontStatus)
self.status_label.grid(row=4, column=0, sticky=tk.W, padx=5, pady=3)
def enable_pin_range(self):
self.start_label = ttk.Label(self.mainframe, text='Start from: ')
createToolTip(self.start_label, "Start the PIN from (Recommended: 0000)")
self.start_field = ttk.Entry(self.mainframe, textvariable=self.START, width=16)
self.start_field.bind('', rClicker, add='')
self.start_label.grid(row=20, column=0, sticky=tk.E)
self.start_field.grid(row=20, column=1, columnspan=2, sticky=tk.W)
self.end_label = ttk.Label(self.mainframe, text='Max value: ')
createToolTip(self.end_label, "Maximum PIN value")
self.end_field = ttk.Entry(self.mainframe, textvariable=self.END, width=16)
self.end_field.bind('', rClicker, add='')
self.end_label.grid(row=30, column=0, sticky=tk.E)
self.end_field.grid(row=30, column=1, columnspan=2, sticky=tk.W)
output_frame = ttk.Frame(control_frame)
output_frame.pack(expand=True, fill=tk.X, side=tk.TOP)
# OUTDIR
OUTDIR = ttk.Button(output_frame, text='Output', command=self.set_directory)
createToolTip(OUTDIR, 'Set destination directory where to save screen captures.')
OUTDIR.pack(side=tk.LEFT)
ttk.Label(output_frame, textvar=self.OUTPUTLAB, font=self.FontInfo).pack(expand=True, fill=tk.X, side=tk.TOP)
# Assistance Frame
assist_frame = ttk.Frame(control_frame)
assist_frame.pack(side=tk.LEFT)
# Save
self.save_this = ttk.Button(assist_frame, text='Save this..', command=self.save)
# self.save_this = ttk.Button(assist_frame, text='Save this..')
self.save_this.configure(state=tk.DISABLED)
createToolTip(self.save_this, 'Save current screen capture to..')
self.save_this.pack(side=tk.TOP, expand=0, fill=tk.X)
# Report
self.report_button = ttk.Button(assist_frame, textvar=self.REPCOUNT)
self.report_button.bind('', self.report)
self.report_button.configure(state=tk.DISABLED)
createToolTip(self.report_button, 'Generate a report with created screen captures.\nNote: only works when Output is provided.')
self.report_button.pack(side=tk.TOP, expand=0, fill=tk.X)
# Guide
ttk.Button(assist_frame, text='Help', command=messages.screen_guide).pack(side=tk.TOP, expand=0, fill=tk.X)
# Note
self.note_text = ttk.Entry(self.mainframe, width=27)
self.note_text.configure(state=tk.DISABLED)
self.note_text.bind("", self.capture)
createToolTip(self.note_text, 'Type a comment press ENTER to Capture and Save.')
# Snap
opframe.pack(fill=tk.X, expand=0, side=tk.TOP)
self.output_button = ttk.Button(opframe, text="Output..", command=self.set_output)
self.output_button.pack(side=tk.LEFT)
createToolTip(self.output_button, 'Select the output location where data will be saved to')
ttk.Label(opframe, textvariable=self.OUTPUT, padding=(5, 0))\
.pack(expand=True, fill=tk.X, side=tk.LEFT)
noteframe = ttk.Notebook(midframe, padding=(1, 0))
noteframe.pack(fill=tk.X, expand=0, side=tk.TOP)
# ADB extract controls
extract_adb_frame = ttk.Frame(noteframe, padding=(5, 0))
noteframe.add(extract_adb_frame, text='Extraction (USB)')
self.check_button = ttk.Button(extract_adb_frame, text='Check')
self.check_button.bind('', self.check_usb)
createToolTip(self.check_button, 'Check if any Android devices are connected')
self.check_button.grid(row=1, column=0, sticky=tk.W)
ttk.Label(extract_adb_frame, font=self.FontStatus, textvariable=self.DeviceStatus, padding=(5, 0))\
.grid(row=1, column=1, sticky=tk.W)
self.extract_button = ttk.Button(extract_adb_frame, text='Extract')
self.extract_button.bind('', self.RunUsbExtraction)
self.extract_button.grid(row=2, column=0, sticky=tk.W)
createToolTip(self.extract_button, 'Extract and decode data from a connected Android device')
# self.open_report = tk.IntVar()
# self.open_report.set(1)
# self.open_report_button = ttk.Checkbutton(extract_adb_frame, text='Open REPORT.html in browser', var=self.open_report)
# self.open_report_button.grid(row=3, column=0, columnspan=2, sticky=tk.W)
# createToolTip(self.open_report_button, 'On successful extraction open the result in the browser')
self.force_backup = tk.IntVar()
# self.open_report = tk.IntVar()
# self.open_report.set(1)
# self.open_report_button = ttk.Checkbutton(extract_adb_frame, text='Open REPORT.html in browser', var=self.open_report)
# self.open_report_button.grid(row=3, column=0, columnspan=2, sticky=tk.W)
# createToolTip(self.open_report_button, 'On successful extraction open the result in the browser')
self.force_backup = tk.IntVar()
self.force_backup_button = ttk.Checkbutton(extract_adb_frame, text='Use AB method (ignore root)', var=self.force_backup)
self.force_backup_button.grid(row=4, column=0, columnspan=2, sticky=tk.W)
createToolTip(self.force_backup_button, 'If rooted - force Android Backup extraction instead')
self.extract_shared = tk.IntVar()
self.extract_shared_button = ttk.Checkbutton(extract_adb_frame, text='Extract Shared Storage', var=self.extract_shared)
self.extract_shared_button.grid(row=5, column=0, columnspan=2, sticky=tk.W)
createToolTip(self.extract_shared_button, 'File system extraction of shared storage\n(Pictutes, Videos, Audios, other files)')
# Forder extract controls
extract_folder_frame = ttk.Frame(noteframe, padding=(5, 0))
noteframe.add(extract_folder_frame, text='Parse (Folder)')
self.extract_folder = ttk.Button(extract_folder_frame, text='Directory..', )
self.extract_folder.grid(row=1, column=0, sticky=tk.W)
self.extract_folder.bind('', self.RunDirExtraction)
createToolTip(self.extract_folder, "Choose the '/data/data' directory to be parsed and data decoded")
# TAR extract controls
extract_tar_frame = ttk.Frame(noteframe, padding=(5, 0))
noteframe.add(extract_tar_frame, text='Parse (.TAR)')
self.extract_tar = ttk.Button(extract_tar_frame, text='TAR File..', )
self.extract_tar.bind('', self.RunTarExtraction)
self.extract_tar.grid(row=1, column=0, sticky=tk.W)
createToolTip(self.extract_tar, "Choose the 'data.tar' backup file to be parsed and data decoded")
ttk.Label(output_frame, textvar=self.OUTPUTLAB, font=self.FontInfo).pack(expand=True, fill=tk.X, side=tk.TOP)
# Assistance Frame
assist_frame = ttk.Frame(control_frame)
assist_frame.pack(side=tk.LEFT)
# Save
self.save_this = ttk.Button(assist_frame, text='Save this..', command=self.save)
# self.save_this = ttk.Button(assist_frame, text='Save this..')
self.save_this.configure(state=tk.DISABLED)
createToolTip(self.save_this, 'Save current screen capture to..')
self.save_this.pack(side=tk.TOP, expand=0, fill=tk.X)
# Report
self.report_button = ttk.Button(assist_frame, textvar=self.REPCOUNT)
self.report_button.bind('', self.report)
self.report_button.configure(state=tk.DISABLED)
createToolTip(self.report_button, 'Generate a report with created screen captures.\nNote: only works when Output is provided.')
self.report_button.pack(side=tk.TOP, expand=0, fill=tk.X)
# Guide
ttk.Button(assist_frame, text='Help', command=messages.screen_guide).pack(side=tk.TOP, expand=0, fill=tk.X)
# Note
self.note_text = ttk.Entry(self.mainframe, width=27)
self.note_text.configure(state=tk.DISABLED)
self.note_text.bind("", self.capture)
createToolTip(self.note_text, 'Type a comment press ENTER to Capture and Save.')
# Snap
self.snap_button = ttk.Button(self.mainframe, text='Capture', command=self.capture, takefocus=True)
self.snap_button.grid(row=15, column=0, columnspan=1, sticky=(tk.W,))
# Close
ttk.Button(self.mainframe, text='Close', command=self.root.destroy)\
.grid(row=15, column=1, columnspan=2, sticky=(tk.N, tk.E))
self.remember_button = ttk.Checkbutton(self.mainframe, text='Remember', var=self.REMEMBER)
super().__init__(root=root, title=title)
ttk.Label(self.mainframe, font=self.FontTitle, text=f'\n{title}\n').grid(row=1, column=0, columnspan=3)
self.FILE = tk.StringVar()
self.HASH = tk.StringVar()
self.PATTERN = tk.StringVar()
browse = ttk.Button(self.mainframe, text='Browse', command=self.select_file)
browse.grid(row=2, column=0, sticky=tk.E)
createToolTip(browse, "Select 'gesture.key' and it will be decoded automatically.")
ttk.Label(self.mainframe, textvariable=self.FILE).grid(row=2, column=1, columnspan=2, sticky=tk.W)
ttk.Label(self.mainframe, text='or').grid(row=3, column=0, sticky=tk.E)
hash_label = ttk.Label(self.mainframe, text='Gesture Hash: ')
hash_label.grid(row=4, column=0, sticky=tk.E)
createToolTip(hash_label, "Enter gesture.key hash value (40 hexadecimal characters) from:\n--> '/data/system/gesture.key'")
hash_field = ttk.Entry(self.mainframe, font=self.FontMono, textvariable=self.HASH, width=45)
hash_field.grid(row=4, column=1, columnspan=2, sticky=tk.W)
hash_field.bind('', rClicker, add='')
pattern_label = ttk.Label(self.mainframe, text='Pattern: ')
pattern_label.grid(row=6, column=0, sticky=tk.E)
createToolTip(pattern_label, 'Double click on the entry field to edit and then to Draw\nEnter as a list of integers, eg: [8,4,0,1,2]')
result_field = ttk.Entry(self.mainframe, textvariable=self.PATTERN, font=self.FontTitle, width=25, state='disabled')
result_field.bind('', rClicker, add='')
result_field.bind('', lambda e: result_field.configure(state='normal'))
result_field.bind('', lambda e: result_field.configure(state='normal'))
result_field.bind('', lambda e: result_field.configure(state='disabled'))
result_field.grid(row=6, column=1, columnspan=2, sticky=tk.W)
self.VISUAL = tk.Canvas(self.mainframe, width=self.CANVAS_SIZE, height=self.CANVAS_SIZE, borderwidth=0)
self.VISUAL.grid(row=7, column=1, sticky=tk.W)
self.draw_pattern(self.VISUAL, self.PATTERN.get())