wifi

Internet check over android.net.NetworkCapabilities not working

别说谁变了你拦得住时间么 提交于 2020-04-29 09:28:47
问题 I have a question about android.net.NetworkCapabilities.NET_CAPABILITY_INTERNET . According to the JavaDocs this "indicates that this network should be able to reach the internet". Unfortunately this seems not to work properly - or I do something wrong here. I outputed the value of capabilities for three different Wi-Fi networks: A Wi-Fi with internet access. A Wi-Fi without internet access (I manually disabled the internet here). A public hotspot (the "Telekom" hotspot) In all three cases

WiFi注册网页可能可以简单绕过?猜测把DNS改成8.8.8.8就绕过了?下次试试看。

混江龙づ霸主 提交于 2020-04-13 19:32:03
【今日推荐】:为什么一到面试就懵逼!>>> 我记得这个重定向的网页,这种概念叫做 Captive portal , 曾经猜测他的原理,一定有点名堂,明明WiFi本身不需要密码,DHCP都通过了的,他在什么层次拦截我的通信内容? 猜测一:我觉得要是严格的做,就得检查每个ip包里的内容,如果是目标是wifi,那就允许,否则就拒绝,但是特例是,如果是http,那么就redirect到自己的认证网页。 猜测二:要是不严格,那么WiFi搞个DNS欺骗浏览器就马马虎虎了。 稍微查了一下,我只看到人说这种产品是用DNS欺骗的方案的,源码我没仔细看,估计细细看这个 文件 就能确定。github上还有好多,用Captive Portal这个关键字就能查到好多。估计对于做系统管理的人都知道,我是后知后觉。 DNS欺骗的意思是, 当你访问 www.xxx.com 时,你实际是暗地里向WiFi内部的DNS server查询这个网站的ip地址,那他就骗你说ip是自己,而且他又做了一个认证的网页。而这个DNS server的ip是在接入时由WiFi的DHCP server提供的。 嘿,如果真的是这样,那我下次可得试试看改变DNS server是不是就绕过去了, 到iPhone/Android里的WiFi详细设定里,把DNS改成8.8.8.8试试看,这个ip是google的一个dns服务器

WlanHostedNetworkStartUsing or how windows 10 builtin mobile hotspot works

回眸只為那壹抹淺笑 提交于 2020-04-10 16:49:53
问题 I'm trying to write a program which creates hotspot. I'm using WlanHostedNetworkStartUsing but it returns ERROR_INVALID_STATE . And yet when I call WlanHostedNetworkInitSettings it returns succsess. According to documemtation (last paragraph in Remarks section) it should to create a virtual wireless connection under Control Panel\Network and Internet\Network and Sharing Center but it doesn't. I've searching a bit and found this: When I run netsh wlan show drivers it puts: Driver : Intel(R)

WlanHostedNetworkStartUsing or how windows 10 builtin mobile hotspot works

ぃ、小莉子 提交于 2020-04-10 16:47:49
问题 I'm trying to write a program which creates hotspot. I'm using WlanHostedNetworkStartUsing but it returns ERROR_INVALID_STATE . And yet when I call WlanHostedNetworkInitSettings it returns succsess. According to documemtation (last paragraph in Remarks section) it should to create a virtual wireless connection under Control Panel\Network and Internet\Network and Sharing Center but it doesn't. I've searching a bit and found this: When I run netsh wlan show drivers it puts: Driver : Intel(R)

Android判断设备网络连接状态,并判断连接方式

