Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
b1gcat committed Nov 23, 2023
1 parent ab2f7d9 commit 5730933
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

```
go >= 1.21.4
MingW64 - make/x86_64-w64-mingw32-gcc[g++,ar]
MingW64 - make/x86_64-w64-mingw32-gcc[g++,gcc-ar]
Garble - https://github.com/burrowers/garble
```

## 预览

<img width="644" alt="图片" src="https://github.com/b1gcat/anti-av/assets/15025254/f9c1174c-9120-4f19-a586-5445619d4715">

<img width="647" alt="图片" src="https://github.com/b1gcat/anti-av/assets/15025254/4603e148-e831-43d8-8e6f-1976b2dcbfec">
Expand Down
20 changes: 13 additions & 7 deletions apps/ui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ func (c *Config) appRun() {
dialog.ShowError(err, win)
return
}

if reader == nil {
return
}
defer reader.Close()

file := reader.URI().Path()
Expand All @@ -101,9 +105,11 @@ func (c *Config) appRun() {
if runtime.GOOS == "windows" {
suffix = ".exe"
}
path, _ := os.Executable()
path = filepath.Join(filepath.Dir(path))
avDirSrv := filepath.Join(path, "anti-av")
runPath, _ := os.Executable()
runPath = filepath.Join(filepath.Dir(runPath))
cache := filepath.Join(runPath, "cache")
os.Mkdir(cache, 0755)
avDirSrv := filepath.Join(cache, "anti-av")
avDirSrvAppAv := filepath.Join(avDirSrv, "apps", "av")
avSrv := "git clone https://github.com/b1gcat/anti-av.git"
avDirOut := filepath.Join(avDirSrv, "dist")
Expand Down Expand Up @@ -175,11 +181,11 @@ func (c *Config) appRun() {
}
}
if selectEntry.Text == "远程加载" {
os.Rename(filepath.Join(avDirOut, "payload.raw"), filepath.Join(path, "payload.raw"))
logrus.Infof("输出文件: %s", filepath.Join(path, "payload.raw"))
os.Rename(filepath.Join(avDirOut, "payload.raw"), filepath.Join(runPath, "payload.raw"))
logrus.Infof("输出文件: %s", filepath.Join(runPath, "payload.raw"))
}
os.Rename(filepath.Join(avDirOut, output), filepath.Join(path, output))
logrus.Infof("输出文件: %s", filepath.Join(path, output))
os.Rename(filepath.Join(avDirOut, output), filepath.Join(runPath, output))
logrus.Infof("输出文件: %s", filepath.Join(runPath, output))
os.RemoveAll(avDirOut)
logrus.Info("完成")
}
Expand Down

0 comments on commit 5730933

Please sign in to comment.