예제 #1
0
def all_stops(cur_session):
    get_all = pokemon_pb2.get_all()
    walk = sorted(getNeighbors())
    get_all.unk1 = 2
    get_all.unk3 = 2212820743501119519 - randint(0, 999)
    get_all.unk12 = randint(0, 999999)
    lat, lon, fl = location.get_location_coords()

    req1 = get_all.b.add()
    req1.id = 106
    req1.c.msg = ''.join(map(encode, walk))
    req1.c.lat = lat
    req1.c.lon = lon
    req2 = get_all.b.add()
    req2.id = 126
    req5 = get_all.b.add()
    req5.id = 4
    req3 = get_all.b.add()
    req3.id = 129
    req4 = get_all.b.add()
    req4.id = 5
    req4.c.msg = '05daf51635c82611d1aac95c0b051d3ec088a930'  #static

    get_all.sess.session_hash = cur_session.ses.session_hash  #12
    get_all.sess.session_live = cur_session.ses.session_live  #12
    get_all.sess.session_id = cur_session.ses.session_id  #12
    get_all.unk7 = lat
    get_all.unk8 = lon
    get_all.unk9 = 0x4049000000000000
    return get_all.SerializeToString()
예제 #2
0
def all_stops(cur_session):
	get_all = pokemon_pb2.get_all()
	walk = sorted(getNeighbors())	
	get_all.unk1=2
	get_all.unk3=2212820743501119519-randint(0,999)
	get_all.unk12=randint(0,999999)
	lat,lon,fl=location.get_location_coords()

	req1 = get_all.b.add()	
	req1.id = 106
	req1.c.msg=''.join(map(encode, walk))
	req1.c.lat=lat
	req1.c.lon=lon
	req2 = get_all.b.add()
	req2.id = 126
	req5 = get_all.b.add()
	req5.id = 4
	req3 = get_all.b.add()
	req3.id = 129
	req4 = get_all.b.add()
	req4.id = 5
	req4.c.msg = '05daf51635c82611d1aac95c0b051d3ec088a930' #static
	
	get_all.sess.session_hash = cur_session.ses.session_hash #12
	get_all.sess.session_live = cur_session.ses.session_live #12
	get_all.sess.session_id = cur_session.ses.session_id #12
	get_all.unk7=lat
	get_all.unk8=lon
	get_all.unk9=0x4049000000000000
	return get_all.SerializeToString()
예제 #3
0
def walk_random():
	COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE=location.get_location_coords()
	COORDS_LATITUDE=location.l2f(COORDS_LATITUDE)
	COORDS_LONGITUDE=location.l2f(COORDS_LONGITUDE)
	COORDS_ALTITUDE=location.l2f(COORDS_ALTITUDE)
	COORDS_LATITUDE=COORDS_LATITUDE+config.steps
	COORDS_LONGITUDE=COORDS_LONGITUDE+config.steps
	location.set_location_coords(COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE)
예제 #4
0
def walk_random_l(pok):
    COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE = location.get_location_coords(
    )
    COORDS_LATITUDE = location.l2f(pok[1])
    COORDS_LONGITUDE = location.l2f(pok[1])
    COORDS_ALTITUDE = location.l2f(COORDS_ALTITUDE)
    location.set_location_coords(COORDS_LATITUDE, COORDS_LONGITUDE,
                                 COORDS_ALTITUDE)
예제 #5
0
def walk_random():
    COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE = location.get_location_coords(
    )
    COORDS_LATITUDE = location.l2f(COORDS_LATITUDE)
    COORDS_LONGITUDE = location.l2f(COORDS_LONGITUDE)
    COORDS_ALTITUDE = location.l2f(COORDS_ALTITUDE)
    COORDS_LATITUDE = COORDS_LATITUDE + config.steps
    COORDS_LONGITUDE = COORDS_LONGITUDE + config.steps
    location.set_location_coords(COORDS_LATITUDE, COORDS_LONGITUDE,
                                 COORDS_ALTITUDE)
예제 #6
0
파일: dirty.py 프로젝트: ypchiu/pokego
def walk_random():
	COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE=location.get_location_coords()
	COORDS_LATITUDE=location.l2f(COORDS_LATITUDE)
	COORDS_LONGITUDE=location.l2f(COORDS_LONGITUDE)
	COORDS_ALTITUDE=location.l2f(COORDS_ALTITUDE)
	random_Angle=random.random()*math.pi*2	
	COORDS_LATITUDE=COORDS_LATITUDE+(config.steps*math.sin(random_Angle))
	COORDS_LONGITUDE=COORDS_LONGITUDE+(config.steps*math.cos(random_Angle))
	print '[+] perform random walk %.7f %.7f'%(COORDS_LATITUDE,COORDS_LONGITUDE)
	location.set_location_coords(COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE)
예제 #7
0
파일: dirty.py 프로젝트: ypchiu/pokego
def walk_circle(edge):
	a=2*math.pi/edge
	i=1
	print '[+] circular walk'
	while (edge > 0):		
		COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE=location.get_location_coords()
		COORDS_LATITUDE=location.l2f(COORDS_LATITUDE)
		COORDS_LONGITUDE=location.l2f(COORDS_LONGITUDE)
		COORDS_ALTITUDE=location.l2f(COORDS_ALTITUDE)
		COORDS_LATITUDE=COORDS_LATITUDE+(config.steps*math.sin(a*i))
		COORDS_LONGITUDE=COORDS_LONGITUDE+(config.steps*math.cos(a*i))
		#print '[+] perform circular walk %.7f %.7f'%(COORDS_LATITUDE,COORDS_LONGITUDE)
		location.set_location_coords(COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE)
		edge=edge-1
		i=i+1
		time.sleep(2)
	print '[+] done circle'
예제 #8
0
파일: dirty.py 프로젝트: ypchiu/pokego
def work_with_stops(current_stop,ses,new_rcp_point):
	COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE=location.get_location_coords()
	TARGET_LATITUDE=location.l2f(current_stop[1])
	TARGET_LONGITUDE=location.l2f(current_stop[2])
	TARGET_ALTITUDE=location.l2f(0x4049000000000000)
	Kinder= logic.gen_stop_data(ses,current_stop)
	tmp_api=api.use_api(new_rcp_point,Kinder)
	#proto_all=logic.all_stops(local_ses)
	#api.use_api(new_rcp_point,proto_all)
	#walk_random()
	#time.sleep(3)
	try:
		#walk_random()
		#time.sleep(3)
		if tmp_api is not None:
			map = pokemon_pb2.map()
			map.ParseFromString(tmp_api)
			st= map.sess[0].status
			config.earned_xp+=map.sess[0].amt
			if st==4:
				print "[!] +%s (%s)"%(map.sess[0].amt,config.earned_xp)
			elif st==3:
				print "[!] used"
				#item full
			elif st==2:
				print "[!] charging"
			elif st==1:
				print "[!] walking.."
				#walk_random()
				expPerHour()
				time.sleep(14)
				work_with_stops(current_stop,ses,new_rcp_point)
			else:
				print "[?]:",st
		else:
			print '[-] tmp_api empty'
	except:
		print '[-] error work_with_stops - Trying to restart process'
		restartProcess()
예제 #9
0
def walk_random_l(pok):
	COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE=location.get_location_coords()
	COORDS_LATITUDE=location.l2f(pok[1])
	COORDS_LONGITUDE=location.l2f(pok[1])
	COORDS_ALTITUDE=location.l2f(COORDS_ALTITUDE)
	location.set_location_coords(COORDS_LATITUDE, COORDS_LONGITUDE, COORDS_ALTITUDE)