Linux
文章平均质量分 55
miaow~miaow
miaow...
展开
-
Linux: 创建加密虚拟磁盘 cryptsetup
一、安装工具cryptsetupsudo yum install cryptsetup# Ubuntu 系统执行如下命令# sudo apt-get install cryptsetup二、创建一个虚拟磁盘文件dd if=/dev/zero of=secDisk bs=1G count=10这个命令的意思就是从“黑洞”文件读取0数据,写入当前目录中的 secDisk 文件中。写入的数据大小是 1G * 10 个,也就是10G。所以这个命令会创建一个10G 大的虚拟磁盘文件...原创 2022-01-20 11:00:13 · 2339 阅读 · 0 评论 -
SQLite3:对SQLite3加密
发现两款不错的开源加密工具:sqleet和SQLite3MultipleCiphers原创 2021-06-18 16:43:50 · 10721 阅读 · 1 评论 -
Linux:切换当前进程的权限
一、函数用于切换jiint getpwnam_r(const char *name, struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result);int setgid(gid_t gid);int setgid(gid_t gid);原创 2021-06-11 18:11:31 · 623 阅读 · 1 评论 -
Nginx:CentOS7安装 htpasswd 并对明文密码进行加密
一、查看htpasswd 所在的软件包$ whereis htpasswd # 查看 htpasswd 命令的位置htpasswd: /usr/bin/htpasswd /usr/share/man/man1/htpasswd.1.gz$ rpm -qf /usr/bin/htpasswd # 查看 htpasswd 命令所在的软件包httpd-tools-2.4.37-30.module_el8.3.0+561+97fdbbcc.x86_64二、安装htpasswd$ yum ..原创 2021-03-27 11:07:51 · 1780 阅读 · 1 评论 -
curl 添加 HTTP 基础认证信息
# --user 和 -u 等价$ curl -u username:password http://www.abc.com# 如果没有制定密码,那就动态需要手动输入密码$ curl -u username http://www.abc.comEnter host password for user 'username':原创 2021-03-26 00:29:36 · 1111 阅读 · 0 评论