Hack-Crack 信息安全 【Mars Information Serurity Institute】
站点说明

Scan the QRcode to download

扫描上方二维码下载我的最新应用,Findu(支持iOS Android)关注自己所关注的人,让一切都变的无所遁形,再也不怕搭到黑车啦!

【Findu Today】

本站所破解的程序仅限于分析研究只用,不可用于非法用途,如果喜欢该软件请购买正版。由于程序所造成的损失本人概不负责。

【订阅本站文章】

联系方式:

博客:http://www.h4ck.org.cn

Blog:http://h4ck.ws

微博:http://www.obaby.org.cn

Codes:http://code.h4ck.org.cn

Twitter:http://twitter.com/#!/ob4by

QQ:382291381

danteng link
分类目录/搜索
版权信息:
Nginx Ubuntu php mysql [Valid RSS] Valid CSS!

hacker emblem

知识共享许可协议
火星信息安全研究院 by
obaby is licensed under a Creative Commons 署名-非商业性使用-相同方式共享 2.5 中国大陆 License.
基于www.h4ck.org.cn上的作品创作。

在国内的服务器上配置任何的服务都要费一番折腾,首先,国内的服务器连接国外的更新源本身就有问题。效率低还可以忍受,但是直接连不上服务器这个就没什么办法了,只能更换更新源。在《阿里云蛋疼的pip》一文中为了能够正常的使用pip,替换了默认的服务器,修改成了http://mirrors.aliyun.com/pypi/simple/ 这个源,但是也是忧郁这个蛋疼的源出现了各种问题。

在执行

./path/to/certbot-auto renew --quiet --no-self-upgrade

的时候会提示很多错误信息,找不到各种lib。

Had a problem while installing Python packages.
 
pip prints the following errors: 
=====================================================
Collecting argparse==1.4.0 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 11))
  Downloading http://mirrors.aliyun.com/pypi/packages/f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl
Collecting pycparser==2.14 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 17))
  Downloading http://mirrors.aliyun.com/pypi/packages/6d/31/666614af3db0acf377876d48688c5d334b6e493b96d21aa7d332169bee50/pycparser-2.14.tar.gz (223kB)
Collecting cffi==1.4.2 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 21))
  Downloading http://mirrors.aliyun.com/pypi/packages/92/00/c8670a2898ab7121cdac3b59f4307977a86e08a59efd662f6c05200a2f11/cffi-1.4.2.tar.gz (365kB)
Collecting ConfigArgParse==0.10.0 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 38))
  Downloading http://mirrors.aliyun.com/pypi/packages/d0/b8/8f7689980caa66fc02671f5837dc761e4c7a47c6ca31b3e38b304cbc3e73/ConfigArgParse-0.10.0.tar.gz
Collecting configobj==5.0.6 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 40))
  Downloading http://mirrors.aliyun.com/pypi/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz
Collecting cryptography==1.5.3 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 42))
  Downloading http://mirrors.aliyun.com/pypi/packages/6c/c5/7fc1f8384443abd2d71631ead026eb59863a58cad0149b94b89f08c8002f/cryptography-1.5.3.tar.gz (400kB)
Collecting enum34==1.1.2 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 65))
  Downloading http://mirrors.aliyun.com/pypi/packages/6f/e9/08fd439384b7e3d613e75a6c8236b8e64d90c47d23413493b38d4229a9a5/enum34-1.1.2.tar.gz (46kB)
Collecting funcsigs==0.4 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 68))
  Downloading http://mirrors.aliyun.com/pypi/packages/5e/9f/025d4c92c6a1a94313cdf0813cd76f5700f8e5434fa15165090a6446ae22/funcsigs-0.4-py2.py3-none-any.whl
Collecting idna==2.0 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 71))
 
  Downloading http://mirrors.aliyun.com/pypi/packages/7c/75/b566d769455929ee6ab308d8a1c6c5aecc4928e72b25d42dd019c99f7015/idna-2.0-py2.py3-none-any.whl (61kB)
Collecting ipaddress==1.0.16 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 74))
  Downloading http://mirrors.aliyun.com/pypi/packages/23/6a/813ac29a01e4c33c19c2bded98ac3d4266ebbf0bd2c0eb0020e1c969958d/ipaddress-1.0.16-py27-none-any.whl
Collecting linecache2==1.0.0 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 77))
  Downloading http://mirrors.aliyun.com/pypi/packages/c7/a3/c5da2a44c85bfbb6eebcfc1dde24933f8704441b98fdde6528f4831757a6/linecache2-1.0.0-py2.py3-none-any.whl
Collecting ordereddict==1.1 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 80))
  Downloading http://mirrors.aliyun.com/pypi/packages/53/25/ef88e8e45db141faa9598fbf7ad0062df8f50f881a36ed6a0073e1572126/ordereddict-1.1.tar.gz
Collecting parsedatetime==2.1 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 82))
  Downloading http://mirrors.aliyun.com/pypi/packages/85/1f/13fc06097e516f6259d62cea502b116451321c96e18a9d0fff9da3442e02/parsedatetime-2.1-py2-none-any.whl
Collecting pbr==1.8.1 (from -r /tmp/tmp.eLMZJv8t9Y/letsencrypt-auto-requirements.txt (line 85))

继续阅读

QQ图片20160519115351

其实项目已经是很久之前就完成了,部署到服务器上去之后后续的工作由于懒散一致没做,近几天开始进行重新继续项目之后发现一个很蛋疼的问题,在iOS端提交数据的时候提示:

{“detail”:”Authentication credentials were not provided.”},搜索之后发现原来是mod_wsgi转发数据的时候将authorization header 去掉了,所以会导致认证失败。可以参考链接:

http://stackoverflow.com/questions/26906630/django-rest-framework-authentication-credentials-were-not-provided

修复也很简单,修改/etc/apache2/apache2.conf文件添加如下一行即可:

WSGIPassAuthorization On

升级wordpress 之后去按照以前的方法找服务器设置,发现找不到了。蛋疼啊,但是最近又有点忙,所以一直没管它,今天搜索了一下发现新的头像服务器函数已经移动到”\WordPress4.2.1\wp-includes\link-template.php”(3604,29): $url = sprintf( ‘http://%d.gravatar.com/avatar/%s’, $gravatar_server, $email_hash );这里来了,如下:

3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
	if ( $email_hash ) {
		$args['found_avatar'] = true;
		$gravatar_server = hexdec( $email_hash[0] ) % 3;
	} else {
		$gravatar_server = rand( 0, 2 );
	}
 
	$url_args = array(
		's' => $args['size'],
		'd' => $args['default'],
		'f' => $args['force_default'] ? 'y' : false,
		'r' => $args['rating'],
	);
 
	$url = sprintf( 'http://%d.gravatar.com/avatar/%s', $gravatar_server, $email_hash );
 
	$url = add_query_arg(
		rawurlencode_deep( array_filter( $url_args ) ),
		set_url_scheme( $url, $args['scheme'] )
	);

修改也很简单,将上面的3604行修改为:

$url = sprintf( 'http://1.gravatar.com/avatar/%s', $email_hash );

那个服务器编号可以多试几个,测试的时候发现1是没有问题的,如果不能访问可以换2,3,4神马的。

admin

前段时间陈公子说blog打开速度太慢,当然不出意外肯定是大墙的问题。但是呢,又懒得改。直到最近实在无法忍受了就改改吧。

修改wp-includes目录下的pluggable.php 第2155行为:

2155
2156
2157
2158
2159
	if ( is_ssl() ) {
		$host = 'https://secure.gravatar.com';
	} else {
		$host = 'http://www.gravatar.com';
	}

继续阅读