Latest Episode
 

Go Back   Keith and The Girl Forums Keith and The Girl Forums Talk Shite

Talk Shite General discussion

Reply
 
Thread Tools Display Modes
Old 06-22-2009, 01:59 AM   #531 (permalink)
Senior Member
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,659
This isn't done and it's barely passable as workable code, but it runs and gives you the device tokens from the feedback service.

Code:
#!/usr/bin/env python2.6

import socket, ssl, json, struct

def uniquify(seq):
	set = {}
	map(set.__setitem__, seq, [])
	return set.keys()


theCertfile = 'dist_cert.pem'
theHost = ('feedback.push.apple.com', 2196)
#theCertfile = 'dev_cert.pem'
#theHost = ('feedback.sandbox.push.apple.com', 2196)
ssl_sock = ssl.wrap_socket(socket.socket(socket.AF_INET, socket.SOCK_STREAM), certfile=theCertfile)
ssl_sock.connect(theHost)
f = ssl_sock.read(2048) #Not sure what size this should be, I think 2 MB should be enough
ssl_sock.close()

array = f.split(' ')
array.pop(0)

tokenstring = ''
tokenarray = []

for hextoken in array:
	if len(hextoken) == 37:
		unpacked = struct.unpack('!BH34B', hextoken)
		for value in unpacked:
			converted = hex(value)[2:]
			if (len(converted) % 2) == 1:
			    converted = '0' + converted
			tokenstring = tokenstring + converted
			
		tokenstring = tokenstring[0:64]
	elif len(hextoken) == 32:
		unpacked = struct.unpack('!BH29B', hextoken)
		for value in unpacked:
			converted = hex(value)[2:]
			if (len(converted) % 2) == 1:
			    converted = '0' + converted
			tokenstring = tokenstring + converted
			
		
	tokenarray.append(tokenstring)
	tokenstring = ''
	

print uniquify(tokenarray)

Last edited by hayroob; 06-22-2009 at 11:51 AM.
(Offline)   Reply With Quote
Old 06-22-2009, 09:19 PM   #532 (permalink)
Senior Member
 
Sean7341's Avatar
 
Join Date: Jan 2006
Posts: 132
Quote:
Originally Posted by hayroob View Post
$50 to KATG, confirmed by keith, and apologize to keith for wasting time that I should be devoting to katg work.
Haha alright. I never meant to be a douche or anything. I was thinking maybe $2 or $5. But alright, I'll wait for the actual release. I'm sorry for wasting time, it's my fault for typing my udid wrong, I didn't know about those apps that could email them for you.
(Offline)   Reply With Quote
Old 06-22-2009, 10:11 PM   #533 (permalink)
Senior Member
 
Subsonix's Avatar
 
Join Date: Aug 2006
Location: Melbourne, Australia
Posts: 571
Quote:
Originally Posted by Sean7341 View Post
Haha alright. I never meant to be a douche or anything. I was thinking maybe $2 or $5. But alright, I'll wait for the actual release. I'm sorry for wasting time, it's my fault for typing my udid wrong, I didn't know about those apps that could email them for you.
Was that some sort of apology?
(Offline)   Reply With Quote
Old 06-23-2009, 02:28 PM   #534 (permalink)
blu
Senior Member
 
blu's Avatar
 
Join Date: Jul 2006
Location: Vancouver BC
Posts: 250
APP was installed without any troubles.

Nice work boys...

way to go!
(Offline)   Reply With Quote
Old 06-23-2009, 03:02 PM   #535 (permalink)
Senior Member
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,659
Quote:
Originally Posted by blu View Post
APP was installed without any troubles.

Nice work boys...

way to go!
We accept gratitude in donations or boob shots (preference is given to the latter)
(Offline)   Reply With Quote
Old 06-23-2009, 07:05 PM   #536 (permalink)
blu
Senior Member
 
blu's Avatar
 
Join Date: Jul 2006
Location: Vancouver BC
Posts: 250
Quote:
Originally Posted by hayroob View Post
We accept gratitude in donations or boob shots (preference is given to the latter)
understood...

I'll get back to you!
(Offline)   Reply With Quote
Old 06-24-2009, 10:21 AM   #537 (permalink)
Senior Member
 
Sean7341's Avatar
 
Join Date: Jan 2006
Posts: 132
Quote:
Originally Posted by Subsonix View Post
Was that some sort of apology?
Yes it was. A sincere one too. It's my fault for typing it wrong the first time.

It's my fault. I'm sorry.
(Offline)   Reply With Quote
Old 06-28-2009, 07:06 PM   #538 (permalink)
Senior Member
 
hypercrypt's Avatar
 
Join Date: Nov 2006
Location: My Place: Liverpool. Born and raised in Berlin.
Posts: 771
Any news? Is Apple really taking this long to approve apps these days?! Wow, that is ridiculous!
(Offline)   Reply With Quote
Old 06-28-2009, 07:30 PM   #539 (permalink)
Senior Member
 
FrozenViking's Avatar
 
Join Date: May 2008
Location: Norway, its fuckin cold
Posts: 302
Quote:
Originally Posted by hypercrypt View Post
Any news? Is Apple really taking this long to approve apps these days?! Wow, that is ridiculous!
I hear ya buddy.. In the good ol' days, Apple used to spew out approvals to left and right. I just don't know anymore..
(Offline)   Reply With Quote
Old 06-28-2009, 08:13 PM   #540 (permalink)
Senior Member
 
hayroob's Avatar
 
Join Date: Mar 2008
Location: Detroitish
Posts: 1,659
Quote:
Originally Posted by hypercrypt View Post
Any news? Is Apple really taking this long to approve apps these days?! Wow, that is ridiculous!
Not a peep
(Offline)   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT -5. The time now is 02:37 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Keith and The Girl
iPhone news and app directory