![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
基础
guoguangwu
这个作者很懒,什么都没留下…
展开
-
error: Error 1062 (23000): Duplicate entry
error: Error 1062 (23000): Duplicate entry, golang中的错误处理原创 2023-02-27 11:19:01 · 921 阅读 · 0 评论 -
golang删除镜像
删除none或者没有镜像名的镜像,如果镜像被停止的容器引用,删除容器后删除镜像原创 2023-02-20 18:05:58 · 211 阅读 · 0 评论 -
trivy os软件包扫描原理分析
trivy os软件包扫描原理分析原创 2023-02-15 10:41:43 · 809 阅读 · 0 评论 -
golang 往h2non/filetype中添加clamav病毒库类型
golang 往h2non/filetype中添加clamav病毒库类型原创 2023-01-09 18:35:41 · 225 阅读 · 0 评论 -
golang context 内存大小
golang context 内存大小原创 2022-10-31 14:59:16 · 360 阅读 · 0 评论 -
golang的es bool查询
es bool 查询原创 2022-10-18 09:31:09 · 728 阅读 · 0 评论 -
golang 正则表达式 ipv4 ipv6 域名
golang 正则表达式 ipv4 ipv6 域名原创 2022-10-12 17:05:49 · 795 阅读 · 0 评论 -
netlink套接字
netlink套接字原创 2022-10-08 21:05:37 · 861 阅读 · 0 评论 -
go线程安全哈希表concurrent-map
map的key只能是string原创 2022-09-18 11:37:05 · 1348 阅读 · 0 评论 -
golang sync.map key不可以是指针
golang sync.map key不可以是指针原创 2022-09-16 09:30:00 · 395 阅读 · 2 评论 -
skopeo login error
level=fatal msg="authenticating creds for \"192.168.100.94:1443\": pinging container registry 192.168.100.94:1443: 400 Bad Request"原创 2022-09-15 09:14:24 · 307 阅读 · 0 评论 -
golang运行期间重新加载环境变量
golang运行期间重新加载环境变量原创 2022-08-16 22:26:34 · 1017 阅读 · 0 评论 -
golang 用户名密码认证docker,并推送镜像至仓库
golang 用户名密码认证docker,并推送镜像至仓库原创 2022-08-09 22:04:41 · 419 阅读 · 0 评论 -
golang 判断磁盘使用率
golang 判断磁盘使用率原创 2022-08-08 15:18:19 · 594 阅读 · 0 评论 -
go 获取文件类型
go 获取文件类型原创 2022-08-03 11:39:04 · 838 阅读 · 0 评论 -
/root/GOPATH/pkg/mod/github.com/docker/libnetwork@v0.5.6/osl/namespace_linux.go:13:2: case-insensiti
case-insensitive import collision: "github.com/Sirupsen/logrus" and "github.com/sirupsen/logrus"原创 2022-08-01 09:56:14 · 610 阅读 · 0 评论 -
golang 调用 re2
golang 调用 re2原创 2022-07-02 18:31:40 · 376 阅读 · 0 评论 -
Makefile.am:16: error: ‘nodist_pkgconfig_DATA‘ is used but ‘pkgconfigdir‘ is undefined
编译cre2报错原创 2022-07-02 15:56:32 · 633 阅读 · 0 评论 -
go 调用c++报错
In file included from ./main.go:5:0:/usr/include/re2/re2.h:184:10: fatal error: algorithm: No such file or directory #include ^~~~~~~~~~~compilation terminated.原创 2022-06-30 21:37:30 · 1132 阅读 · 0 评论 -
re2 多模式使用例子
re2 多模式使用例子原创 2022-06-22 21:48:13 · 343 阅读 · 0 评论 -
linux mlock 不生效
linux mlock 不生效原创 2022-06-18 15:21:38 · 624 阅读 · 0 评论 -
hyperscan cmake .. 报错
hyperscan cmake .. 报错原创 2022-06-15 20:42:22 · 718 阅读 · 0 评论 -
bcc 源码编译
bcc 源码编译原创 2022-06-14 22:56:11 · 1942 阅读 · 0 评论 -
elfutils-0.178 configure 报错
checking for libmicrohttpd... nochecking for libcurl... nochecking for sqlite3... nochecking for libarchive... noconfigure: error: C++ compiler or dependencies not found, use --disable-debuginfod to disable.原创 2022-06-14 21:41:11 · 1426 阅读 · 2 评论 -
sync.Map 读更新同步,无竞争
存在竞争条件:package mainimport ( "log" "sync")func main() { SynTest()}func SynTest() { var m sync.Map m.Store("count", 0) var wg sync.WaitGroup for numOfThread := 0; numOfThread < 10; numOfThread++ { wg.Add(1) go func() { defer wg.原创 2022-05-09 18:44:08 · 228 阅读 · 0 评论 -
Command ‘pip‘ not found, but can be installed with:
pip install -r requirements.txt报错:Command 'pip' not found, but can be installed with:apt install python-pip目前使用的是python3,如果直接执行上面命令会安装python2.7的东西,结果还是不可用# apt install python-pipReading package lists... DoneBuilding dependency treeReading state.原创 2022-05-09 14:45:51 · 6313 阅读 · 0 评论 -
Git: gnutls_handshake() failed: Error in the pull function
apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev安装 docker-impala时,执行git clone https://github.com/codingtony/docker-impala.git报了Git: gnutls_handshake() failed: Error in the pull function错误。执行上面的命令完成下载。然后依次执行cd docker-impal..原创 2022-03-14 11:18:10 · 1332 阅读 · 0 评论 -
sslsniff编译错误
st::asio::ip::tcp::socket&, boost::asio::ip::tcp::endpoint&)’:util/Destination.cpp:49:25: error: ‘boost::asio::ip::tcp::socket’ {aka ‘class boost::asio::basic_stream_socket<boost::asio::ip::tcp>’} has no member named ‘native’参考boost::asi.原创 2021-11-30 14:24:55 · 2947 阅读 · 0 评论 -
Linux 移位溢出
#include <stdio.h>#include <stdlib.h>int main(int argc , char *argv[]){ if(argc != 2) { printf("./a.out 100"); return 0; } long long int lli = 0; int att_id = atoi(argv[1]); lli = 1L << att_id; printf("lli :%llx, %lld\n".原创 2021-07-21 16:52:52 · 128 阅读 · 0 评论 -
js 获取 tr的属性
<tr index="2" value="-1222" add_method="1" mod_state="1" operate_type="0"><td style="word-break: break-all; width: 125px; color: rgb(0, 128, 0);" value="test80" showwidth="125px" class=" editable"> test80 </td>...</tr>.原创 2021-04-20 11:18:38 · 2577 阅读 · 0 评论 -
tcprewrite 修改源IP
tcprewrite --srcipmap=10.121.215.248/32:10.121.50.146/32 -i http_03.pcapng -o http_03.pcap将src ip 10.121.215.248地址改成10.121.50.146注意事项:一定要指定为32位掩码,否则会修改不成功。例如:tcprewrite --srcipmap=10.121.215.248/24:10.121.50.146/24 -i http_03.pcapng -o http_03...原创 2021-04-12 17:34:39 · 2991 阅读 · 0 评论 -
windows7 Ubuntu 16.04.6 smb共享 (遇到的问题)
今天打算编译内核,然后调试理解协议栈的原理和代码,通过source insight 阅读代码,如果在Windows下创建工程,代码linux目录下,这个时候需要共享目录来使用ubuntu下的代码建立工程。这样就不要将代码再拷贝到ubuntu的/usr/src/linux下面编译了。可以直接编译。共享方式采用smb服务。参照网上smb的搭建方式来操作。系统起来,在Windows文件夹下面访问smb服务,发现访问不到,原来是新加的用户没有启用,执行sudo smbpasswd -e username 就原创 2020-11-28 22:36:44 · 817 阅读 · 0 评论 -
Linux c 程序打印堆栈方法及注意事项
通过调用backtrace和backtrace_symbols可以打印出当前的调用堆栈.以下是代码例子,参照gnu Backtraces 文档#include <execinfo.h>#include <stdio.h>#include <stdlib.h>/* Obtain a backtrace and print it to stdout. */voidprint_trace (void){ void *array[10]; char原创 2020-11-23 21:26:15 · 1765 阅读 · 3 评论 -
strftime时间格式化与逆操作strptime
#include<stdio.h>#include<string.h>#include<time.h>int main(){ time_t rawtime, rt2; struct tm *timeinfo, tm2; char timE[80]; time(&rawtime); timeinfo=localtime(&rawtime); long len = 0; len = strftime(timE,80,"%Y%m%d:%.原创 2020-09-12 15:23:37 · 428 阅读 · 0 评论 -
curl 命令行创建目录和检查目录是否存在 (ftp/ftps)
创建目录curl -u -u admin:123456 --ftp-ssl -k ftp://10.121.215.220 -Q "MKD this_is_a_test"curl -u admin:123456 ftp://10.121.215.218 -Q "MKD FTP"curl --ftp-ssl -u admin:123456 -k ftp://10.121.215.220 -Q "MKD this_is_a_test"检查目录是否存在curl -u admin:123..原创 2020-09-02 20:57:16 · 3200 阅读 · 0 评论 -
libcurl 在ftp/ftps服务器上面创建目录
#include <iostream>#include <string.h>#include <curl/curl.h>int main(){ char temp[2000]; struct curl_slist *headerlist=NULL; CURL *curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "ftp://admin:123456@192.168.1.150");.原创 2020-09-02 19:12:51 · 1658 阅读 · 11 评论 -
libcurl检测FTP/FTPS服务器是否存在某个目录
#include <iostream>#include <curl/curl.h>int main(){ CURL *curl = curl_easy_init(); /* FTP_DIR 为对应的目录 */ curl_easy_setopt(curl, CURLOPT_URL, "ftp://admin:123456@192.168.0.150/FTP_DIR"); curl_easy_setopt(curl, CURLOPT_NOBODY, 1L); c.原创 2020-09-02 18:59:11 · 717 阅读 · 0 评论 -
gdb 查看全局变量字符数组 (编译时不带-g)
#include <stdio.h>#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>char g_file_name[100] = "this is a test";char * g_str_ptr = "this is a test"; int main(){ char file_name[100] = "stat_test.c"; struct stat s.原创 2020-08-18 09:55:38 · 827 阅读 · 0 评论 -
ubsan gcc -fsanitize=undefined 检测栈溢出
The Undefined Behavior Sanitizer - UBSANUBSAN is a runtime undefined behaviour checker.UBSAN uses compile-time instrumentation to catch undefined behavior (UB). Compiler inserts code that perform certain kinds of checks before operations that may cause原创 2020-06-23 20:46:12 · 2721 阅读 · 0 评论 -
snprintf printf %02d 是假的
#include <stdio.h>int main(){ int ret = 0; char c[10] ={}; ret = snprintf(c, 10, "wwwwwwwwwwwwww"); printf("%s, %d\n", c, ret); int id = 0; sscanf("4444", "%d", &id); printf("id :%2d\n", id); return 0;}结...原创 2020-05-21 14:25:06 · 451 阅读 · 0 评论