2014-07-23 17:58:20

2014-04-15 11:10:49

PHP RC4加密Demo

PHP的源码和前面发 的那个JAVA的RC4加密基本连参数都是一样的,PHP加密后两边都可以直接解密。 源码: <?php function rc4($key_str, $data_str) { // convert input string(s) to array(s) $key = array (); $data = array (); for($i = 0; $i < strlen ( $key_str ); $i ++) { $key [] = ord ( $key_str {$i} ); } for($i = 0; $i < strlen ( $data_str ); $i ++) { $data [] = ord ( $data_str {$i} ); } // prepare key $state = array ( 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31, 32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47, 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, 64,65,66,67

2014-04-02 13:03:28

解决PHP curl https时error 77(Problem with reading the SSL CA cert (path? access rights?))

服务器环境为CentOS,php-fpm,使用curl一个https站时失败,打开curl_error,捕获错误:Problem with reading the SSL CA cert (path? access rights?) 解决方案: 1. sudo yum install ca-certificates (无论有没有,安装确认一下) 2. 重启php-fpm,这步比较重要,更改底层的东西时一定要重启一下 3. curl时设置:curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0)

2014-02-16 02:59:41

PHP reflection反射应用

Java类反射应用得非常广泛几乎是所有框架的最核心部分,PHP程序员似乎从不关心反射。尝试着用java的思想去理解php的反射,跟java基本上基本一致。参考了php手册:http://www.php.net/manual/zh/book.reflection.php。 ReflectTest.php: <?php class ReflectTest { /** * 用户ID */ private $userId; /** * 用户名 */ private $userName; /** * 用户密码 */ private $password; /** * 用户邮箱 */ private $email; /** * 用户QQ号码 */ private $qq; /** * 登陆次数 */ private $loginTimes; public function ReflectTest(){ } public function __construct($userId,$userName,$password){ $this->userId = $userId; $this->userName = $userName; $this->password = $password;

2014-02-16 00:11:42

OldCMS | 版本 1.0 | 开源、简单、安全的PHP开发框架

官方网站:http://oldcms.com/ 1. 程序文件组织 | install/ /* 数据库文件、服务器Rewrite规则 */ | oldcms.sql /* 数据库文件 */ | rewrite.txt /* Rewrite规则(Apache,Nginx) */ | libs/ /* Smarty程序目录 */ | source/ /* 核心类库、方法 */ | class/ /* 类库 */ | Captcha.class.php /* 验证码类 */ | DB.class.php /* 数据库操作类 */ | Image.class.php /* 图片上传、缩略图类 */ | Pager.class.php /* 分页类 */ | PHPMailer.class.php /* 邮件类 */ | Smtp.class.php /* 邮件类 */ | User.class.php

2013-12-31 00:18:14

Reverse IP Domain CheckⅡ

<?php /** * Created BY Saline * Date : 13-7-23 * Time : 上午10:09 * FileName : domain.php * 感谢独自等待提供类似代码 */ print_r(' <pre> +-------------------------------------------------+ Reverse IP Domain CheckⅡ Site:http://fuck.0day5.com/ Exploit BY: Saline Time:' . date('Y-m-d') . ' +-------------------------------------------------+ </pre> '); error_reporting(7); $url = 'http://domains.yougetsignal.com//domains.php'; $referer = 'http://domains.yougetsignal.com/'; if(isset($_P

2013-11-28 16:26:36

php4fun.sinaapp.com PHP挑战通关攻略

challenge 1   #GOAL: get password from admin; error_reporting(0); require 'db.inc.php'; function clean($str){ if(get_magic_quotes_gpc()){ $str=stripslashes($str); } return htmlentities($str, ENT_QUOTES); } $username = @clean((string)$_GET['username']); $password = @clean((string)$_GET['password']); $query='SELECT * FROM users WHERE name=\''.$username.'\' AND pass=\''.$password.'\';'; $result=mysql_query($query); if(!$result || mysql_num_rows($result) < 1){ die('Invalid password!