Is it possible to download PHP script from a web page with wget?

前端 未结 4 1351
情歌与酒
情歌与酒 2020-12-18 14:24

If I try wget it downloads the resolved page. But I want to download the original script. Is this possible?

相关标签:
4条回答
  • 2020-12-18 14:56

    "Officially" - no.
    Through "hacking" - yes. If a website allows to download some content via "/download.php?src=path_to_file" script, AND it was unproperly coded, then you could request to download, say, index.php file.

    Check this out: https://www.owasp.org/index.php/Path_Traversal

    0 讨论(0)
  • 2020-12-18 14:57

    This is not possible, the webserver doesn't output the PHP script. The webserver parses it serverside and writes the response of that to the client.

    0 讨论(0)
  • 2020-12-18 14:58

    No, and thank goodness for that. The server is completely in control of how it responds to your HTTP requests.

    Strictly speaking, you can't tell whether it's PHP on the other end of the wire in the first place.

    0 讨论(0)
  • 2020-12-18 15:04

    No this is not possible, and would be a huge security issue if it was.

    The only way this would be possible is if the web server (Apache) was not configured correctly

    0 讨论(0)
提交回复
热议问题