摘要: 日志记录函数实现 如 log.c #include <syslog.h> #include "log.h" int g_log_level = LOG_INFO; /** * @Desc: 日志记录函数,不要直接调用 * * @log_level: 日志等级 * @fmt: 打印格式 */ void 阅读全文
posted @ 2022-05-15 23:26 shelmean 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 环境准备 Ubuntu 16.04.05 x64 Windows10 搭建步骤 安装sambad sudo apt-get install samba samba-common 创建samba用户和密码 此处使用 Linux 账号和密码作为 samba 的账号和密码。Linux 账号为 shelme 阅读全文
posted @ 2022-04-16 18:31 shelmean 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 概念 export 命令用于设置或显示环境变量,将 shell 变量输出为环境变量,或者将 shell 函数输出为环境变量。 一个 shell 变量创建时,它不会自动地为在它之后创建的 shell 进程所知。而命令 export 可以向后面的 shell 传递变量的值,即创建环境变量。 语法 exp 阅读全文
posted @ 2022-04-16 12:42 shelmean 阅读(2149) 评论(0) 推荐(0) 编辑
摘要: gcc编译 gcc hello.c -o hello hello.c 预处理——>hello.i 编译——>hello.s 汇编——>hello.o 链接——>hello 示例 hello.c #include<stdio.h> #define TEST_STRING "hello world!" 阅读全文
posted @ 2022-04-05 18:47 shelmean 阅读(47) 评论(0) 推荐(0) 编辑
摘要: C语言数组名 一维数组名 在 C 语言中,几乎所有使用数组的表达式中,数组名的值就是一个指针常量,不能作为左值。它是数组第一个元素的地址,它的类型取决于数组元素的类型。 #include <stdio.h> int main(int argc, char *argv[]) { int array[3 阅读全文
posted @ 2022-04-05 17:57 shelmean 阅读(1056) 评论(0) 推荐(0) 编辑
摘要: 套接字 套接字(socket)是一种通信机制,就是对网络中不同主机上的应用进程之间进行双向通信的端点的抽象。一个套接字就是网络上进程通信的一端,提供了应用层进程利用网络协议交换数据的机制。从所处的地位来讲,套接字上联应用进程,下联网络协议栈,是应用程序通过网络协议进行通信的接口,是应用程序与网络协议 阅读全文
posted @ 2022-04-05 15:44 shelmean 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Checksum 概念 检验和 (checksum),在数据处理和数据通信领域中,用于 校验目的 的一组数据项的和,用来校验数据的完整性和准确性。 一般的checksum计算方法 把要计算checksum的数据内容分成以每两个字节为一组的分组。如果最后剩余单个字节,补一个内容为0的字节。 如数据:h 阅读全文
posted @ 2022-04-02 13:36 shelmean 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 实验准备 准备一台路由器、可以设置为混杂模式的无线网卡和kali linux 本次实验破解的WiFi基本信息如下: 获取当前环境Wi-Fi 1. 查看当前无线网卡工作模式 iwconfig wlan0 如: ┌──(shelmean㉿kali)-[~] └─$ iwconfig wlan0 wlan 阅读全文
posted @ 2021-04-12 20:34 shelmean 阅读(1937) 评论(4) 推荐(0) 编辑
摘要: 什么是RC4 ? RC4加密算法是大名鼎鼎的RSA三人组中的头号人物Ron Rivest在1987年设计的密钥长度可变的流加密算法簇,之所以称其为簇,是由于其核心部分的S-box长度可为任意,但一般为256字节。 在密码学中,RC4(来自Rivest Cipher 4的缩写)是一种流加密算法,密钥长 阅读全文
posted @ 2021-01-15 11:47 shelmean 阅读(10054) 评论(0) 推荐(0) 编辑
摘要: ip地址结构 struct sockaddr_in { sa_family_t sin_family; /* address family: AF_INET */ in_port_t sin_port; /* port in network byte order */ struct in_addr 阅读全文
posted @ 2018-12-02 21:01 shelmean 阅读(1977) 评论(0) 推荐(0) 编辑