Jump to content

  •  

  • iBotModz CBox


    Photo

    C# Xbox Live Code Generation


    • Please log in to reply
    11 replies to this topic

    #1 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 09 September 2009 - 05:54 AM

    Here is the function you can use

    private string RandomString(int size)
            {
                //TEMP VARS
                StringBuilder builder = new StringBuilder();
                Random random = new Random();
                char ch;
                int num = 0;
                string cm;
                char N1 = (Convert.ToChar(Convert.ToInt32(73)));
                char N2 = (Convert.ToChar(Convert.ToInt32(79)));
                char N3 = (Convert.ToChar(Convert.ToInt32(111)));
                char N4 = (Convert.ToChar(Convert.ToInt32(105)));
                /* This handles the randomizing of Letters and Numbers
                 * Only 2-9 are used
                 * All Letters except O,o, I, i */
                for (int i = 0; i < size; i++)
                {
                    Random r1 = new Random();
                check4:
                    int r2 = r1.Next(1, 3);
                    if (test == 0)   //This makes sure the first one is a letter
                        r2 = 2;
                    switch (r2)
                    {
                        case 1: //Gen the Number
                            //Make sure more than 2 numbers never happen
                            if (num == 2)
                            {
                                num = 0;
                                goto case 2;
                            }
                            Random r3 = new Random();
                            Thread.Sleep(r1.Next(1,5));
                            num++; //Make sure only numbers used twice
                            cm = (Convert.ToString(r3.Next(2, 9)));
                            builder.Append(cm);
                            r2 = 2;
                            break;
                        case 2: //Gen the Character
                            test = 1;
                            ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
                        if ((ch == N1) | (ch ==  N2) | (ch == N3) | (ch == N4))
                            {
                                goto check4;
                            }
                            else
                            {
                                builder.Append(ch);
                                break;
                            }
                    }
                }
                return builder.ToString().ToUpper(); //Return the string
            }
    
    

    So then you can use like

    codeString = RandomString(25);

    Which generates a 25 character string which is the right size for Microsoft codes. Then you can max generate them into a text file and then split the code into 5 parts and dump it into xbox.com and keep trying until you get one that works. You can also mass enter them into xbox.com, but I got a simple HTTP ban from their website (Which expired after 24 hours) after I tried about 12,000. So I wouldn't recommend it.

    #2 lostmodz26

    lostmodz26

      I am lostmodz26.

    • VIP

    • 1,153 posts
    • Joined: 12-March 09
    • Gender:Male
    • Location:Northern Louisiana

    Posted 09 September 2009 - 07:43 AM

    Wow I never thought that anything like this would ever be possible, the only bad thing is that Microsoft can catch people who steal other peoples codes and get them in deep shit

    #3 yungbol

    yungbol

      Firmware Expert

    • Global Mods

    • 1,461 posts
    • Joined: 09-April 08
    • Gender:Male
    • Location:Philly

    Posted 09 September 2009 - 08:17 AM

    Dude, it don't work, it is just a random generation of numbers that you can try to use. Like 1 in a million work.

    But Peaches, people will need to add:
    using System.Threading

    and also will need to declare:
    int test = 0;


    #4 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 09 September 2009 - 06:56 PM

    Yeah I honestly didn't mean to post this yet. I noticed while writing the draft that the CODE box would not space my code correctly so I just slapped it together. The threading is there to insure the codes are different. A fix for some type of windows computer.

    I'll update it once I get this codebox to space my code properly.

    #5 Pargy

    Pargy

      WTF is a Pargy?

    • VIP

    • 1,466 posts
    • Joined: 25-July 08
    • Gender:Male

    Posted 09 September 2009 - 07:32 PM

    Wow I never thought that anything like this would ever be possible, the only bad thing is that Microsoft can catch people who steal other peoples codes and get them in deep shit


    Fail

    #6 AngryKoconut

    AngryKoconut

      Apprentice Grade 2

    • Members+

    • 21 posts
    • Joined: 13-June 08
    • Gender:Male
    • Location:hot tubin

    Posted 10 September 2009 - 07:29 PM

    The spaces/indents weren't preserved :(...

    #7 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 10 September 2009 - 08:30 PM

    Yeah I honestly didn't mean to post this yet. I noticed while writing the draft that the CODE box would not space my code correctly so I just slapped it together.
    I'll update it once I get this codebox to space my code properly.


    Yeah, I'm not bothering to work on the rest of the post until the spacing is preserved and working.

    #8 yungbol

    yungbol

      Firmware Expert

    • Global Mods

    • 1,461 posts
    • Joined: 09-April 08
    • Gender:Male
    • Location:Philly

    Posted 11 September 2009 - 01:08 PM

    Yeah, I'm not bothering to work on the rest of the post until the spacing is preserved and working.


    Peaches, maybe have a special bbcode for things that have to deal with C#, VB, etc. If you put the rules in normal codeboxes, sometimes it would error when someone is just posting a codebox with some text in it.

    I was thinking like [c#], [vb], [c++].

    #9 jemil12345

    jemil12345

      Apprentice Grade 2

    • Members+

    • 11 posts
    • Joined: 13-July 09

    Posted 12 September 2009 - 10:27 AM

    Can someone convert this to Visual Basic?

    Thanks

    #10 miinaturvat

    miinaturvat

      miiinaturvat

    • Donors+

    • 927 posts
    • Joined: 09-April 08
    • Gender:Male
    • Location:Dragon Shores!

    Posted 13 September 2009 - 04:18 AM

    Can someone convert this to Visual Basic?

    Thanks


    Can someone tell this guy to click this link?

    Thanks

    #11 Rogue Modder

    Rogue Modder

      Class of 2008

    • VIP

    • 1,328 posts
    • Joined: 02-January 09
    • Gender:Male
    • Location:London, UK

    Posted 14 September 2009 - 07:49 AM

    Private Function RandomString(ByVal size As Integer) As String
        'TEMP VARS
        Dim builder As New StringBuilder()
        Dim random As New Random()
        Dim ch As Char
        Dim num As Integer = 0
        Dim cm As String
        Dim N1 As Char = (Convert.ToChar(Convert.ToInt32(73)))
        Dim N2 As Char = (Convert.ToChar(Convert.ToInt32(79)))
        Dim N3 As Char = (Convert.ToChar(Convert.ToInt32(111)))
        Dim N4 As Char = (Convert.ToChar(Convert.ToInt32(105)))
        ' This handles the randomizing of Letters and Numbers
    ' * Only 2-9 are used
    ' * All Letters except O,o, I, i
       
        For i As Integer = 0 To size - 1
            Dim r1 As New Random()
            check4:
            Dim r2 As Integer = r1.[Next](1, 3)
            If test = 0 Then
                'This makes sure the first one is a letter
                r2 = 2
            End If
            Select Case r2
                Case 1
                    'Gen the Number
                    'Make sure more than 2 numbers never happen
                    If num = 2 Then
                        num = 0
                        goto case 2
                    End If
                    Dim r3 As New Random()
                    Thread.Sleep(r1.[Next](1, 5))
                    num += 1
                    'Make sure only numbers used twice
                    cm = (Convert.ToString(r3.[Next](2, 9)))
                    builder.Append(cm)
                    r2 = 2
                    Exit Select
                Case 2
                    'Gen the Character
                    test = 1
                    ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)))
                    If (ch = N1) Or (ch = N2) Or (ch = N3) Or (ch = N4) Then
                        GoTo check4
                    Else
                        builder.Append(ch)
                        Exit Select
                    End If
            End Select
        Next
            'Return the string
        Return builder.ToString().ToUpper()
    End Function

    Declare with:
    codeString = RandomString(25)


    #12 iBotPeaches

    iBotPeaches

      General Grade 6

    • Owner

    • 6,570 posts
    • Joined: 29-July 07
    • Gender:Male
    • Location:Kansas

    Posted 14 September 2009 - 05:42 PM

    The spaces are there, but the code is missing all the semicolons.

    Just ignore the stupid code boxes, there seems to be a problem.