由于很多dylib在springboard完成初始化之后就立马注入到线程里了。所以有可能需要启动调试Springboard。
我们先用apple的launchctl unload /System/Library/LaunchDaemons/com.apple.SpringBoard.plist
让他停止运行
然后再用debugserver 二进制启动。如果需要启动周边一些的话,请自行查询Springboard.plist看看有没有什么别的。
由于很多dylib在springboard完成初始化之后就立马注入到线程里了。所以有可能需要启动调试Springboard。
我们先用apple的launchctl unload /System/Library/LaunchDaemons/com.apple.SpringBoard.plist
让他停止运行
然后再用debugserver 二进制启动。如果需要启动周边一些的话,请自行查询Springboard.plist看看有没有什么别的。
Posted in 逆向开发
lua和geoip
./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie' --add-dynamic-module=/data/nginx/ngx_http_geoip2_module --add-dynamic-module=/data/nginx/echo-nginx-module --add-dynamic-module=/data/nginx/lua-nginx-module
passenger
passenger-config --nginx-addon-dir 用这个命令获得路径
./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-file-aio --with-threads --with-ipv6 --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_ssl_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --add-dynamic-module=path
1、备份iptables规则
iptables-save命令用来批量导出iptables防火墙规则,直接执行iptables-save时,将显示出当前启用的所有规则,按照raw、mangle、nat、filter表的顺序依次列出;若只希望显示出某一个表,应添加“-t表名”作为命令选项,然后结合重定向输入“>”将输出内容重定向到某个文件中。
列如:备份所有表的规则,操作如下:
[[email protected] /]#iptables-save >/root/iptables-save
后者默认将所有规则保存到“/etc/sysconfig/iptables”文件中。
2、恢复iptables规则
iptables-retore命令用来批量导入Linux防火墙规则,如果已经有使用iptable-save命令导出的备份文件,则恢复规则的过程也就是一瞬间的事。与iptables-save命令相对的,iptables-restore命令应结合重定向输入来指定备份文件的位置。
列如:将上所备份的规则恢复到iptables中,操作如下:
[[email protected] /]#iptables-restore < /root/iptables-save
update-alternatives --config java
update-alternatives --config javac
Posted in linux应用
cat >/etc/yum.repos.d/docker.repo <<-EOF
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
$ sudo yum install docker-engine
$ sudo service docker start
下载 ubuntu trusty
$ docker pull ubuntu:trusty
以交互命令运行
$ docker run -i -t library/ubuntu:trusty /bin/bash
先UPDATE一下
安装SSH终端服务器,便于我们外部使用SSH客户端登陆访问
[[email protected] /]# yum install passwd openssl openssh-server -y
启动sshd:
# /usr/sbin/sshd -D
这时报以下错误:
[[email protected] b5926410fe60 /]# /usr/sbin/sshd
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
执行以下命令解决:
[[email protected] /]# ssh-keygen -q -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key -N ''
[[email protected] /]# ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
[[email protected] /]# ssh-keygen -t dsa -f /etc/ssh/ssh_host_ed25519_key -N ''
yum install passwd
passwd
获取到刚才操作的实例容器ID
#docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fceac2533703 library/ubuntu:trusty "/bin/bash" 24 minutes ago Exited (0) 36 seconds ago adoring_murdock
以后台进程方式长期运行此镜像实例:
docker run -d -p 22 -p 2333:2333 learn/tutorial /usr/sbin/sshd -D
运行环境 python3, django-1.9.2
获取代码,并且换到代码目录。之后所有操作都在这个目录下。
安装虚拟环境,主要起隔离作用
$ pip3 install --upgrade virtualenv
建立并激活虚拟环境在隐藏目录 .virtualenv下,目录可以自己设置
$ virtualenv -p python3 .virtualenv
$ source .virtualenv/bin/activate
至此,命令行会以(.virtualenv) 打头.
接着安装django $ pip3 install django
整合 (.virtualenv) $ python3 manage.py migrate
跑在后台,用nohup跑,会留下一个进程号。点一下回车就可以继续搞其他事情。
(.virtualenv) $ nohup python3 manage.py runserver 0.0.0.0:[port] &
Posted in 日常笔记
管理员运行cmd
cd C:\Program Files\Java\jre7\lib\security
keytool -keystore cacerts -importcert -alias startcom.ca -file ca.crt
keytool -keystore cacerts -importcert -alias startcom.ca.sub -file sub.class1.server.ca.crt
keytool -keystore cacerts -importcert -alias startcom.cabundle.crt -file ca-bundle.crt
security-jvm 左边是startcom 各种证书下载包解压到C:\Program Files\Java\jre7\lib\security
Posted in linux应用
当zabbix 2.4/2.5 搭配php7 出现 always_populate_raw_post_data 报警无法安装的解决办法
when you install zabbix 2.4/2,5 with php7 ,you will meet the alert of always_populate_raw_post_data xxxx.In fact php 7 already removed this function.So we need to make some modify to slove this problem.
本方法适用于YUM安装的
This solution is suit for yun/rpm installion.
打开/usr/share/zabbix/include/classes/setup/CFrontendSetup.php
open /usr/share/zabbix/include/classes/setup/CFrontendSetup.php
找到这一段
// check for deprecated PHP 5.6.0 option 'always_populate_raw_post_data' if (version_compare(PHP_VERSION, '5.6', '>=')) {
修改成这样
if (version_compare(PHP_VERSION, '5.6', '>=') && version_compare(PHP_VERSION, '7.0.0alpha2', '<')) { $result[] = $this->checkPhpAlwaysPopulateRawPostData(); } $result[] = $this->checkPhpSockets();
就可以了
Posted in 日常笔记
multicraft默认使用的php函数发信,被很多邮件商当作垃圾信件给处理掉了。
Because default send mail method of multicraft is php mail (),So our confirm and restpassword email always be treated as junk mail by the most of email services.
所以我们亟需配置一下SMTP发现。
So our immediate requirement is change our send mail method from PHP to SMTP.
首先你得有一个邮箱,QQ,网易,新浪啥的都行。记得开启SMTP功能!
Firstly you need a email :D,such like Google or any other else.Remember open the SMTP!
然后来到面板/protected/config/internal/application.php 编辑打开大约在第138行
that go to ~panel~/protected/config/internal/application.php and edit about at line 138.
'mail'=>array(
'class'=>'ext.yii-mail.YiiMail',
'logging'=>false,
'transportType'=>'php',
改成
'mail'=>array(
'class'=>'ext.yii-mail.YiiMail',
'logging'=>true,
'transportType'=>'smtp',
'transportOptions'=>array(
'host'=>'smtp.qq.com',
'username'=>'[email protected]',
'password'=>'qqqqq',
'port'=>465,
'encryption'=>'tls',
),
然后好像是PHP版本大于等于5.5的话
Some guys and me me a problem.if you php version is higher than 5.4
会显示
the rest password page would be shown:
Undefined property: Swift_Transport_StreamBuffer::$_sequence
那你就在
面板//protected/extensions/yii-mail/vendors/swiftMailer/classes/Swift/Transport/StreamBuffer.php中大约第163行
So you go to panel~/protected/extensions/yii-mail/vendors/swiftMailer/classes/Swift/Transport/StreamBuffer.php
about at line 163
public function readLine($sequence)
{
if (isset($this->_out) && !feof($this->_out))
{
$line = fgets($this->_out);
return $line;
}
}
private $_sequence; //(加入这条)(insertraline)
If you feel this is helpful to you please leave a comment.thank~
看贴不回贴,立马就怀孕!