Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial 急!!!隐藏路径问题

急!!!隐藏路径问题

Jun 23, 2016 pm 02:21 PM

url html

先举个例子 http://wenku.baidu.com/view/a4cee123de80d4d8d15a4fba.html
1.这是百度文库中的一个地址,我想知道a4cee123de80d4d8d15a4fba是得怎么出来的。
2.审查元素-下载按钮,
<a class="ic reader-download" href="###" data-toolsbar-log="download" alog-action="htmltoolbar.download"></a></div>
Copy after login
这段代码将下载链接隐藏了,是怎么做到的?
3.查看网页源代码,发现2中的那段代码也被隐藏了,怎么回事?
请大家给解释一下,谢谢!


回复讨论(解决方案)

1.或许人家就是存了一个这样的文件名的文件.或许服务器看到a4cee123de80d4d8d15a4fba后进行逆运算得出真实文件名,可能性很多
2.下载链接不一定要指向下载的文件的地址,因为可以把它当做一个按钮,点击时触发js来进行下载操作.
3.如果网页上对应位置是个空元素,页面载入时用js动态的添加内容 查看源代码就会发现是空的

上边说的很可能不准确,因为百度具体用了什么样的技术我并不能保证,我只能说,我说的那些可以实现类似的效果.并且推测是用js实现的
研究百度的做法不如研究下要实现什么样的效果需要怎么做来得快

1.或许人家就是存了一个这样的文件名的文件.或许服务器看到a4cee123de80d4d8d15a4fba后进行逆运算得出真实文件名,可能性很多
2.下载链接不一定要指向下载的文件的地址,因为可以把它当做一个按钮,点击时触发js来进行下载操作.
3.如果网页上对应位置是个空元素,页面载入时用js动态的添加内容 查看源代码就会发现是空的

上边说的很可能不准确,因为百度具体用了什么样的技术我并不能保证,我只能说,我说的那些可以实现类似的效果.并且推测是用js实现的
研究百度的做法不如研究下要实现什么样的效果需要怎么做来得快

我都研究了一下午了,就是不知道怎么隐藏地址啊。我就是想让别人怎么样都找不到我文件的文件名和地址。

最简单的方法:php生成下载链接的时候用base64encode一个filepath+time,下载链接类似与download.php?hash=xxxxxxxxxxxxxx,用户点击,你拿到hash之后ecode,如果time没有过期,header里给人家文件

$file = "/tmp/dummy.tar.gz";    header("Content-type: application/octet-stream");    header('Content-Disposition: attachment; filename="' . basename($file) . '"');    header("Content-Length: ". filesize($file));    readfile($file);
Copy after login

------------------------------------------------------AutoCSDN签名档------------------------------------------------------

码农场??码农播种代码、放牧思想的农场! 




1.或许人家就是存了一个这样的文件名的文件.或许服务器看到a4cee123de80d4d8d15a4fba后进行逆运算得出真实文件名,可能性很多
2.下载链接不一定要指向下载的文件的地址,因为可以把它当做一个按钮,点击时触发js来进行下载操作.
3.如果网页上对应位置是个空元素,页面载入时用js动态的添加内容 查看源代码就会发现是空的

上边说的很可能不准确,因为百度具体用了什么样的技术我并不能保证,我只能说,我说的那些可以实现类似的效果.并且推测是用js实现的
研究百度的做法不如研究下要实现什么样的效果需要怎么做来得快

我都研究了一下午了,就是不知道怎么隐藏地址啊。我就是想让别人怎么样都找不到我文件的文件名和地址。

就是通过js跳转的

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Explain JSON Web Tokens (JWT) and their use case in PHP APIs. Apr 05, 2025 am 12:04 AM

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Describe the SOLID principles and how they apply to PHP development. Describe the SOLID principles and how they apply to PHP development. Apr 03, 2025 am 12:04 AM

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

How to automatically set permissions of unixsocket after system restart? How to automatically set permissions of unixsocket after system restart? Mar 31, 2025 pm 11:54 PM

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Explain the concept of late static binding in PHP. Explain the concept of late static binding in PHP. Mar 21, 2025 pm 01:33 PM

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

How to send a POST request containing JSON data using PHP's cURL library? How to send a POST request containing JSON data using PHP's cURL library? Apr 01, 2025 pm 03:12 PM

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...

Framework Security Features: Protecting against vulnerabilities. Framework Security Features: Protecting against vulnerabilities. Mar 28, 2025 pm 05:11 PM

Article discusses essential security features in frameworks to protect against vulnerabilities, including input validation, authentication, and regular updates.

Customizing/Extending Frameworks: How to add custom functionality. Customizing/Extending Frameworks: How to add custom functionality. Mar 28, 2025 pm 05:12 PM

The article discusses adding custom functionality to frameworks, focusing on understanding architecture, identifying extension points, and best practices for integration and debugging.

See all articles