[lxml-dev] Detect JSON format by lxml?
Aug. 24, 2010
11:50 a.m.
Hi, everybody. I want to write a python script to do some JavaScript-Hijacking detection. (http://www.net-security.org/article.php?id=995) I know I can detect it by the response header Content-Type. However, some web application will response some JSON data as a header of Plantext or Html, not JSON. There are 2 types of JSON response that may face the JavaScript-Hijacking attack: #############case 1############## _callback({SOME_JSON_DATA}); #############case 2############## var userAddress={SOME_JSON_DATA}; try{_callback(userAddress);}catch(e){} I seems hard to filter these 2 cases from so many http responses. I am wondering if there is some of lxml's function can do such detection. Thanks in advance.
5632
Age (days ago)
5632
Last active (days ago)
0 comments
1 participants
participants (1)
-
hookits