Fanatic Live: Msn6 User Id Thingy - Fanatic Live

Jump to content

This is not a support forum!

This forum is intended for users to post source they have created and want to share, it is not to be used for asking for source. New topics made here require moderator approval, and questions will be deleted.
  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Msn6 User Id Thingy Rate Topic: -----

#1 User is offline   wtbw

  • leet coder reverser type dude
  • Icon
  • Group: Valued Members
  • Posts: 19
  • Joined: 30-November 02

Posted 13 September 2003 - 03:01 PM

well, someone asked me about this today and I haven't seen anything about it before, so here's some pseudocode to work out the user id number thing, the thing at X:\Documents and Settings\User\Application Data\Microsoft\MSN Messenger\123123123 or so.

apologies if someone's done it before.

string=<passport email all in lowercase>
x=0;
c=<first character in string (unicode, so 2 bytes)>
while (c!=0){
x=x*101;
x=x+c;
c=<next character in string (unicode, so 2 bytes)>
}
return x;

seems to use 2 bytes hardcoded, god knows what it does with unicode of 4 bytes (or even 8 these days? dunno.)

hope this helps people, gimme a shout in the about box or so if you use it in yr progs if you feel like it.

peace,

Will

edit: erm, big point i forgot to mention... use a 32-bit integer and let it wrap around.

edit 2: and unsigned, obviously.

[noroom says:]
we appreciate the use of code tags. next time add them yourself

This post has been edited by noroom: 13 September 2003 - 04:23 PM

0

#2 User is offline   ecko_complex

  • &nbsp;
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,060
  • Joined: 22-April 03
  • Location:New Zealand
  • Interests:Stuff

Posted 13 September 2003 - 11:20 PM

Any way to reverse that? Lets say I want to find out who the hell 3497497874 is :blink:...
0

#3 User is offline   Doggie

  • I'm Watching You -_-'
  • Icon
  • Group: Admins
  • Posts: 5,325
  • Joined: 04-February 02
  • Gender:Male
  • Location:Australia
  • Interests:Things that are interesting?

Posted 14 September 2003 - 12:17 AM

how would u go about doing it in vb ? try methods but i cant get it right.. any ideas?
0

#4 User is offline   Daniel

  • Liveâ„¢ n00b
  • Icon
  • Group: Admins
  • Posts: 4,598
  • Joined: 01-February 02
  • Location:New Zealand

Posted 14 September 2003 - 02:42 AM

Wow... thanks! works like a charm :D
0

#5 User is offline   wtbw

  • leet coder reverser type dude
  • Icon
  • Group: Valued Members
  • Posts: 19
  • Joined: 30-November 02

Posted 14 September 2003 - 03:33 AM

ecko mate, ya can't go back (easily) cos information is lost, it keeps overflowing and losing the info beyond 32-bit.

Will
0

#6 User is offline   noroom

  • Because I Rock
  • Icon
  • Group: Valued Members
  • Posts: 3,477
  • Joined: 05-May 02
  • Location:Germany
  • Interests:Internet, Maths, Messenger, Programming, Music (Listening to and Playing), FileSharing, Computer / Software security... etc

Posted 14 September 2003 - 05:44 AM

doggie, on Sep 13 2003, 07:17 PM, said:

how would u go about doing it in vb ? try methods but i cant get it right.. any ideas?

i think i can port that to VB.

having some problems with the "(unicode, so 2 bytes)" bit, though :huh:
0

#7 User is offline   Keenie

  • A friend of the house
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,124
  • Joined: 17-April 03
  • Location:Peterborough,Ontario,Canada.

Posted 14 September 2003 - 05:45 AM

same problem i had, i couldnt figure out what to do for it. :unsure:
0

#8 User is offline   wtbw

  • leet coder reverser type dude
  • Icon
  • Group: Valued Members
  • Posts: 19
  • Joined: 30-November 02

Posted 14 September 2003 - 01:24 PM

well, it certainly takes it two bytes at a time, but i've never seen a msn address with unicode characters (i'm pretty certain they arent allowed) so i'd just say f*ck it and deal with it as a normal ascii string if it makes it easier :)

Will
0

#9 User is offline   Daniel

  • Liveâ„¢ n00b
  • Icon
  • Group: Admins
  • Posts: 4,598
  • Joined: 01-February 02
  • Location:New Zealand

Posted 14 September 2003 - 01:35 PM

I was thinking that too, this is what Ive done in c++.
With doing it in vb, im having problemo's with unsigned int, which isnt a var type in vb..
Someone else must know

int getUserId(LPTSTR user)
{
	unsigned int x = 0;

	for (int i = 0; i < strlen(user); i++) {
		x = x * 101;
		x = x + user[i];
	}

	return x;
}

char* msgboxdata;
wsprintf(msgboxdata, "User Id: %u", getUserId("bob@hotmail.com"));
MessageBox(NULL, msgboxdata, NULL, NULL);

0

#10 User is offline   ginge

  • Nudging is fun!
  • PipPip
  • Group: Members
  • Posts: 19
  • Joined: 27-April 02
  • Location:England

Posted 14 September 2003 - 07:12 PM

Private Sub Command1_Click()
MsgBox LongString(Calculate(LCase$(InputBox$("Type in user name"))))
End Sub

Public Function LongString(i As Variant) As String
LongString = i & ""
End Function

Public Function Calculate(id As String) As Variant
Calculate = CDec(0)
Dim i As Integer
For i = 1 To Len(id)
    Calculate = AddWrap(MulWrap(Calculate, CDec(101)), CDec(Asc(Mid$(id, i, 1))))
Next
End Function

