如何在基于JS的聊天室中找到用户的IP? [英] How to find the IP of a user in a JS based chat room?

查看:96
本文介绍了如何在基于JS的聊天室中找到用户的IP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在基于javascript的聊天室中查找用户IP的算法或代码是什么?

What is the algorithm or the code to find the IP of a user while in a javascript based chatroom?

登录到一个这样的房间,我被告知有人知道我的IP以及我正在使用的操作系统,只需在原始站点代码中插入一个简单的基于JS的代码,而不会有任何违法行为......

logging into one such room and i am told that someone knows my IP and also the OS i am using just by inserting a simple JS based code in the original site code withouth any illegal doing.....

帮助我我很好奇。

谢谢!

推荐答案

他很有可能插入一个< img> 标记,指向一个脚本,该脚本显示请求它的人的IP和用户代理。这实际上是论坛签名等中的一个常见笑话,可以让人不知道。

He most likely inserted an <img> tag pointing to a script that displays the IP and user agent of whoever requested it. This is actually a common joke in forum signatures etc. to confuse people not knowing it.

http://www.danasoft.com/vipersig.jpg

除非脚本记录IP或他正在监视服务器的日志文件脚本位于他实际上看不到你的IP地址。

Unless the script is logging IPs or he's monitoring the logfiles of the server where the script is located he cannot actually see your IP address.

这篇关于如何在基于JS的聊天室中找到用户的IP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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