Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SHAtter.py #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions SHAtter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Credit: This file is based on SHAtter exploit (segment overflow) by posixninja and pod2g.

import struct, sys, time
import struct
import sys
import time

import dfu

def generate_payload():
Expand All @@ -24,13 +27,11 @@ def exploit():
return

if 'CPID:8930' not in device.serial_number:
print 'ERROR: Not a compatible device. This exploit is for S5L8930 devices only. Exiting.'
sys.exit(1)
sys.exit('ERROR: Not a compatible device. This exploit is for S5L8930 devices only. Exiting.')

if 'SRTG:[iBoot-574.4]' not in device.serial_number:
print 'ERROR: CPID is compatible, but serial number string does not match.'
print 'Make sure device is in SecureROM DFU Mode and not LLB/iBSS DFU Mode. Exiting.'
sys.exit(1)
sys.exit('ERROR: CPID is compatible, but serial number string does not match.\n'
'Make sure device is in SecureROM DFU Mode and not LLB/iBSS DFU Mode. Exiting.')

dfu.reset_counters(device)
dfu.get_data(device, 0x40)
Expand Down Expand Up @@ -69,7 +70,6 @@ def exploit():
dfu.release_device(device)

if failed:
print 'ERROR: Exploit failed. Device did not enter pwned DFU Mode.'
sys.exit(1)
sys.exit('ERROR: Exploit failed. Device did not enter pwned DFU Mode.')

print 'Device is now in pwned DFU Mode.'