天国之翼

You have a dream you gotta protect it.

Subscribe to RSS feed

RFID 黑客资料大放送 (百度网盘)

, ,

radiowar 大叔共享的资料 你们谢他吧 . 我就遍历来的. yes

Read more...

通过 img URL 实施 XSS 的解决方案 (js onload 预加载图片防止xss )

思路还行, 效果看实际应用.
调用代码没写好还是会出问题. 其实还是得靠服务器端来检测, 客户端最好的地方是对respone的数据进行规范的输出, 至于输入, 兄弟还是用服务端吧.

Read more...

跨过 天涯 ^_^

这地方可以来一发,等等吧!

newLISP你也行7 --- context

这张介绍newLISP开发中非常重要的context.
也是模块化开发的基础.

Read more...

继续修复POP3 library!

,

重新写了个宏

(define-macro (net-receive_blank int_socket sym-buffer max-bytes wait-string)
(letex (int_socket (eval int_socket)
sym-buffer sym-buffer
max-bytes max-bytes
)
(if (and (net-receive int_socket sym-buffer max-bytes) (= " " sym-buffer))
(net-receive int_socket sym-buffer max-bytes)
)
)
)

然后
(net-confirm-request)
(net-receive socket last-read 256)

changeto:

(net-confirm-request)
(net-receive_blank socket last-read 256)


同理
(net-confirm-request)
(net-receive_blank socket status 256)

changeto:

(net-confirm-request)
(net-receive_blank socket status 256)

ps:
真想吐槽, 这库有点不规整. 刚开始看不觉得, 改着改着我蛋疼了. 可能是作者只把这个当作一个临时的工具来用的.
就是send command 然后检索下信息.
代码这东西还是有风格的. 协议相关感觉必须清晰严谨些.


2012-08-29 14:35:13

修复了三个地方
具体代码看
http://code.google.com/p/winger-newlisp-toy/source/browse/modules/pop3.lsp


;func get-new-mail
(get-messages (++ (first status)) (nth 2 status) mail-dir);winger'fix1 "messages are counted from 1"


;winger'fix2 bypass " " of "+OK "
;call it after (net-confirm-request) when you want get "xxoo" from "+OK xxoo"
(define-macro (net-receive_blank int_socket sym-buffer max-bytes wait-string)
(letex (int_socket (eval int_socket)
sym-buffer sym-buffer
max-bytes max-bytes
)
(if (and (net-receive int_socket sym-buffer max-bytes) (= " " sym-buffer))
(net-receive int_socket sym-buffer max-bytes)
)
)
)

;func get-message-id
'iend (-- (find "@|;|\n|\r| |\t" (slice message ipos) 1)));winger'fix3 delete char '>'


newLISP POP3 库临时修复方法

, ,


估计是net-receive函数的问题
(net-receive socket status 256 " ")
这样最后一个是字符串的内容如果以空格结尾, 就会无限等待.
不知道作者当初写这个库的环境, 也许那时候的server返回的"+OK"后面是没有空格的.
不过我发现国内的POP3 服务器都是有带空格的.

;package return from POP Server.
;00000000: 2B 4F 4B 20 0D 0A +OK ..


协议里头没有对每个包进行标示.
www.ietf.org/rfc/rfc1939.txt


不过我测试了STAT和NOOP都会返回"+OK "
所以POP3所有的服务器实现, 应该都会在"+OK" 后加个空格.
库本身不用重写, 只是函数的问题.
具体看.
http://my.opera.com/freewinger/blog/2012/06/02/newlisp

nl论坛挂了今天, 所以提交不上去.

流逝

时间像把杀猪刀
而我却相反

newLISP你也行 --- Apply 和 Map

赶工一天,这章主要介绍批量操作列表元素.

Read more...

newLISP 是如何令我惊愕忘形的

, , , ...

关于翻阅功夫墙的几点技巧

1. https://www.google.com
https://www.google.com.hk
点击搜索结果中连接的时候还是会转到http://www.google.com/xxxxxxx
这个时候加个s 变成 https://www.google.com/xxxxxxx 就可以正常跳转了
还有就是缓存cache

2 App大法.
搜索 Google App Engine Proxy soft
or
http://code.google.com/hosting/search?q=gappproxy&projectsearch=Search+projects

之所以叫这个大法. 因为搭建起来以后基本没有任何问题了, 不在需要自己维护. 但是py的效率你知道的. 不过能用就行了, 速度不错, 任何网站都能上 就是google 不能搜索, 呵呵!
目前西厢就是用这个, 轮询N个 app , 所以如果你没有app 账号, 那选择西厢吧, 不过Y站 能少上就少上, 互相帮助.

3 各种免费VPN.
关注gfw 邮件列表, 经常放出.
我提供个以前经常用的.
http://www.ffvpn.com/

4 freeshell
类似此类的专门提供shell的服务器.
plink -N sshaccount@yourhosting.com -pw sshaccountpassword -D 127.0.0.1:2012
然后 服务器设置代理端口本地 2012.

5. 各种神奇国度的域名.
.co.il/
Blogspot.co.il
http://kazimirmajorinc.blogspot.co.il/

嘿嘿,惊讶吗.
以色列人逆天啦.god bless!