header

《逆向工程核心原理》学习笔记4 PE文件学习——PE头总结

限于喜欢 提交于 2020-02-16 14:38:39
《逆向工程核心原理》学习笔记4 PE文件学习——PE头总结 1.DOS头 typedef struct _IMAGE_DOS_HEADER //DOS头 { WORD e_magic; //DOS signature :4D5A ("MZ",是确定的值, 被称为DOS签名,如果值被改变,程序无法运行) WORD e_cblp; WORD e_cp; WORD e_crlc; WORD e_cparhdr; WORD e_minalloc; WORD e_maxalloc; WORD e_ss; WORD e_sp; WORD e_csum; WORD e_ip; WORD e_cs;NT WORD e_lfarlc; WORD e_ovno; WORD e_res[4]; WORD e_oemid; WORD e_oeminfo; WORD e_res2[10]; WORD e_lfanew; //NT头的偏移,offset to NT header,修改后程序 无法正常运行 } IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER; 2.DOS存根 由代码和数据混合而成,在DOS环境下运行,可以用debug.exe运行(window10下用DOSBOX+debug)。 3.NT头 typedef struct _IMAGE_NT_HEADERS //NT头 {

Nginx http filter异常排查

主宰稳场 提交于 2020-02-16 07:46:08
问题: 访问异常 root@cloud:/usr/local/nginx# curl -i http://localhost/test.html curl: (52) Empty reply from server 错误日志 2016/09/11 13:17:03 [alert] 63560#0: worker process 63663 exited on signal 11 (core dumped) dmesg信息 [265950.220943] nginx[63663]: segfault at 128 ip 000000000048259d sp 00007ffde898eab0 error 4 in nginx[400000+a5000] core dump设置 默认Worker进程用户nobody:nogroup,无法写coredump. 需在nginx.conf配置: worker_rlimit_core 1024m; #1G working_directory /tmp/core #保证nobody:nogroup有W权限 执行"sbin/nginx -s reload"重新加载配置。 core dump分析 使用readelf工具 core dump是ELF格式文件,你可以用readelf -a 查看core dump文件,但哪只是一堆数据。 使用gdb工具

Vue组件之间的传值的方式

◇◆丶佛笑我妖孽 提交于 2020-02-15 07:38:31
父子组件之间的传值 方法一:props 和 $emit 父组件: 传值count给子组件 <template> <div class="hello"> <!-- header --> <Header @func="Receive" :count="msg"></Header> <!-- nav --> </div> </template> <script> import Header from '@/components/header/index.vue' export default { name: 'index', data(){ return { msg: "你好,我是父组件传过来的值" } }, components:{ Header }, methods:{ Receive(msg){ console.log(`父组件:${msg}`); } } } </script> <style scoped> </style> 子组件接收:子组件通过props接收父组件传来的值 export default { name: 'Header', props:{ count: String }, data(){ return { title: 'hello' } } } 子组件向父组件传值 子组件:子组件点击之后通过$emit传值给父组件 <template> <div class=

python爬虫——requests里面的response对象

