ollvm 使用——“Cannot open /dev/random”错误的解决方法
找到
\obfuscator-llvm-4.0\lib\Transforms\Obfuscation\CryptoUtils.cpp
这个文件,
新增两个头文件
#include <windows.h>
#include <wincrypt.h>
bool CryptoUtils::prng_seed()
找到这个函数
把整个函数体全部注释掉后,新增代码
bool bRet = false;
do
{
HCRYPTPROV Rnd;
LPCSTR UserName = "MyKeyContainer";
if (CryptAcquireContextA(&Rnd, UserName, NULL, PROV_RSA_FULL, ))
{ }
else
{
break;
} if (CryptGenRandom(Rnd, , (BYTE*)key))
{
bRet = true;
}
else
{
break;
} if (CryptReleaseContext(Rnd, ))
{ }
else
{
break;
}
} while (false);
if (bRet)
{
memset(ctr, , ); // Once the seed is there, we compute the
// AES128 key-schedule
aes_compute_ks(ks, key); seeded = true;
}
else
{
errs() << "Windows CryptGenRandom Error \n";
}
保证能取到随机数即可,
重新编译,会重新编90+个工程,
然后就不会再出错误了
ollvm 使用——“Cannot open /dev/random”错误的解决方法的更多相关文章
- Linux出现Read-only file system错误的解决方法
造成这个问题的解决办法大多数是由于非正常关机后导致文件系统受损引起的,在系统重新启动之后,受损分区就会被Linux自己主动挂载为仅仅读.解决办法是通过fsck来修复文件系统,然后重新启动就可以,下面是 ...
- CentOS 安装hping3工具及安装遇到的错误及解决方法
hping是用于生成和解析TCPIP协议数据包的开源工具.创作者是Salvatore Sanfilippo.目前最新版是hping3,支持使用tcl脚本自动化地调用其API.hping是安全审计.防火 ...
- Eclipse启动时发生An internal error occurred during: "Initializing Java Tooling".错误的解决方法
问题描述: Eclipse启动时发生An internal error occurred during: "Initializing JavaTooling".错误的解决方法 解决 ...
- GCC-4.6.3编译linux2.6.32.12内核出现“重复的成员‘page’”错误的解决方法
使用gcc4.6.3编译linux2.6.32.12内核出现错误如下: In file included from drivers/net/igbvf/ethtool.c:36:0: drivers/ ...
- Linux系统Vsftp 传文件出现 553 Could Not Create File错误的解决方法
解决方法: 登录出现了这个错误提示:553 Could not create file SELinux设置如下 查看SELinux设置 [root@localhost ~]# getsebool -a ...
- [转]权限问题导致Nginx 403 Forbidden错误的解决方法
权限问题导致Nginx 403 Forbidden错误的解决方法 投稿:junjie 字体:[增加 减小] 类型:转载 时间:2014-08-22 这篇文章主要介绍了权限问题导致Nginx 403 F ...
- ueditor上传大容量视频报http请求错误的解决方法
故障现象: 当使用百度编辑器ueditor上传大容量视频或大容量图片的时候,编辑器报"http请求错误"的解决方法详解: 原因分析: 目前很多CMS整合了百度的ueditor编辑器 ...
- window10 安装出现the error code is 2503错误的解决方法
window10 安装出现the error code is 2503错误的解决方法: 设置 C:\WINDOWS\TEMP的权限
- MyEclipse+Tomcat 启动时出现A configuration error occured during startup错误的解决方法
MyEclipse+Tomcat 启动时出现A configuration error occured during startup错误的解决方法 分类: javaweb2013-06-03 14:4 ...
随机推荐
- release操作流程
1.release:prepare 这条命令主要是做打包前的准备. 输入对应的release需要打包的版本等信息,如果不输入有默认的内容 将需要记录和准备的内容缓存到pom.xml目录下的releas ...
- MVC使用Area:CS0234: 命名空间“System.Web”中不存在类型或命名空间名称“Optimization”(是否缺少程序集引用?)
一,如图: 解决方法是:将区域生成的的文件夹下的web.config中的using System.Web.Optimization删掉 如下,Area文件目录找到Web.config Web.conf ...
- 第五组postmortem报告
为期近半年的软工课程顺利收工了.这一个学期的网站制作中, 憧憬过.懊恼过.兴奋过,回顾整个制作过程,我们按老师的要求来一份验尸报告. 1. 每个成员在beta 阶段的实践和alpha 阶段有何改进? ...
- Angular的一些常用命令
Angular的一些常用命令 cmd中创建项目: ng new taskmgr -si --style=scss //先不安装依赖,si 为skip install material需要scss样式的 ...
- RxJava总结(原)
1.RxJava的作用 RxJava is a Java VM implementation of Reactive Extensions: a library for composing async ...
- 三、SpringBoot项目探究
1.pom文件 父项目 <parent> <groupId>org.springframework.boot</groupId> <artifactId> ...
- day02 html body中的标签
day02 html 一.body中的标签 a标签: <!DOCTYPE html> <html lang="en"> <head> ...
- java输出当前文件所在路径
System.out.println(System.getProperty("user.dir"));//user.dir指定了当前的路径
- leetcode-165周赛-1278-分割回文串③
题目描述: 动态规划:O(N^3) class Solution: def palindromePartition(self, s: str, k: int) -> int: def cost( ...
- paper 136:ARM ADS集成开发环境的使用(新版)
[转载]:http://blog.csdn.net/yhmhappy2006/article/details/1673203 ARM ADS集成开发环境的使用 在这里,将介绍ARM开发软件ADS(AR ...