base on ✨Spark is a web-based, cross-platform and full-featured Remote Administration Tool (RAT) written in Go that allows you control all your devices anywhere. Spark是一个Go编写的,网页UI、跨平台以及多功能的远程控制和监控工具,你可以随时随地监控和控制所有设备。 #### [English] [[中文]](./README.ZH.md) [[API Document]](./API.md) [[API文档]](./API.ZH.md)
---
<h1 align="center">Spark</h1>
**Spark** is a free, safe, open-source, web-based, cross-platform and full-featured RAT (Remote Administration Tool)
that allow you to control all your devices via browser anywhere.
We **won't** collect any data, thus the server will never self-upgrade. Your clients will only communicate with your
server forever.
---
<div align="center">
|![GitHub repo size](https://img.shields.io/github/repo-size/DGP-Studio/Snap.Genshin?style=flat-square)|![GitHub issues](https://img.shields.io/github/issues/XZB-1248/Spark?style=flat-square)|![GitHub closed issues](https://img.shields.io/github/issues-closed/XZB-1248/Spark?style=flat-square)|
|-|-|-|
|[![GitHub downloads](https://img.shields.io/github/downloads/XZB-1248/Spark/total?style=flat-square)](https://github.com/XZB-1248/Spark/releases)|[![GitHub release (latest by date)](https://img.shields.io/github/downloads/XZB-1248/Spark/latest/total?style=flat-square)](https://github.com/XZB-1248/Spark/releases/latest)|
|-|-|
</div>
---
## Disclaimer
**THIS PROJECT, ITS SOURCE CODE, AND ITS RELEASES SHOULD ONLY BE USED FOR EDUCATIONAL PURPOSES.**
<br />
**ALL ILLEGAL USAGE IS PROHIBITED!**
<br />
**YOU SHALL USE THIS PROJECT AT YOUR OWN RISK.**
<br />
**THE AUTHORS AND DEVELOPERS ARE NOT RESPONSIBLE FOR ANY DAMAGE CAUSED BY YOUR MISUSE OF THIS PROJECT.**
**YOUR DATA IS PRICELESS. THINK TWICE BEFORE YOU CLICK ANY BUTTON OR ENTER ANY COMMAND.**
If you found any security vulnerability, please **DO NOT** open an issue and immediately contact me via [**email**](mailto:
[email protected]).
---
## Quick start
### binary
* Download executable from [releases](https://github.com/XZB-1248/Spark/releases).
* Following [this](#Configuration) to complete configuration.
* Run executable and browse to `http://IP:Port` to access the web interface.
* Generate a client and run it on your target device.
* Enjoy!
---
## Configuration
Configuration file `config.json` should be placed in the same directory as the executable file.
<br />
Example:
```json
{
"listen": ":8000",
"salt": "123456abcdef",
"auth": {
"username": "password"
},
"log": {
"level": "info",
"path": "./logs",
"days": 7
}
}
```
* `listen` `required`, format: `IP:Port`
* `salt` `required`, length <= 24
* after modification, you need to re-generate all clients
* `auth` `optional`, format: `username:password`
* hashed-password is highly recommended
* format: `$algorithm$hashed-password`, example: `$sha256$11223344556677AABBCCDDEEFF`
* supported algorithms: `sha256`, `sha512`, `bcrypt`
* if you don't follow the format, password will be treated as plain-text
* `log` `optional`
* `level` `optional`, possible value: `disable`, `fatal`, `error`, `warn`, `info`, `debug`
* `path` `optional`, default: `./logs`
* `days` `optional`, default: `7`
---
## Features
| Feature/OS | Windows | Linux | MacOS |
|-----------------|---------|-------|-------|
| Process manager | ✔ | ✔ | ✔ |
| Kill process | ✔ | ✔ | ✔ |
| Network traffic | ✔ | ✔ | ✔ |
| File explorer | ✔ | ✔ | ✔ |
| File transfer | ✔ | ✔ | ✔ |
| File editor | ✔ | ✔ | ✔ |
| Delete file | ✔ | ✔ | ✔ |
| Code highlight | ✔ | ✔ | ✔ |
| Desktop monitor | ✔ | ✔ | ✔ |
| Screenshot | ✔ | ✔ | ✔ |
| OS info | ✔ | ✔ | ✔ |
| Terminal | ✔ | ✔ | ✔ |
| * Shutdown | ✔ | ✔ | ✔ |
| * Reboot | ✔ | ✔ | ✔ |
| * Log off | ✔ | ❌ | ✔ |
| * Sleep | ✔ | ❌ | ✔ |
| * Hibernate | ✔ | ❌ | ❌ |
| * Lock screen | ✔ | ❌ | ❌ |
* Blank cell means the situation is not tested yet.
* The Star symbol means the function may need administration or root privilege.
---
## Screenshots
![overview](./docs/overview.png)
![terminal](./docs/terminal.png)
![desktop](./docs/desktop.png)
![procmgr](./docs/procmgr.png)
![explorer](./docs/explorer.png)
![overview.cpu](./docs/overview.cpu.png)
![explorer.editor](./docs/explorer.editor.png)
---
## Development
### note
There are three components in this project, so you have to build them all.
Go to [Quick start](#quick-start) if you don't want to make yourself boring.
* Client
* Server
* Front-end
If you want to make client support OS except linux and windows, you should install some additional C compiler.
For example, to support android, you have to install [Android NDK](https://developer.android.com/ndk/downloads).
### tutorial
```bash
# Clone this repository.
$ git clone https://github.com/XZB-1248/Spark
$ cd ./Spark
# Here we're going to build front-end pages.
$ cd ./web
# Install all dependencies and build.
$ npm install
$ npm run build-prod
# Embed all static resources into one single file by using statik.
$ cd ..
$ go install github.com/rakyll/statik
$ statik -m -src="./web/dist" -f -dest="./server/embed" -p web -ns web
# Now we should build client.
# When you're using unix-like OS, you can use this.
$ mkdir ./built
$ go mod tidy
$ go mod download
$ ./scripts/build.client.sh
# Finally we're compiling the server side.
$ mkdir ./releases
$ ./scripts/build.server.sh
```
Then create a new directory with a name you like.
<br />
Copy executable file inside `releases` to that directory.
<br />
Copy the whole `built` directory to that new directory.
<br />
Copy configuration file mentioned above to that new directory.
<br />
Finally, run the executable file in that directory.
---
## Custom Features
If you need to customize some features, please contact me via [**
[email protected]**](mailto:
[email protected]).
---
## Dependencies
Spark contains many third-party open-source projects.
Lists of dependencies can be found at `go.mod` and `package.json`.
Some major dependencies are listed below.
### Back-end
* [Go](https://github.com/golang/go) ([License](https://github.com/golang/go/blob/master/LICENSE))
* [gin-gonic/gin](https://github.com/gin-gonic/gin) (MIT License)
* [imroc/req](https://github.com/imroc/req) (MIT License)
* [kbinani/screenshot](https://github.com/kbinani/screenshot) (MIT License)
* [shirou/gopsutil](https://github.com/shirou/gopsutil) ([License](https://github.com/shirou/gopsutil/blob/master/LICENSE))
* [gorilla/websocket](https://github.com/gorilla/websocket) (BSD-2-Clause License)
* [orcaman/concurrent-map](https://github.com/orcaman/concurrent-map) (MIT License)
### Front-end
* [React](https://github.com/facebook/react) (MIT License)
* [Ant-Design](https://github.com/ant-design/ant-design) (MIT License)
* [axios](https://github.com/axios/axios) (MIT License)
* [xterm.js](https://github.com/xtermjs/xterm.js) (MIT License)
* [crypto-js](https://github.com/brix/crypto-js) (MIT License)
### Acknowledgements
* [natpass](https://github.com/lwch/natpass) (MIT License)
* Image difference algorithm inspired by natpass.
---
### Stargazers over time
[![Stargazers over time](https://starchart.cc/XZB-1248/Spark.svg)](https://starchart.cc/XZB-1248/Spark)
---
## License
[BSD-2 License](./LICENSE)", Assign "at most 3 tags" to the expected json: {"id":"1828","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"