1
+ import os
2
+ import sys
3
+ import urllib
4
+ import shutil
5
+ import os .path
6
+ import fileinput
7
+
8
+
9
+ """ WELCOME """
10
+ print "******************************"
11
+ print "* Regionhax Installer v1.0 *"
12
+ print "******************************\n "
13
+ print "******************************"
14
+ print "* 16-nov-2016 *"
15
+ print "* *"
16
+ print "* Script by Vickdu31 *"
17
+ print "* email : [email protected] *"
18
+ print "******************************"
19
+ raw_input ("Press enter to start..." )
20
+ os .system ('cls' if os .name == 'nt' else 'clear' )
21
+ print "**************************************"
22
+ print "* DISCLAIMER : *"
23
+ print "**************************************\n "
24
+ print "**************************************"
25
+ print "* I AM NOT RESPONSIBLE FOR BRICK *"
26
+ print "* DO NOT MODIFY THIS TOOL *"
27
+ print "* *"
28
+ print "* This tool have been tested a lot *"
29
+ print "* It should be safe if you follow . *"
30
+ print "**************************************"
31
+ raw_input ("Press enter to continue..." )
32
+ os .system ('cls' if os .name == 'nt' else 'clear' )
33
+
34
+
35
+ """ ASK CONFIRMATION """
36
+ print "******************************"
37
+ print "* Regionhax Installer v1.0 *"
38
+ print "******************************\n "
39
+ for retry in range (5 ):
40
+ confirm = raw_input ("Would you like to set your Wii U Region Free ? (y/n) " )
41
+ if (confirm == 'y' or confirm == 'Y' or confirm == 'yes' ):
42
+ ansr = raw_input ("Are you sure ? (y/n) " )
43
+ if (ansr == 'y' or ansr == 'Y' or ansr == 'yes' ):
44
+ break
45
+ if (confirm == 'n' or confirm == 'N' or confirm == 'no' or confirm == 'NO' ):
46
+ ansr = raw_input ("Are you sure ? (y/n) " )
47
+ if (ansr == 'y' or ansr == 'Y' or ansr == 'yes' ):
48
+ raw_input ("Press enter to exit program...." )
49
+ sys .exit ()
50
+ break
51
+ print "\n Please decide.\n "
52
+ else :
53
+ sys .exit (1 )
54
+
55
+ """ ASK REGION """
56
+ os .system ('cls' if os .name == 'nt' else 'clear' )
57
+ print "******************************"
58
+ print "* Regionhax Installer v1.0 *"
59
+ print "******************************\n "
60
+ for retry in range (5 ):
61
+ creg = raw_input ("What is your console region ? (eur/us/jap) (IMPORTANT!!!) " )
62
+ if (creg == 'eur' or creg == 'us' or creg == 'jap' ):
63
+ ansr = raw_input ("Your console region is " + creg + ". Is that correct ? (y/n) " )
64
+ if (ansr == 'y' or ansr == 'Y' or ansr == 'yes' ):
65
+ break
66
+ print "\n Please enter values correctly.\n "
67
+ else :
68
+ sys .exit (1 )
69
+
70
+
71
+ """ IP FINDER FOR USER """
72
+ for retry in range (10 ):
73
+ know_ip = raw_input ("\n Do you have your Wii U IP adress somewhere ? (y/n) " )
74
+ if (know_ip == 'y' or know_ip == 'Y' or know_ip == 'yes' or know_ip == 'YES' ):
75
+ wiiuip = raw_input ("Please write the Wii U Ip adress Ex :(192.168.x.x)\n " ).replace ('\n ' , '' )
76
+ f = open ('Your_Wii_U_IP.txt' , 'w' )
77
+ f .write (wiiuip )
78
+ f .close ()
79
+ break
80
+ if (know_ip == 'n' or know_ip == 'N' or know_ip == 'no' or know_ip == 'NO' ):
81
+ print "Downloading WNetwatcher...(800KB)"
82
+ urllib .urlretrieve ('http://www.nirsoft.net/utils/wnetwatcher.zip' , "wnetwatcher.zip" )
83
+ print "Please open the .exe and try to find the IP address of a Nintendo device Ex.(192.168.X.X)\n Once you found it, press enter to continue\n "
84
+ os .startfile ('wnetwatcher.zip' )
85
+ raw_input ("" )
86
+ wiiuip = raw_input ("Please write the Wii U IP adress (192.168.x.x)\n " ).replace ('\n ' , '' )
87
+ f = open ('Your_Wii_U_IP.txt' , 'w' )
88
+ f .write (wiiuip )
89
+ f .close ()
90
+ break
91
+ print "\n Choose beetween yes or no...\n "
92
+ else :
93
+ sys .exit (1 )
94
+
95
+ """ IP CHECK """
96
+ for retry in range (10 ):
97
+ with open ('Your_Wii_U_IP.txt' , 'r' ) as ipfile :
98
+ ipcheck = ipfile .read ().replace ('\n ' , '' )
99
+ ansr = raw_input ("Your console IP adress is -->" + ipcheck + "<-- Is that correct ? (y/n) " )
100
+ if (ansr == 'y' or ansr == 'Y' or ansr == 'yes' ):
101
+ break
102
+ wiiuip = raw_input ("Please write the Wii U Ip adress. Use correct format : 192.168.x.x\n " ).replace ('\n ' , '' )
103
+ f = open ('Your_Wii_U_IP.txt' , 'w' )
104
+ f .write (wiiuip )
105
+ f .close ()
106
+ else :
107
+ sys .exit (1 )
108
+
109
+
110
+ print "\n * Initialise connexion *\n "
111
+
112
+ from wupclient import wupclient
113
+ wupclient = wupclient ()
114
+
115
+ print "* If an error is displayed, your IP adress is wrong or the Wii U is not reachable *\n "
116
+ raw_input ("We are now connected to WUPServer on your Wii U, press enter when you are ready!" )
117
+
118
+
119
+ """ FLASHING REGION FREE """
120
+
121
+ PATH8 = "/vol/system_slc/config/sys_prod.xml"
122
+ wupclient .dl (PATH8 )
123
+ print "\n \n * File downloaded ! *"
124
+ from shutil import copyfile
125
+ copyfile ('sys_prod.xml' , 'sys_prod.xml.bak' )
126
+ print "* Backup created ! *"
127
+ regionfile = 'sys_prod.xml'
128
+ with open (regionfile , 'r' ) as f :
129
+ text = f .read ()
130
+ if creg == 'eur' :
131
+ text = text .replace ('>4</game_region>' , '>119</game_region>' )
132
+ if creg == 'us' :
133
+ text = text .replace ('>2</game_region>' , '>119</game_region>' )
134
+ if creg == 'jap' :
135
+ text = text .replace ('>1</game_region>' , '>119</game_region>' )
136
+ with open (regionfile , 'w' ) as f :
137
+ f .write (text )
138
+ f .close ()
139
+ print "* File edited ! *"
140
+ wupclient .up ("sys_prod.xml" , PATH8 )
141
+ wupclient .kill ()
142
+ print "* File uploaded ! *\n "
143
+ raw_input ("Press enter to continue..." )
144
+ os .system ('cls' if os .name == 'nt' else 'clear' )
145
+
146
+
147
+ """ GOODBYE """
148
+ print "******************************"
149
+ print "* Regionhax Installer v1.0 *"
150
+ print "******************************\n "
151
+ print "******************************"
152
+ print "*Your Wii U is now Region Free*"
153
+ print "******************************\n "
154
+ print "******************************"
155
+ print "* SHUTDOWN YOUR WII U *"
156
+ print "* Once program is closed *"
157
+ print "* *"
158
+ print "* *"
159
+ print "* Script by Vickdu31 *"
160
+ print "* email : [email protected] *"
161
+ print "******************************"
162
+ raw_input ("Press enter to continue..." )
163
+ os .system ('cls' if os .name == 'nt' else 'clear' )
164
+
165
+ """ CREDITS """
166
+ print "******************************"
167
+ print "* Regionhax Installer v1.0 *"
168
+ print "******************************\n "
169
+ print "**************************************"
170
+ print "* CREDITS : *"
171
+ print "**************************************\n "
172
+ print "**************************************"
173
+ print "* @NETOOBUNTU for finding this! *"
174
+ print "* @smealum for iosuhax/wupserver *"
175
+ print " Everyone contribuing to WII U HACK *"
176
+ print "**************************************"
177
+ raw_input ("Press enter to exit program..." )
178
+ sys .exit ()
0 commit comments