一些二进制学习笔记和题目WP
base家族编码包含多种编码方式,每种都有不同的特点,本篇文章从初学的角度学习一下base家族编码。base家族编码是较为基础的加密算法,需要掌握;一、base16编码base16编码也称为十六进制编码或Hex编码,是一种将二进制数据表示为十六进制数字和字符的方法。它使用16个字符(0-9和A-F)来表示4位二进制数的每个组合。(1)编码原理:由于4bit就可以表示2^4 = 16个字符。所以用4bit可以表示所有的十六进制数。1byte=8bit 所以1byte = 俩个十六进制数据。这里就涉及一个字节序的问题:是用大端模式还是小端模式?Base16编码明确表明是用小端模式存储。(2)编码过程:1.将二进制数据分割为4个一组2.映射,将每四位二进制数据映射到对应的base16字符。如下:0000 -> 0 0001 -> 1 0010 -> 2 0011 -> 3 0100 -> 4 0101 -> 5 0110 -> 6 0111 -> 7 1000 -> 8 1001 -> 9 1010 -> A 1011 -&g
base64一、什么是Base64Base64是一种基于64个可打印字符来表示二进制数据的表示方法。由于2^6=64,所以每6个比特为一个单元,对应某个可打印字符。3个字节有24个比特,对应于4个Base64单元,即3个字节可由4个可打印字符来表示。在Base64中的可打印字符包括字母A-Z、a-z、数字0-9,这样共有62个字符,此外两个可打印符号在不同的系统中而不同。二、python中的base64模块base64模块实际上调用的是binascii模块Base64模块真正用得上的方法只有8个,分别是:encode, decode为一组, 专门用来编码和解码文件的, 也可以对StringIO里的数据做编解码;encodestring, decodestring为一组,专门用来编码和解码字符串b64encode, b64decode为一组, 用来编码和解码字符串,并且有一个替换符号字符的功能因为Base64编码后的字符除了英文字母和数字外还有三个字符’ + / =‘,其中’=‘只是为了补全编码后的字符数为4的整数,而’+‘和’/‘在一些情况下需要被替换的,b64encode和b64de
一、特征值识别Base58编码表:123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyzBase系列特征base16特征:由大写字母(A-Z)和数字(0-9)组成,通常不需要“=”填充base32特征:由大写字母(A-Z)和数字(2-7)组成,需要“=”填充base64特征:大小写字母(a-Z)和数字(0-9)以及特殊字符('+','/')不满3的倍数用“=”补齐base58特征:同base64相比,少了数字‘0’和字母‘O'数字’1‘和字母’I‘以及'+'和'/'符号,也没有“=”base85特征:有很多奇怪的符号,但一般没有“=”base91特征:由91个字符(0-9,a-z,A-Z,!#$%&()*+,./:;<=>?@[]^_`{|}~”)组成base100特征:全是emoji表情。Base58编码表:123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz二、特征算法识别
一、条件跳转指令特定标志值的跳转jz 为零跳转 zf=1jnz 非零跳转 zf=0jc 有进位则跳转 cf=1jnc 无进位则跳转 cf=0jo 溢出则跳转 of=1jno 无溢出则跳转 of=0js 如果符号位为1则跳转 sf=1jns 如果符号位为零则跳转 sf=0jp 如果奇偶标志位为1(奇偶性为偶)则跳转 pf=1jnp 如果奇偶标志位为0(奇偶性为奇)则跳转 pf=0基于相等性的跳转je 如果相等(leftop=rightop)则跳转jne 如果不相等(leftop!=rightop)则跳转jcxz 如果cx=0则跳转jecxz 如果ecx=0则跳转jrcxz 如果rcx=0则跳转基于无符号数比较的跳转ja 如果多于则跳转(若leftop>rightop)jnbe 如果不是少于或等于则跳转(与ja相同)jae 如果多于或等于则跳转(若leftop>=rightop)jnb 如果不少于则跳转(与jae相同)jb 如果少于则跳转(若leftopjnae 如果不是多余或等于则跳转(与jb相同)jbe 如果少于或等于则跳转(若leftjna 如果不多于则跳转(与jbe相同
1. VirtualProtectEx 函数更改指定进程的虚拟地址空间中已提交页面区域的保护。(修改内存值)(1)语法BOOL VirtualProtectEx( [in] HANDLE hProcess, [in] LPVOID lpAddress, [in] SIZE_T dwSize, [in] DWORD flNewProtect, [out] PDWORD lpflOldProtect);(2)参数[in] hProcess要更改其内存保护的进程句柄。 句柄必须具有 PROCESS_VM_OPERATION 访问权限。 有关详细信息,请参阅 进程安全和访问权限。[in] lpAddress指向要更改其访问保护属性的页区域的基址的指针。指定区域中的所有页面都必须在使用 MEM_RESERVE 调用 VirtualAlloc 或 VirtualAllocEx 函数时分配 的同一保留区域。 这些页面不能跨通过单独调用 VirtualAlloc 或 VirtualAllocEx(使用 MEM_RESERVE)分配的相邻保留区域。[in] dwSize访问保护属性已
Norman1z