a 夏天 提交于 2020-02-15 05:48:11
import requests class R ( object ) : def __init__ ( self ) : url = "http://www.baidu.com" header = { # 浏览器的版本 "User-Agent" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36" } self . response = requests . get ( url , headers = header ) def run ( self ) : data = self . response . content #获取请求头 request_headers = self . response . request . headers print ( request_headers ) #获取响应头 response_header = self . response . headers print ( response_header ) #响应状态 code = self . response . status_code print ( code ) #请求的cookie request

php如何获取Request Header

帅比萌擦擦* 提交于 2020-02-14 12:08:16
最近做php跨域调用的方案,其中要保证两个前端域名a.com,b.com都可以访问后端域名server.com,而且不同的前端域请求,服务端逻辑处理不一样,要做前端域名的判断,如何获取客户端的信息呢? 从请求过来的header中获取客户端信息,看下request header都传了什么: header.png Host:请求后端Server的域名 Origin:请求中所在客户端的域名 好了,问题解决方案就有了,获取Request Headers,直接上代码: // 服务器端跨域设置 header('Access-Control-Allow-Origin:*'); // if (!function_exists('getallheaders')) { function getallheaders() { $headers = []; foreach ($_SERVER as $name => $value) { if (substr($name, 0, 5) == 'HTTP_') { $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; } } return $headers; } } foreach (getallheaders

EMMC Packed Command

≡放荡痞女 提交于 2020-02-13 15:09:53
Packed Commands - Packed Write and Packed Read 在实际应用场景中,通常会对 eMMC Device 有很多随机数据读取和写入操作,这些随机读写的目标地址往往都不是连续的,每一个随机读写都需要通过一个独立的读写流程来实现。 在 eMMC 4.5 及以后的标准中,引入了 Packed Commands 机制,将多个地址不连续的数据写入请求封装到一个 Multiple Block Write 流程中,同时将多个地址不连续的数据读取请求封装的一个 Multiple Block Read 流程中,以此减少读写请求数量,提高数据读写的效率。 Packed Write 发起 Packed Write 流程时,首先 Host 端会需要发送 packed flag 置 1 的 CMD23 SET_BLOCK_COUNT 命令。其中,CMD23 中的 Block Count 参数为 Packed Command Header 和实际写入的数据所占 Block 的总数。 然后 Host 再发送 CMD25 命令给 eMMC Device,开始进行多个 Block 的数据写入。其中第 1 个(或者前 8 个) Block 数据为 Packed Command Header,它包含了各个写请求写入数据的起始地址和长度等信息。 eMMC Devcie

Codeforces Edu Round 82 (Rated for Div. 2)

帅比萌擦擦* 提交于 2020-02-13 12:57:29
题目链接: https://codeforces.com/contest/1303 A: 白给 1 /* basic header */ 2 #include <bits/stdc++.h> 3 /* define */ 4 #define ll long long 5 #define dou double 6 #define pb emplace_back 7 #define mp make_pair 8 #define sot(a,b) sort(a+1,a+1+b) 9 #define rep1(i,a,b) for(int i=a;i<=b;++i) 10 #define rep0(i,a,b) for(int i=a;i<b;++i) 11 #define eps 1e-8 12 #define int_inf 0x3f3f3f3f 13 #define ll_inf 0x7f7f7f7f7f7f7f7f 14 #define lson (curpos<<1) 15 #define rson (curpos<<1|1) 16 /* namespace */ 17 using namespace std; 18 /* header end */ 19 20 const int maxn = 110; 21 int t; 22 char s[maxn]; 23 24 int

How to Customize Server Header using NginX headers-more module

感情迁移 提交于 2020-02-13 12:05:58
http://wiki.nginx.org/HttpHeadersMoreModule#Version headers_more When you are browsing a website, you can check the type of web server running by retrieving the response server header. For example the following server response return for website http://www.debian-tutorials.com: HTTP/1.1 200 OK Server: Apache/2.2.22 Date: Mon, 04 Mar 2013 00:43:59 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive X-Powered-By: PHP/5.2.17 X-Pingback: http://www.debian-tutorials.com/xmlrpc.php Cache-Control: max-age=7200 Expires: Mon, 04 Mar 2013 02:43:58 GMT Vary: Accept-Encoding From the

SASS - 变量

。_饼干妹妹 提交于 2020-02-12 21:18:41
SASS – 简介 SASS – 环境搭建 SASS – 使用Sass程序 SASS – 语法 SASS – 变量 SASS- 局部文件(Partial) SASS – 混合(Mixin) SASS – @extend(继承)指令 SASS – 操作符 SASS – 函数 SASS – 输出格式 变量可以让整个网站保持一致性。你可以定义一个变量,然后在其他地方引用它,而不必再重复相同的值。要改这些值,只需在定义变量的那一个地方修改。 下面的Sass代码包含两个变量: $primary-color , $secondary-color $primary-color: orange; $secondary-color: gold; body { color: $primary-color; background: $secondary-color; } 变量就像存储值的容器。在本例中,我们将值orange、gold存储在变量中。 每次需要使用orange颜色时,可以使用变量名来代替orange颜色。如果需要改一个颜色,只需在定义变量的那一个地方修改。 变量定义 变量以美元符号($)开头,后面跟变量名。 变量名和赋值之间用冒号(:)分隔。 注意:缩进语法、SCSS语法中,变量定义都是一样的。 连字符和下划线 变量名中连字符和下划线等效, $primary_color 与 $primary

低功耗设计技术--门控电源(Power/Ground Gating)--Power Switching Cell

瘦欲@ 提交于 2020-02-12 16:54:47
本文转自:自己的微信公众号《集成电路设计及EDA教程》 概念: Power/Ground Gating是集成电路中通过关掉那些不使用的模块的电源或者地来降低电路漏电功耗的低功耗设计方法。该方法能降低电路在空闲状态下的静态功耗,还能测试Iddq。 理论: 在电路中的某些模块进入休眠或者空闲模式时,我们可以使用之前讲过的Clock Gating技术来降低它们的动态功耗,但是无法降低它们的静态功耗。而Power/Ground Gating技术可以在它们休眠的时候完全关掉它们的电源从而消除它们的静态功耗。 理想情况下,Power gating可以完全消除电路的静态功耗,可实际电路中Power gating只能完全关掉dynamic的power消耗,而leakage却只会减少,不会消失,因为power gating技术仍需要加入一些Always On的Cell(比如switching cell、isolate cell和retention cell,它们都是一直开启的,它们的电源不能被关断,会带来leakage)。 如下图所示为采用了Power gating的电路动态功耗与静态功耗在active模式以及sleep模式下功耗的变化曲线。 Power gating中用到的几种Cell 接下来将对几种Cell分别介绍。 由于内容非常多,非常详细,所以本推文先介绍第一个--Power