Skip to content

Commit

Permalink
🎉 First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
OhYee committed Nov 28, 2019
1 parent 3a39529 commit 0b9ab2f
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

bin
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
# kgm_cracker
cracker for kgm-pro

[中文文档](README_CN.md)

[KGM-PRO NCM音乐转换器](https://www.yinyuezhushou.com/kgm?from=1)

## DISCLAIMER

Only for learning related technology, do not use for illegal purposes (this software can download without limits via the proxy)

## Usage

![how_to_use](img/how_to_use.gif)

1. Open the cracker
2. Add `127.0.0.1 yinyuezhushou.com` to your hosts file (`C:\\Windows\\System32\\drivers\\etc\\hosts`)
3. Click **点击激活**
4. Random input some numbers
5. Click **激活**

## Compile

```bash
go generate
```
26 changes: 26 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# kgm_cracker
KGM-PRO破解器

[English document](README.md)

[KGM-PRO NCM音乐转换器](https://www.yinyuezhushou.com/kgm?from=1)

## 免责声明

仅用于学习相关技术,请勿用于非法用途(这个软件可以通过代理很轻松的符合规定无限下载)

## 使用说明

![how_to_use](img/how_to_use.gif)

1. 打开破解器
2. 向hosts文件(`C:\\Windows\\System32\\drivers\\etc\\hosts`)中添加 `127.0.0.1 yinyuezhushou.com`
3. 点击 **点击激活**
4. 随便输入几个数
5. 点击 **激活**

## 自己编译

```bash
go generate
```
Binary file added img/how_to_use.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions kgm_cracker.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package main

import (
"fmt"
"net/http"
"os/exec"
"runtime"
)

// CGO_ENABLED: 0
// GOOS: darwin、freebsd、linux、windows
// GOARCH: 386、amd64、arm
//
//-go:generate bash -c "CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/kgm_cracker kgm_cracker.go"
//go:generate bash -c "CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o bin/kgm_cracker.exe kgm_cracker.go"
//go:generate bash -c "CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -o bin/kgm_cracker_x86.exe kgm_cracker.go"

type Handler struct {
}

func (h Handler) ServeHTTP(rep http.ResponseWriter, req *http.Request) {
fmt.Printf("收到验证请求,已返回成功激活数据\n")
rep.Write([]byte("{\"code\":0,\"message\":\"破解成功\"}"))
}

func main() {
var handler Handler
fmt.Printf("Please add\n\t127.0.0.1 yinyuezhushou.com\nto your hosts file (C:\\Windows\\System32\\drivers\\etc\\hosts)\n\n\n")

switch runtime.GOOS {
case "windows":
exec.Command("explorer.exe", "C:\\Windows\\System32\\drivers\\etc\\").Run()
default:
fmt.Printf("Maybe you should run on Windows\n")
}

err := http.ListenAndServe("127.0.0.1:8008", handler)
if err != nil {
panic(err)
}
}

0 comments on commit 0b9ab2f

Please sign in to comment.