首页 \ 问答 \ DLL注入的最佳实践?(Best Practices for DLL Injection?)

DLL注入的最佳实践?(Best Practices for DLL Injection?)

假设我想将DLL注入到每250毫秒编辑一次地址A的进程中。 我需要使用DllMain,对吧? 问题是我不允许在DllMain内等待。 所以我必须创建一个线程? 或者这不绕过限制? 我该怎么做呢?

另外,使用DLL注入来编辑应用程序的内存是否有任何好处?

另外,CreateThread中的堆栈大小应该是多少? 如果它太小或太大怎么办? 我怎么知道我需要多少钱?


Suppose I want to inject a DLL into a process that wants to edit the value of address A every 250 ms. I would need to use DllMain, right? The issue is that I'm not allowed to wait inside DllMain. So I would have to create a thread? Or does that not bypass the limitation? How would I go about doing this?

Also, are there any benefits for using DLL injection to edit the memory of an application over using an EXE?

Also, what should the stack size be in CreateThread? What if it is too small or too large? How do I know how much I need?


原文:https://stackoverflow.com/questions/16254721
更新时间:2023-12-26 15:12

最满意答案

我没有在ggplot中看到任何级别参数,并且为字符向量分配levels不应该起作用。 如果您尝试分配表达式向量,您应该只使用一个expression调用并用逗号分隔参数,并且您应该在scale函数中使用labels参数:

 p <- qplot(1:10, 10:1)+ scale_y_continuous( breaks= 1:10, 
                            labels=expression( x>= 1, x>=2, x>=3, x>= 4,x>=5,
                                              x>= 6, x>=7, x>= 8,x>=9, x>= 10) )
 p

在此处输入图像描述


I do not see any levels arguments in ggplot and assigning levels to a character vector should not work. If you are trying to assign expression vectors you should just use one expression call and separate the arguments by commas and you should use the labels argument in a scale function:

 p <- qplot(1:10, 10:1)+ scale_y_continuous( breaks= 1:10, 
                            labels=expression( x>= 1, x>=2, x>=3, x>= 4,x>=5,
                                              x>= 6, x>=7, x>= 8,x>=9, x>= 10) )
 p

enter image description here

相关问答

更多
  • 我们可以使用gsub删除,并转换为numeric类 w$V2 <- as.numeric(gsub(',', '', w$V2)) str(w) # 'data.frame': 2 obs. of 2 variables: # $ V1: int 10 9 # $ V2: num 1000 2000 We can remove the , with gsub and convert to numeric class w$V2 <- as.numeric(gsub(',', '', w$V2)) st ...
  • 我不确定这是一种正式的方式,但试试这个: plot(0,0,col=0) text(0, 0, expression(italic(0 <= {x <= 1}))) I'm not sure if this is a formal way, but try this: plot(0,0,col=0) text(0, 0, expression(italic(0 <= {x <= 1})))
  • 我将首先合成一些数据,因为你没有提供任何数据。 这只是一个随机样本。 df <- data.frame(Perpetrator.Sex = sample(c("M","F"), 50, replace = TRUE), Victim.Sex = sample(c("M","F"), 50, replace = TRUE), Perpetrator.Age = rnorm(50, mean=40, sd =10), ...
  • 你的意思是这样的......? x <- relevel(x, ref="male") # use `relevel` just to reorder levels > x.level <- levels(x) > x.level[1] [1] "male" > x.level[2] [1] "female" You mean something like this...? x <- relevel(x, ref="male") # use `relevel` just to reorder ...
  • 你不需要for循环,更快捷的方法是 a <- c("",1,2,3,2,2,1,3,"") > b <- c(1,2,3,4,5,3,8,2,8) > a1 <- as.factor(a) > f <- data.frame(x=a1,y=b) > > f$x <- ifelse(f$x=="",0,f$x) > f$x [1] 0 2 3 4 3 3 2 4 0 > f$x <- as.factor(f$x) > str(f) 'data.frame': 9 obs. of 2 variables ...
  • 使用sum命令和向量化操作: sum((x-mean(x))*(y-mean(y))) 这里的关键启示是求和函数只是取参数的总和(向量,矩阵,不管)。 在这种情况下,给它一个向量就足够了,在这种情况下,向量表达式比sum(z)复杂一点,但注意(x-mean(x))*(y-mean(y))计算结果为z ,所以这个命令稍微华丽的事实并不能真正改变函数的工作方式。 这在许多地方都是如此,而不仅仅是sum命令。 Use the sum command and vectorized operations: sum(( ...
  • 您可以使用tapply按区域对权重求和(我认为这就是您的意思,但请澄清我是否误解): > df <- data.frame(region=sample(levels(state.region), 200, rep=T), weight=runif(200)) > summary(df$region) North Central Northeast South West 55 46 49 50 > ...
  • 一种选择是从car recode library(car) recode(x, "c('A', 'B')='A+B';c('D', 'E') = 'D+E'") #[1] A+B A+B A+B C D+E D+E A+B D+E C #Levels: A+B C D+E 它也应该与dplyr工作 library(dplyr) df %>% mutate(x= recode(x, "c('A', 'B')='A+B';c('D', 'E') = 'D+E'")) # x #1 A+B ...
  • 我没有在ggplot中看到任何级别参数,并且为字符向量分配levels不应该起作用。 如果您尝试分配表达式向量,您应该只使用一个expression调用并用逗号分隔参数,并且您应该在scale函数中使用labels参数: p <- qplot(1:10, 10:1)+ scale_y_continuous( breaks= 1:10, labels=expression( x>= 1, x>=2, x>=3, x>= 4,x>=5, ...
  • 这让你“在那里”(对于“那里”的某些定义): plot(1:10, xlab = expression("Likelihood, p" * (y[i] ~ "|" ~ o[j]))) This gets you "there" (for some definition of "there"): plot(1:10, xlab = expression("Likelihood, p" * (y[i] ~ "|" ~ o[j])))

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。