╄→гoц情女王★ 提交于 2020-04-09 20:01:12
现在是互联网高速发展的时代,Android开发过程中,对于一个需要连接网络的Android设备,对设备的网络状态检测是很有必要的!好多的App都需要连接网络,所以抽时间就写了一个检测Android设备网络连接状态的demo! 这个小例子可以判断设备是否已经连接网络,并且在连接网络的状态下可以判断是wifi无线连接还是GPRS手机网络连接,这样就可以在不同的网络连接下去调用不同的方法,处理不同的事情,比如一个有下载功能的app可以判断只有当wifi连接的是后去下载文件,GPRS流量连接则不下载! 在没有连接的网络的情况下会弹出一个对话框,让用户选择是否去设置网络连接! 贴一下主要代码: /** * 检测网络是否连接 * @return */ private boolean checkNetworkState() { boolean flag = false; //得到网络连接信息 manager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); //去进行判断网络是否连接 if (manager.getActiveNetworkInfo() != null) { flag = manager.getActiveNetworkInfo().isAvailable(); } if (!flag)

黑客有办法让你的iPhone自动连上钓鱼wifi

我怕爱的太早我们不能终老 提交于 2020-03-22 00:57:35
3 月,跳不动了?>>> 近年来,越来越多因为蹭免费网络而泄露银行账户密码或者支付宝密码的案件发生,警察蜀黍提醒广大市民注意三点: 1.谨慎连接公共WiFi: 在机场、星巴克、麦当劳和星级酒店等有免费WiFi的公共场合,不法分子会伪造免费wifi,进行钓鱼犯罪,对此,市民要明察秋毫,问清楚工作人员哪个才是官方wifi才进行连接。 2.不要使用手机浏览器登陆手机银行和支付宝: 黑客则会引导用户至山寨钓鱼网站,或者设置钓鱼网站,从而获取账号及密码。因此,市民最好通过银行官网网页,或者手机银行客户端登录,这两种渠道均经过了层层加密,黑客想要破解账户信息并不容易。 3.手机平板电脑上网最好都设置防火墙。 但是,尽管市民都做到以上三点,还是有可能防不胜防, 黑客有办法在不知不觉中让你的iPhone、iPad自动连上他的钓鱼WiFi。 砖家解释,这是极有可能的: “只要黑客搭建一个你之前就连接过的WiFi,ssid与加密方式与之前一样,这样你的设备搜到该WiFi之后就会自动连接。 举个例子,相信大部分人设备都连接过那个没有加密的CMCC,我在你周围搭建一个CMCC无加密的热点,你的设备就会自动连接过来,这样我们就是同一个局域网了,然后就可以获取你的各种隐私了。” 而实际上,情况比上文砖家所想象的还要糟糕,还要砖家补充到: “无线设备为了加快连接速度,会对外广播过它连接过什么无线,ssid是多少

How to disable captive network assistant into android device?

爷,独闯天下 提交于 2020-03-18 15:44:11
问题 When a user connects to an open WiFi with a Captive Portal, the Android device will open a browser instance with the captive portal/login page. We want to disable it, since we used an app for login purposes. I came across the CaptivePortal Class into Android Marshmallow. Can I use it to disable network? Class Name: android.net.CaptivePortal Method Name: ignoreNetwork How can I use the above class and method to disable auto launch of captive portal on WiFi? 回答1: try this: private void

How to know whether Android is connected to WiFi or ethernet? [closed]

自闭症网瘾萝莉.ら 提交于 2020-03-18 08:56:27
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago . How to know whether I'm connected to WiFi or ethernet in Android? In Android OS this is notified for thess icons Does it exist a way to know it programmatically? 回答1: http://developer.android.com/training/basics/network-ops/managing.html ConnectivityManager cm =

how to get the IP of the wifi hotspot in Android?

▼魔方 西西 提交于 2020-03-17 05:16:30
问题 As the title says... I'm trying to be able to get the IP of the wifi iface when it is configured as hotspot. Ideally, I would like to find something that works for all the phones. Of course, the WifiManager is useless when it comes to get info from the AP. Luckily, I've been able to get the IPs of all the interfaces by doing this: public String getLocalIpAddress() { try { for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface

how to get the IP of the wifi hotspot in Android?

本秂侑毒 提交于 2020-03-17 05:16:09
问题 As the title says... I'm trying to be able to get the IP of the wifi iface when it is configured as hotspot. Ideally, I would like to find something that works for all the phones. Of course, the WifiManager is useless when it comes to get info from the AP. Luckily, I've been able to get the IPs of all the interfaces by doing this: public String getLocalIpAddress() { try { for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) { NetworkInterface