Jump to content

cbox


Recommended Posts

Posted

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.

  • Like 2
Posted

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;

Posted

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.

Posted

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

Posted

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.

Posted

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++].

Posted

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)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...