Private Function ToLong(a As Variant) As Variant
Dim MaxVal As Variant: MaxVal = CDec(4294967296#)
ToLong = a
Do While ToLong > MaxVal
    ToLong = ToLong - MaxVal
Loop
End Function

Private Function MulWrap(a As Variant, b As Variant) As Variant
MulWrap = ToLong(a * b)
End Function

Private Function AddWrap(a As Variant, b As Variant) As Variant
AddWrap = ToLong(a + b)
End Function


Definately not as easy as it is in C++, but I've tried this on quite a few test cases, and it gets them all right. I did have a working implementation with longs, but when compiled the behaviour of the code changed - so anyone looking at doing it that way should be very careful

(technical details - it seems you CAN'T trap overflow errors in N-Code compiled .exe's, but you can in the debugger. The error gets raised still, but causes an unhandled message box and shuts your program)

[EDIT]Btw. GZ, you must first make the input string lowercase, i.e.
x = (x * 101) + towlower(user[i]);

[/EDIT]

This post has been edited by ginge: 14 September 2003 - 07:17 PM

0

#11 User is offline   noroom

  • Because I Rock
  • Icon
  • Group: Valued Members
  • Posts: 3,477
  • Joined: 05-May 02
  • Location:Germany
  • Interests:Internet, Maths, Messenger, Programming, Music (Listening to and Playing), FileSharing, Computer / Software security... etc

Posted 14 September 2003 - 07:41 PM

omg, that works. :pray:
0

#12 User is offline   Snakerboy

  • yobrekans
  • Icon
  • Group: Valued Members
  • Posts: 2,001
  • Joined: 04-February 02
  • Location:Staffordshire UK
  • Interests:Digital art and stuff

Posted 14 September 2003 - 10:27 PM

omg, see GZ if only we knew some math. We might of been able to figure this out ourselfs, anyway great code!
0

#13 User is offline   Doggie

  • I'm Watching You -_-'
  • Icon
  • Group: Admins
  • Posts: 5,325
  • Joined: 04-February 02
  • Gender:Male
  • Location:Australia
  • Interests:Things that are interesting?

Posted 15 September 2003 - 01:23 AM

i was trying to figure out that but i am too slow :P.. well done with the good mate :)
0

#14 User is offline   jaime

  • jaimeeee
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 853
  • Joined: 15-December 02
  • Location:/home/México/Michoacán/Morelia
  • Interests:Music, messenger and guitar!

Posted 15 September 2003 - 03:52 AM

nice, i just finish a color changer ;)

is in spanish, but you will understand it
http://oberst.ibitso...olorchanger.zip
0

#15 User is offline   Doggie

  • I'm Watching You -_-'
  • Icon
  • Group: Admins
  • Posts: 5,325
  • Joined: 04-February 02
  • Gender:Male
  • Location:Australia
  • Interests:Things that are interesting?

Posted 15 September 2003 - 04:31 AM

well to make a running conversion, just use this code on txtconverted_change event for eg;
txtconverted.Text = LongString(Calculate(LCase$(txtEmail.Text)))

This post has been edited by doggie: 15 September 2003 - 04:34 AM

0

#16 Guest_Paddy_*

  • Group: Guests

Posted 15 September 2003 - 09:06 AM

wth is a msn6 user id?
0

#17 User is offline   Doggie

  • I'm Watching You -_-'
  • Icon
  • Group: Admins
  • Posts: 5,325
  • Joined: 04-February 02
  • Gender:Male
  • Location:Australia
  • Interests:Things that are interesting?

Posted 15 September 2003 - 10:55 AM

Extort, on Sep 15 2003, 07:06 PM, said:

wth is a msn6 user id?

coded version of ur email address and the dir where holds ur config XML file, display pics etc eg
doggie@hotmail.com = 1645190282
so hense making a dir
c:\documents and settings\username\application data\microsoft\msn messenger\1645190282
0

#18 User is offline   freestyler

  • Chattin' Sense
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 926
  • Joined: 02-March 03
  • Location:United Kingdom
  • Interests:MSN Messenger<br />MSN Messenger Protocol<br />Programming (VB)<br />My Girlfriend

Posted 15 September 2003 - 11:01 AM

doggie, on Sep 15 2003, 11:55 AM, said:

coded version of ur email address and the dir where holds ur config XML file, display pics etc eg
doggie@hotmail.com = 1645190282
so hense making a dir
c:\documents and settings\username\application data\microsoft\msn messenger\1645190282

Ahh so thats what it is.

I was wondering what the hell this thread was about.
Hey nice work guys, this is useful info :)
0

#19 User is offline   ginge

  • Nudging is fun!
  • PipPip
  • Group: Members
  • Posts: 19
  • Joined: 27-April 02
  • Location:England

Posted 15 September 2003 - 05:21 PM

How useful would it be to go from the number to the string? it may be possible to do in some cases, but would be a bit of work. If its very useful I'll give it a go...
0

#20 User is offline   DJMystic

  • I'm back in the 80's!
  • PipPipPipPip
  • Group: Members
  • Posts: 86
  • Joined: 05-August 03

Posted 15 September 2003 - 05:45 PM

Erm it's a hash...
If you would give every number in the alphabet a number (eg a-z = 1-26),
and you would count up all the numbers in a string (hello = h+e+l+l+o = 8+5+12+12+15),
Would you be able to convert that back?
No, of course not! because it is just a total of a few numbers :)
If i'd do 3+1=4, and then want to get back 3+1, there would be different possibilities:
3+1
1+3
2+2

Now imagine that with more than 2 numbers,
yes! you're getting the point now aren't you :D
IT'S IMPOSSIBLE!!! :D
0

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users