如何找到正在运行Apache的版本没有进入命令行? [英] How do I find the version of Apache running without access to the command line?

查看:160
本文介绍了如何找到正在运行Apache的版本没有进入命令行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要或者找到一个文件,在其中的版本是连接codeD或轮询它在网路的一个方式,以便它揭示了它的版本。该服务器运行在主机谁也不会为我提供命令行访问,但我可以通过FTP浏览安装位置。

I need to either find a file in which the version is encoded or a way of polling it across the web so it reveals its version. The server is running at a host who will not provide me command line access, although I can browse the install location via ftp.

更新1:

我曾尝试HEAD和没有得到报道的版本号。

I have tried HEAD and do not get a version number reported.

如果我尝试缺页获得404被拦截,并返回股份页上它具有无服务器信息。我想这点服务器被硬化。

If I try a missing page to get a 404 it is intercepted and a stock page is returned which has no server information on it. I guess that points to the server being hardened.

仍然没有接近...

更新2:
我把PHP文件起来的建议,但我不能浏览并不能完全弄清楚,将装载它的URL路径。在任何情况下,我得到很多访问被拒绝的消息,并同一股票404页。我正在一些安慰知道服务器quuite有力保障。

Update 2: I put a php file up as suggested but I can't browse to it and can't quite figure out the URL path that would load it. In any case I am getting plenty of access denied messages and the same stock 404 page. I am taking some comfort from knowing that the server is quuite robustly protected.

推荐答案

连接到端口80的主机上,并将其发送

The method

Connect to port 80 on the host and send it

HEAD / HTTP/1.0

这需要后跟回车+换行两次

This needs to be followed by carriage-return + line-feed twice

您将得到这样的事情

HTTP/1.1 200 OK
Date: Fri, 03 Oct 2008 12:39:43 GMT
Server: Apache/2.2.9 (Ubuntu) DAV/2 SVN/1.5.0 PHP/5.2.6-1ubuntu4 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0
Last-Modified: Thu, 02 Aug 2007 20:50:09 GMT
ETag: "438118-197-436bd96872240"
Accept-Ranges: bytes
Content-Length: 407
Connection: close
Content-Type: text/html; charset=UTF-8

您可以再从服务器中提取Apache的版本:头文件

You can then extract the apache version from the Server: header

您可以使用它自带一个充满HEAD工具安装Perl的 LWP的库,如:

You could use the HEAD utility which comes with a full install of Perl's LWP library, e.g.

HEAD http://your.webserver.com/

或者,使用卷曲工具,例如

 curl --head http://your.webserver.com/

您也可以使用浏览器扩展,使您可以查看服务器的标题,如活HTTP头萤火虫了解Firefox或的 提琴手的IE

You could also use a browser extension which lets you view server headers, such as Live HTTP Headers or Firebug for Firefox, or Fiddler for IE

最后。如果你使用的是Windows,并闲来无事在您的处置,打开命令提示符(开始菜单 - >运行,输入cmd,然后preSS回报),然后键入这个

Finally. if you're on Windows, and have nothing else at your disposal, open a command prompt (Start Menu->Run, type "cmd" and press return), and then type this

telnet your.webserver.com 80

然后键入(小心,你的角色将不回显)

Then type (carefully, your characters won't be echoed back)

HEAD / HTTP/1.0

preSS回报两次,你会看到服务器头。

Press return twice and you'll see the server headers.

正如cfeduke和Veynom提到的,服务器可以被设置为返回服务器在有限的信息:报头。试着在上传一个PHP脚本到你的主机与此

As mentioned by cfeduke and Veynom, the server may be set to return limited information in the Server: header. Try and upload a PHP script to your host with this in it

<?php phpinfo() ?>

请求与Web浏览器页面,你应该看到报道有Apache的版本。

Request the page with a web browser and you should see the Apache version reported there.

您也可以尝试使用 PHPShell 有大约一捅,尝试像

You could also try and use PHPShell to have a poke around, try a command like

/usr/sbin/apache2 -V

这篇关于如何找到正在运行Apache的版本没有进入命令行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