上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 123 下一页
摘要: 摘自:https://www.cnblogs.com/fjping0606/p/4573536.html 一 、IFS的介绍 Shell 脚本中有个变量叫IFS(Internal Field Seprator) ,内部域分隔符。完整定义是The shell uses the value stored 阅读全文
posted @ 2020-03-26 21:12 LiuYanYGZ 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 摘自:https://blog.csdn.net/peterxiaoq/article/details/77247547 shell中for循环的默认分隔符是:空格、tab、\n 需求是只以\n作为分隔符 shell for循环以\n作为分割符, 方式一: 文件aa.sh #!/bin/bash I 阅读全文
posted @ 2020-03-26 21:06 LiuYanYGZ 阅读(2493) 评论(0) 推荐(0) 编辑
摘要: 有这么一个数:十进制的6789(没错就是六千七百八十九) BCD就是这么存的,用4bit表示十进制的一个位,所以个十百千,一共用了16bit,也就是计算机中的两个字节。 千 百 十 个 十进制 6 7 8 9 BCD 0110 0111 1000 1001 阅读全文
posted @ 2020-03-24 19:21 LiuYanYGZ 阅读(515) 评论(0) 推荐(0) 编辑
摘要: 本机login登陆日志可以直接使用printf输出到终端上,然后无论ssh登陆在登陆成功之前是无法将日志显示在终端上的,而直接fopen一个文件却返回失败,因此需要一种记录日志的机制。 1.说明 普通用户进程、Pam模块可以使用syslog记录日志。 普通用户进程默认输出到LOG_USER终端,可以 阅读全文
posted @ 2020-03-24 10:38 LiuYanYGZ 阅读(1546) 评论(0) 推荐(0) 编辑
摘要: 摘自:https://www.cnblogs.com/cocoajin/p/6121706.html openssl evp 对称加密(AES_ecb,ccb) evp.h 封装了openssl常用密码学工具,以下主要说对称加密的接口 1. 如下使用 aes_256_ecb 模式的加密解密测试代码 阅读全文
posted @ 2020-03-23 22:07 LiuYanYGZ 阅读(1144) 评论(0) 推荐(0) 编辑
摘要: 摘自:https://www.xuebuyuan.com/2145079.html const EVP_CIPHER *cipher; unsigned char key[24],iv[8],in[100],out[108],de[100]; int i,len,inl,outl,total=0; 阅读全文
posted @ 2020-03-23 21:33 LiuYanYGZ 阅读(1955) 评论(0) 推荐(0) 编辑
摘要: 摘自:https://blog.csdn.net/secsky/article/details/60958368 一、syslog协议介绍 1、介绍 在Unix类操作系统上,rsyslog广泛应用于系统日志。rsyslog日志消息既可以记录在本地文件中,也可以通过网络发送到接收syslog的服务器。 阅读全文
posted @ 2020-03-23 18:14 LiuYanYGZ 阅读(1921) 评论(0) 推荐(0) 编辑
摘要: 问:自定义pam模块,直接调用void syslog(int priority, const char *format, ...);日志写到哪里去了? 答:写到文件var/log/secure里去了 日志查看方式: tail -f var/log/secure 默认使用配置: /etc/rsyslo 阅读全文
posted @ 2020-03-23 18:08 LiuYanYGZ 阅读(853) 评论(0) 推荐(0) 编辑
摘要: 摘自:https://www.cnblogs.com/yuguangyuan/p/9439225.html popen可以是系统命令,也可以是自己写的程序a.out。 假如a.out就是打印 “hello world“ 在代码中,想获取什么,都可以通过popen获取。 比如获取ls的信息, 比如获取 阅读全文
posted @ 2020-03-21 18:35 LiuYanYGZ 阅读(390) 评论(0) 推荐(0) 编辑
摘要: #include <string.h> #include <openssl/rsa.h> #include <openssl/pem.h> #include <openssl/err.h> #include <openssl/sha.h> #include <openssl/crypto.h> /* 阅读全文
posted @ 2020-03-21 18:26 LiuYanYGZ 阅读(1785) 评论(0) 推荐(0) 编辑
上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 123 下一页