Skip to content

nibazshab/pastebin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pastebin

粘贴板,生成一个纯文本、图片网页,限制大小 < 5 mb

使用说明

默认监听 10002 端口,数据以文件的形式明文储存在 pastebin 文件同目录的 tmp 目录下(需要自己手动创建)

  1. 编译 main.go
  2. 创建 tmp 目录
  3. 运行程序 ./pastebin

编译步骤

git clone https://github.com/nibazshab/pastebin.git
cd pastebin
CGO_ENABLED=0 go build -ldflags="-s -w"

API

POST /

参数:f 文件

返回存储了数据内容的链接

GET /{uid}

返回该链接所对应的文本内容/图片

计划

  • 响应 dmesg | curl -F "f=@-" host 形式的请求

开源地址

https://github.com/nibazshab/pastebin

许可证

MIT © ZShab Niba

About

pastebin / 粘贴板

Resources

License

Stars

Watchers

Forks