Analyze Baidu Search Results link?url= parameter analysis (full) _php tutorial

Source: Internet
Author: User
Tags php form php source code
A few days ago wrote a can get to Baidu jump after the website of the article, in Baidu a bit, someone also studied Baidu Link?url=.

The following results are likely to be obtained:

1, encryption method according to: Random + input dwell time + snapshot address to encrypt
2, the entire code should have three parts: 1, the time of the search term, 2, search keywords; 3, a randomly generated uniqueness identification code.
3, in any environment or browser under the Url= last have a similar code
From the above results of other people's research can be known, "there is a similar code at the end" is relatively available, so start with this.
My search for "Enenba" found that my first search result URL has a piece of code is the same, that is
Http://www.baidu.com/link?url=............ebac5573358cc3c0659257bfcf54763ec1c5ecff3b3fbd1d4c
All search results have a section of code ebac5573358cc3c0659257bfcf54 (search n times found)
The 763ec1c5ecff3b3fbd1d4c at the end of the back look like the real URL to the search results. (verified as ciphertext of the real URL)
This is how I verify:
1, first Baidu search www.php100.com
First result Link:
Http://www.baidu.com/link?url=............ebac5573358cc3c0659257bfcf546427d385fef6656de2404d6843da27
See the front of several 6427d385fef6656de2404d6843da27
2, then Baidu search www.hao123.com
First result Link:
Http://www.baidu.com/link?url=............ebac5573358cc3c0659257bfcf54 6427d385e6ff7a6de0434d6843da
See the front of several 6427d385e6ff7a6de0434d6843da
......
A number of searches for n sites found that the first few of the domain name is "www." , the cipher is all 6427d385.
and www. Is four characters, ciphertext 6427d385 is eight characters. Can know two characters of ciphertext equals URL one character.
Then wrote a php form query and get the ciphertext part, easy to view later.
Out of a PHP source code:
Copy CodeThe code is as follows:



<title>Search Baidu link?ulr= Real link form</title>


/*
Getrealurl get 301, 302 redirect URL by enenba.com
@param str $url Query
$return the true URL of str-directed URL
*/
function Getrealurl ($url) {
$header = Get_headers ($url, 1);
if (Strpos ($header [0], ' 301 ') | | strpos ($header [0], ' 302 ')) {
if (Is_array ($header [' location ')]) {
return $header [' Location '][count ($header [' Location '])-1];
}else{
return $header [' Location '];
}
}else {
return $url;
}
}
$input = '';
$url = isset ($_get[' url ')? $_get[' URL ']: ';
if (empty ($url)) exit ($input);
$urlreal = Getrealurl ($url);
echo ' Real URL is: '. $urlreal;
$urlreal = LTrim ($urlreal, ' http://');
$search = '/ebac5573358cc3c0659257bfcf54 ([0-9a-f]+)/I ';
Preg_match ($search, $url, $r);
$url _encode = $r [1]; Unset ($R);
Echo '
The ciphertext section is: '. $url _encode. '
';
$urlreal _arr = Str_split ($urlreal);
$url _encode_arr = str_split ($url _encode,2);
Echo '
';
Echo $input;
?>

Previous online example: Punch test
Study again tomorrow, to be continued ....
The site in advance declared: Cnbeta on the article is not my release. I analyze only according to their own ideas to study, but to seek a process, as to whether there is no result, I have a conclusion, we do not spray.
After an article, carefully read the Baidu results URL of the long code, found that the ciphertext only the number and a to F letter composition, that is, hexadecimal code.
Hex is from 0->1->2->3->4->5->7->8->9->a->b->c->d->e->f
I collected a series of URLs and counted the first bit of code.
Ebac5573358cc3c0659257bfcf54xx ...
XX This code corresponds to the URL is this
Copy CodeThe code is as follows:
0 @ P 63
! 1 A Q 62
"2 B" B "R 61
# 3 C Ten S 60
$4 D-T-D-T 67
% 5 E 66 U E
& 6 F 65 F V
' 7 G W 64
(3b 8 2b H 1b x 0b H 7b X 6b
) 3a 9 2a I 1a y 0a I 7a y 6a
* 39:29 J Z 69
+ 38; K [k 78 {68
, 3f < 2f L 1f \ 0f L 7f | 6f
-3e = 2e m 1e] 0e M 7e} 6e
. 3d > 2d N 1d ^ 0d N 7d ~ 6d
/3c? 2c o 1c _ 0c o 7c 6c

The discovery should be a character in an ASCII code table, but the order should be confusing. But it's all in this one. This is true in the system:
3->2->1->0->7->6->5->4->b->a->9->8->f->e->d->c
Four-bit one descending, see the overall is diminishing.
But it is puzzling that from _ to ' in ASCII is adjacent corresponding 0c and 73 are jumping. No way, don't see the pattern, and then look at the second bit of this set of code
Ebac5573358cc3c0659257bfcf54xxyy ....
yy This bit of code corresponds to the URL is this
Copy CodeThe code is as follows:

0 @ P 20
! 1-A-Q-A-Q 21
"2, B, 22
# 3 + C + + s 23
$4, D-Si-T-D-24
% 5 E u 25
& 6 F, 26 V
' 7 g (27 W)
(8 x H 28 x
) 9 I-29 y
* 7A:6A J 5a Z 4a J 3a Z 2a
+ 7b; 6b K 5b [4b K 3b {2b
, 7c < 6c L 5c \ 4c L 3c | 2c
-7d = 6d m 5d] 4d M 3d} 2d
. 7e > 6e N 5e ^ 4e N 3e ~ 2e
/7f? 6f o 5f _ 4f o 3f 2f

The second bit of this group of Secrets is well followed by the hexadecimal increment order.
0->1->2->3->4->5->7->8->9->a->b->c->d->e->f
The overall is diminishing.
And look at the third group.
Ebac5573358cc3c0659257bfcf54xxyyzz ....
ZZ This code corresponds to the URL is this
Copy CodeThe code is as follows:
0 94 @ a4 p B4 ' C4 p d4
! 1 a a5 q b5 a c5 q d5
"2 A6 B r B6 b c6 r d6
# 3 A7 C S B7 C C7 s D7
$4 D A0 T B0 D C0 t D0
% Bayi 5 A1 e u b1 e c1 u d1
& 6 A2 v B2 F C2 v D2
' 7 A3 g W B3 G C3 w D3
(8c 8 9c h ac x BC h cc X DC
) 8b 9 9b i ab Y bb i cd Y DD
* 8e:9e J AE Z be j ce z de
+ 8f; 9f k af [bf k CF {DF
, < 98 l A8 \ B8 L C8 | D8
-B9 M C9} D9 (A9)
. 8a > 9a N aa ^ ba N ca ~ da
/8b? 9b o ab _ bb o CB db

Does not explain the upper order:
4->5->6->7->0->1->2->3->4->c->b->e->f->8->9->a->b
The overall is incremental
Have not looked at the back of the digits, but probably can know is four bits for a group of confusion hexadecimal confusion, as to whether the increment or decrement, need a certain amount of data to judge.
Next collect 1000 URL data to judge.
Cond....

http://www.bkjia.com/PHPjc/326056.html www.bkjia.com true http://www.bkjia.com/PHPjc/326056.html techarticle a few days ago wrote a can get to Baidu jump after the website of the article, in Baidu a bit, someone also studied Baidu Link?url=. The following results may be obtained: 1, the encryption method according to ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.