-
Notifications
You must be signed in to change notification settings - Fork 8
/
LunarixusMDMBypass.bat
84 lines (57 loc) · 2.3 KB
/
LunarixusMDMBypass.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@echo off
Title Lunarixus MDM Bypass Tool
color a
echo Lunarixus MDM Bypass
echo Shout-out to that one sketch eBay guy for source code
echo
deviceinfo.dll -k SerialNumber > info.log 2>&1
find /c "ERROR: No device found!" info.log > nul
if %errorlevel% equ 1 goto notfound1
echo Error occured.
echo Device not connected. Connect and try again.
echo.
echo Possible Fix : Open iTunes and check if device is connected then try again.
goto end
:notfound1
find /c "Could not connect to lockdownd" info.log > nul
if %errorlevel% equ 1 goto verify
echo Software cannot connect to device.
echo Make sure the device gets detected in iTunes and try again.
echo.
echo Possible Fix : Connect the device in Recovery mode and restore it in iTunes. Then try again.
goto end
:verify
echo
echo
FOR /F "tokens=* USEBACKQ" %%F IN (`deviceinfo.dll -k SerialNumber`) DO (
SET Serial=%%F
)
FOR /F "tokens=* USEBACKQ" %%F IN (`deviceinfo.dll -k UniqueDeviceID`) DO (
SET UDID=%%F
)
FOR /F "tokens=* USEBACKQ" %%F IN (`deviceinfo.dll -k ProductType`) DO (
SET DeviceName=%%F
)
FOR /F "tokens=* USEBACKQ" %%F IN (`deviceinfo.dll -k ProductVersion`) DO (
SET ios=%%F
)
echo Device Connected: %DeviceName%
echo iOS: %ios%
echo Serial: %Serial%
echo UDID: %UDID%
echo
echo Please wait, bypassing...
libcon.dll -convert xml1 "ffe2017db9c5071adfa1c23d3769970f7524a9d4\Manifest.plist" >nul 2>&1
down.dll ed -L -u "//key[.='SerialNumber']/following-sibling::string[1]" -v %Serial% "ffe2017db9c5071adfa1c23d3769970f7524a9d4\Manifest.plist" >nul 2>&1
down.dll ed -L -u "//key[.='UniqueDeviceID']/following-sibling::string[1]" -v %UDID% "ffe2017db9c5071adfa1c23d3769970f7524a9d4\Manifest.plist" >nul 2>&1
libcon.dll -convert binary1 "ffe2017db9c5071adfa1c23d3769970f7524a9d4\Manifest.plist" >nul 2>&1
sys.temp.dll -s ffe2017db9c5071adfa1c23d3769970f7524a9d4 restore --system --settings --skip-apps --no-reboot "%temp%" > test.log
echo Device is rebooting, once it has rebooted MDM should be bypassed.
finish.dll restart > nul
echo ------------------------------
echo Twitter: @TheLunarixus
echo Telegram: @Lunarixus
echo GitHub: Lunarixus
echo ------------------------------
del /f "info.log" >nul 2>&1
pause