众所周知scrapy是Python中鼎鼎大名的爬虫框架,在安装scrapy过程中碰到了openssl某个文件找不到的问题,并进行了分析,记录之。
编译环境 Ubuntu 16.04 x86_64 himix2000 编译工具链 下载openssl源码 wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz 解压源码 tar xvf openssl-1.1.1d.tar.gz 执行Configure脚本 ./Configure linux-generic32 \ no-shared \ no-asm \ --prefix=/ilock/dist/himix200_openssl_11
https://blog.csdn.net/ctbinzi/article/details/5929800
pip install PyMySQL x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux
这个错误百度一搜索就知道是安装python的时候没有安装ssl。 不同的python版本对应的openssl要求不一样,我安装的python版本是的3.8.3,要求的openssl在1.0.2以上,如果系统上面的openssl不满足条件可以升级一下。
Windows下编译OpenSSL动态库的方法: 1、安装ActivePerl 初始化的时候,需要使用perl 2、使用VS下的Visual Studio 20xx Command Prompt进入控制台模式 3、解压缩openssl的包,通过cd命令切换到openssl的目录 4、执行:perl configure VC-WIN32 5、执行:ms/do_ms 6、选择不同的编译结果 1) 执行:nmake -f ms/ntdll.mak 该命令生成动态库,默认使用的是MD 2) 执行:nmake -f ms/nt.mak 该命令生成静态库,默认使用的是MT 3) 想生成使用静态链接运行时库的动态库则采用下面方法 复制一个ntdll.mak并命名为ntdll_mt.mak,修改里面的 “CFLAG= /MD /Ox ..............” 为/MT ,然后重新编译,执行 nmake -f ms/ntdll_mt.mak 4) 想生成使用动态链接运行时库的静态库则采用下面方法 复制一个nt.mak并命名为nt_md.mak,修改里面的 “CFLAG= /MT /Ox ..............” 为/MD ,然后重新编译 ,执行 nmake -f ms/nt_md.mak 7.其它命令: nmake -f ms/ntdll.mak clean // 清除编译的中间文件 nmake -f ms/ntdll.mak install // 安装 ,主要是linux下面会自动放到程序目录中 。
python安装完毕后,提示找不到ssl模块: www@pythontab.com ~]$ python Python 2.7.15 (default, Oct 23 2018, 18:08:43) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ssl Traceback (most rec
博客已经许多月没有继续更新了,近期刚好有个粉丝在做直播实时流转发,需要构建推流服务器,像我提出了一些nginx构建的问题,捧着自己的粉丝请教(当时一头雾水:我只是个小安卓),但是还是专门花了一天的时间研究了下推流服务器(直播实时流服务器)RTMP流媒体服务器,现在网上现成的开源方案有很多,有SRS,Red5,wowoza,FMS等,我这里使用的是Nginx的rtmp插件实现实时流转发。
从官网下载openssl源码和 libcurl源码。OpenSSL顺利交叉编译通过。
OpenSSL是一个开放源代码的软件库包,应用程序可以使用这个包来进行安全通信,避免窃听,同时确认另一端连接者的身份。这个包广泛被应用在互联网的网页服务器上。
OpenSSL 是开源密码库 , 其中封装了常用的 密码算法 , 常用密钥 , 证书封装管理 , SSL 协议 ;
OpenSSL*下载地址:https://oomake.com/download/openssl 这个链接有Windows版和源码版最新版下载地址,可以满足Windows、LInux、Mac OS系统使用。
官网下载地址: https://www.openssl.org/source/ Github地址:https://github.com/openssl/openssl/releases
编译环境 Ubuntu 16.04 x86_64 arm-xm-linux.tar.gz 下载openssl源码 $ wget https://www.openssl.org/source/openssl-1.1.0d.tar.gz 解压源码 $ tar xvf openssl-1.1.0d.tar.gz 执行Configure脚本 $ cd openssl $ ./Configure linux-generic32 \ no-shared \ no-asm \ no-async \ --pre
1. mqtt第三方库支持openssl a, 编译openssl库(我使用的是1.0.1),在mqtt源码目录下创建openssl文件夹,并拷贝编译完成的库文件与头文件到此文件夹下。 b, 修改mqtt(源码从git上获取https://github.com/eclipse/paho.mqtt.c.git )编译选项,PAHO_WITH_SSL,OPENSSL_SEARCH_PATH。修改后需要重新清除,重新编译。
一、安装 Zlib 1、下载最新版本 Zlib Zlib 官方网站:http://www.zlib.net/ # cd /usr/local/src # wget -c http://www.zlib.net/zlib-1.2.3.tar.gz 2、编译安装 Zlib # tar xzvf zlib-1.2.3.tar.gz # cd zlib-1.2.3 # ./configure --prefix=/usr/local/zlib # make # make install 这样,就把 zlib 编译安装在 /usr/local/zilib 中了。 二、安装 OpenSSL 1、下载最新版本 OpenSSL OpenSSL 的官方网站:http://www.openssl.org # cd /usr/local/src # wget -c http://www.openssl.org/source/openssl-0.9.8d.tar.gz 2、编译安装 OpenSSL # tar xzvf openssl-0.9.8d.tar.gz # cd openssl-0.9.8d # ./Configure --prefix=/usr/local/openssl # make # make test(这一步很重要哦!是进行 SSL加密协议的完整测试,如果出现错误就要一定先找出哪里的原因,否则一味继续可能导致最终 SSH 不能使用,后果很严重哦!) # make install 三、安装 OpenSSH 1、下载最新版本 OpenSSH OpenSSH 的官方网站:http://www.openssh.com # cd /usr/local/src # wget -c ftp://ftp.it.net.au/mirrors/OpenBSD/OpenSSH/portable/openssh-4.5p1.tar.gz 2、编译安装 OpenSSH # tar xzvf openssh-4.5p1.tar.gz # cd openssh-4.5p1 # ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam --with-zlib=/usr/local/zlib --with-ssl-dir=/usr/local/openssl --with-md5-passwords (注意,如果 configure 时提示 PAM 有错误,那一般是因为系统中没有安装 pam-devel RPM 包,找到安装光盘,安装 pam-devel 就可以解决啦) # make # make install 这样就完成了整个安装 SSH 的工作,在安装完成后,我们还需要修改一下 OpenSSH 的配置文件进一步提升安全性。通过以上步骤完成的安装工作,OpenSSH 的配置文件在 /etc/ssh 下,其中 SSH Server 的配置文件是 sshd_config。 # vi /etc/ssh/sshd_config 找到: CODE: #Protocol 2,1修改为: Protocol 2这样就禁用了 ssh v1 协议,只使用更安全的 ssh v2 协议。 X11Forwarding yes修改为: X11Forwarding no禁用 X11 转发。 修改后保存退出。 ● 生成ssh服务管理脚本 进入ssh解压目录 #cd /contrib/redhat #cp sshd.init /etc/init.d/sshd #chmod +x /etc/init.d/sshd #chkconfig --add sshd 最后,启动 SSH 服务使修改生效: # /etc/init.d/sshd restart 重启后确认一下当前的 OpenSSH 和 OpenSSL是否正确: # ssh -v 如果看到了新的版本号就没问题啦!
查看check_ssl.c 发现应该是识别到 1.1.0的版本了, 但使用的库的信息是1.0.0的
这几天因为安全漏洞扫描,扫描到时大量OpenSSH漏洞,需安全加固,主要是升级版本,以前对于升级打补丁总是不在意的,可这次中间遇到一些小问题整理成册,希望对大家有点帮助,以下是具体实现方法:
利用OpenSSL生成库和命令程序,在生成的命令程序中包括对加/解密算法的测试,openssl程序,ca程序.利用openssl,ca可生成用于C/S模式的证书文件以及CA文件.
因安全漏扫软件扫描业务虚机,发现有openssh ssh存在漏洞,此次需将openssh5.3P1升级至OpenSSH_8.0p1
这是一款快速的CVE-2019-0708漏洞扫描工具。目前,公共互联网上大约有900,000台机器容易受到这种漏洞的影响,这还是一个命令行工具。您可以下载源代码并自行编译,也可以从上面的链接下载一个用于Windows或macOS的预编译二进制文件。
在上一场 Chat《基于 Redis 的分布式缓存实现方案及可靠性加固策略》中,我已经较为全面的介绍了 Redis 的原理和分布式缓存方案。如果只是从“会用”的角度出发,已经有很多 Chat 和博客可供参考,但是,在实际应用中,异常场景时有出现,作为一名攻城狮,仅仅“会用”是不够的,还需要能够定位、解决实际应用中出现的异常问题。
OpenSSL其实是一个开源的C函数库,多用于加密依赖,很多程序的编译,需要OpenSSL作为依赖包。
Linux系统中默认的python版本为Python 2,而根据Python的官方邮件消息,Python 2即将于2020年终止所有的支持。简单的将Python由2升级至3则会有很大的技术风险隐患,因为Linux的一些常用指令,如yum指令,会对python存在依赖。所以我们需要找到一种对linux系统无影响的python3环境搭建过程,而本文即是对此的记录和思考。
除了下面这三个,其它均为第三方系统。这三个是树莓派适配的自己的 Linux 系统。
Linux离线编译编译Python需要gcc编译器编译,如果没有安装直接编译会出现以下错误
(<http://blog.csdn.net/qq_25560423/article/details/62055497>;)
curl是一个成熟的HTTP client库,可以使用cmake在命令行完成交叉编译。
这里选用的mosquitto进行移植,mosquitto依赖openssl和uuid,下面是我选用的版本:
网上关于python的交叉编译的文章很多,但是关于python第三库的交叉编译的文章就比较少了,而且很多标题是第三方库的交叉编译,但是实际上用到的都是不需要交叉编译就能用的库,可参考性不强,最近关于python及其第三方库的交叉编译也踩了不少坑,记录一下!
日常生活中,会经常用到随机数,使用场景非常广泛,例如买彩票、丢骰子、抽签、年会抽奖等。
Capabilities机制是在Linux内核2.2之后引入的,原理很简单,就是将之前与超级用户root(UID=0)关联的特权细分为不同的功能组,Capabilites作为线程(Linux并不真正区分进程和线程)的属性存在,每个功能组都可以独立启用和禁用。其本质上就是将内核调用分门别类,具有相似功能的内核调用被分到同一组中。
x.509 是密码学里面的公钥证书的格式标准. 就是说x.509是一种证书的格式,其实我们经常用这种格式的证书,只是可能没怎么注意过证书格式的标准而已.
服务器类型:CentOS 7 ,带安装光盘 网络环境:内网虚拟机 U盘里有python36安装包
话说刚才生成一个私钥的时候, Python3绑定libssl1.1 又崩了;正在痛苦思考中~~~
通过libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fa72fe20000)知道OPENSSL_LIB_DIR是 /usr/lib/x86_64-linux-gnu
使用yum命令报错File "/usr/bin/yum", line 30 except KeyboardInterrupt, e: 问题出现原因:
EPEL (Extra Packages for Enterprise Linux) 是由 Fedora Special Interest Group 为企业 Linux 创建、维护和管理的一个高质量附加包集合适用于但不仅限于 Red Hat Enterprise Linux (RHEL), CentOS, Scientific Linux (SL), Oracle Linux (OL)
这篇文章为了让你深入了解gdb的工作原理,以及如何在linux环境下使用强大的gdb调试程序功能。
LibreSSL 开发者 OpenBSD计划 稳定版本 2.0.3 / 2014年7月21日;3天前 开发状态 进行中 编程语言 C,汇编语言 操作系统 OpenBSD、FreeBSD、Linux、Mac OS X、Solaris 类型 安全库 许可协议 Apache许可证1.0、4句BSD许可证、ISC许可证,部份为公有领域 网站 http://www.libressl.org LibreSSL是OpenSSL加密软件库的一个分支,为一个安全套接层(SSL)和传输层安全(TLS)协议的开源
由于诸多原因,前几天抽了点时间在网上找了一些OpenSSL的资料。网上的资料鱼龙混杂,我看原创的并不多。部分资料是讲OpenSSL命令行的操作,另一部分(基本上转载的那样一两篇)是Linux下的OpenSSL的API。
对于api服务器,我们不能让访问者先登录再进行访问这样不安全,也不友好。 http协议没有任何的加密以及身份验证的机制,即时是token认证,也非常容易遭遇窃听、劫持、篡改,因此会造成个人隐私泄露,恶意的流量劫持等严重的安全问题。
补充1: 以下,通过httpd_vhost.conf配置了两个apache虚拟机,分别模拟http和https的转发: NameVirtualHost *:81 NameVirtualHost *:443
Linux下安装Erlang 一、升级openssl # cd /usr/local/ # wget http://www.openssl.org/source/openssl-1.0.1s.tar.gz # tar -zxvf openssl-1.0.1s.tar.gz # cd openssl-1.0.1s # ./config --prefix=/usr/local/openssl # vim Makefile --修改CFLAG= -DOPENSSL_THREADS 修改成 CFLAG= -fPIC
问题版本:0.9.0 make[4]: Entering directory `/tmp/X/thrift-0.9.0/lib/cpp' /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/thirdparty/boost/include -I./src -I./src/thrift -I/usr/local/thirdparty/openssl/include -Wall -g -O2 -MT Thrift.lo -MD -MP -MF .deps/Thrift.Tpo -c -o Thrift.lo `test -f 'src/thrift/Thrift.cpp' || echo './'`src/thrift/Thrift.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/thirdparty/boost/include -I./src -I./src/thrift -I/usr/local/thirdparty/openssl/include -Wall -g -O2 -MT Thrift.lo -MD -MP -MF .deps/Thrift.Tpo -c src/thrift/Thrift.cpp -fPIC -DPIC -o .libs/Thrift.o In file included from src/thrift/Thrift.cpp:22: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cstdlib:119: error: '::malloc' has not been declared /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/cstdlib:127: error: '::realloc' has not been declared src/thrift/Thrift.cpp: In member function 'void apache::thrift::TOutput::printf(const char*, ...)': src/thrift/Thrift.cpp:46: error: 'malloc' was not declared in this scope make[4]: *** [Thrift.lo] Error 1 解决方法: 在成功执行configure后(在未执行configure之前找不到下列两行),修改与configure同目录下的config.h文件,将文件中的如下两行注释掉: #define malloc rpl_malloc #define realloc rpl_realloc 附1:安装Thrift命令行: ./configure --prefix=/usr/local/thirdparty/thrift-0.9.0 --with-boost=/usr/local/thirdparty/boost --with-libevent=/usr/local/thirdparty/libevent CPPFLAGS="-I/usr/local/thirdparty/openssl/include" LDFLAGS="-ldl -L/usr/local/thirdparty/openssl/lib" --with-qt4=no --with-c_glib=no --with-csharp=no --with-erlang=no --with-perl=no --with-ruby=no --with-haskell=no --with-go=no --with-d 当OpenSSL未以默认安装目录时,请注意上面的用法。 附2:相关博文: (安装thrift时,注意openssl参数)http://blog.chinaunix.net/uid-20682147-id-3399150.html 如果在使用Thrift时,编译遇到类似“TTransport.h:107: error: 'uint32_t' does not name a type”的错误,只需要在Thrift.h文件中增加一行:#include 。 Thrift.h文件位于make install后的include目录下,如果不知道在哪,可以使用find命令查找。
Nginx ("engine x") 是一个高性能的 HTTP 和 反向代理 服务器,也是一个 IMAP/POP3/SMTP 代理服务器,在高连接并发的情况下Nginx 是 Apache 服务器不错的替代品.其特点是占有内存少,并发能力强,事实上nginx的并发能力确实在同类型的网页服务器中表现较好.目前中国大陆使用nginx网站用户有:新浪、网易、 腾讯,另外知名的微网志Plurk也使用nginx。
维基百科上这样解释:是一个异步框架的 Web服务器,也可以用作反向代理,负载平衡器 和 HTTP缓存。关于这句话的介绍,我想我之前发的这篇文章能帮到你,这里不重复解释啦。
利用arm-none-linux-gnueabi-gcc交叉编译openssl,生成静态库文件libcrypto.a ,libssl.a
-pbkdf2 和 -iter 1000 选项则告诉 OpenSSL 使用 PBKDF2 密钥派生函数,并且进行1000次迭代,使得暴力破解更加困难。
在红队进行渗透测试的后续渗透阶段为了扩大战果,往往需要进行横行渗透,反弹shell是再常见不过的事情了,在 《反弹Shell,看这一篇就够了》 这篇文章里,我总结了很多常见的反弹shell的方法。除了这些之外,我们还可以使用Metasploit或Cobalt Strike等工具获得目标的shell。但是这些反弹 shell 方式都有一个缺点,那就是 所有的流量都是明文传输的。
领取专属 10元无门槛券
手把手带您无忧上云