Lorlike's Blog
About
Tags
Categories
Hello World
Go使用viper编写配置文件
Go日志logrus
Go令牌jwt
Go文件嵌入embed
Go WEB开发框架gin
Buuctf练习场pwn题
wsl环境搭建
wsl环境搭建
wsl环境搭建我的环境参数Windows 11 家庭中文版 23H2 任务管理器 -> 性能 -> CPU -> 虚拟化:已启用 更新时间:2026年3月10日 打开WSL功能打开设置Win+S快捷键 系统->可选功能->更多Windows功能 勾选3项 按提示重启电脑 配置WSL打开 更新WSLwsl --update 查看版本信息wsl --version 设 ...
2026-04-16
Buuctf练习场pwn题
Buuctf pwn练习[TOC] buu资源文件,特别是libc文件 test_your_nc连上直接拿shell rip明显的危险函数gets,栈溢出,写入的地址在rbp前15字节里,另外还发现一个后门函数fun 看一下保护全关 先打一下试试 from pwn import *context.gdb_binary='pwndbg'context.arch=' ...
2026-03-31
Go WEB开发框架gin
安装go get github.com/gin-gonic/gin 路由HTTP方法常用的GET,POST,PUT,DELETE都支持,还支持一些不常用的方法 package mainimport ( "net/http" "github.com/gin-gonic/gin")func getting(c *gin.Context) { //使用 ...
2026-03-24
Go文件嵌入embed
作用go:embed可以把文件打包到二进制文件中,通过读取内存的方式获取内容 嵌入单文件│ hello.txt│ main.go 上面是目录结构 package mainimport ( _ "embed" "fmt")//go:embed hello.txtvar s stringfunc main() { fmt.Println(s) ...
2026-03-24
Go令牌jwt
前言jwt是一种用于用户认证的数字签名解决方案,形式为header.payload.signature,数据用base64进行编码,signature是把前面的数据与密钥结合进行计算hash的结果,下面是一种hash算法计算signature的方式 HMACSHA256( base64UrlEncode(header) + "." + base64UrlEncode ...
2026-03-24
Go日志logrus
安装go get github.com/sirupsen/logrus 使用package mainimport ( "github.com/sirupsen/logrus")func main() { logrus.SetLevel(logrus.TraceLevel) logrus.Trace("trace msg") logrus. ...
2026-03-24
Go使用viper编写配置文件
安装go get github.com/spf13/viper 读取配置文件支持JSON、TOML、YAML、HCL、envfile和Java properties格式 │ main.go └─config config.go config.yml 比如我的目录像上面那样 # config.ymlapp: # 应用基本配置 env: local # 环境名称 ...
2026-03-24
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick ...
2026-03-24