[app] MultiSign
- SingingBlaze
 - Posts: 348
 - Joined: Sun Sep 10, 2006 6:02 pm
 
| 
                                                     | 
                            
                                
                                                     | 
                            
                                
                                                     | 
                
Here's the code I used:
			
			
									
									
						Code: Select all
Open:
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "Halo 2 Maps (*.map)|*.map";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                if (listBox1.Items.Count != 0)
                {
                    for (int i = 0; i < listBox1.Items.Count; i++)
                    {
                        if (listBox1.Items.Contains(ofd.FileName))
                        {
                        }
                        else
                        {
                            listBox1.Items.Add(ofd.FileName);
                        }
                    }
                }
                else
                {
                    listBox1.Items.Add(ofd.FileName);
                }
            }
Code: Select all
Resign:
            ArrayList al = new ArrayList(listBox1.Items.Count);
            for (int i = 0; i < listBox1.Items.Count; i++)
            {
                try
                {
                    int checksum = 0;
                    FileStream fs = new System.IO.FileStream(this.listBox1.Items[i].ToString(), FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite);
                    BinaryReader br = new System.IO.BinaryReader(fs);
                    br.BaseStream.Position = 2048;
                    int endOfFile = (int)fs.Length;
                    for (int x = 2048; x < endOfFile; x += 4)
                    {
                        checksum ^= br.ReadInt32();
                    }
                    fs.Position = 720;
                    fs.Write(BitConverter.GetBytes(checksum), 0, 4);
                    br.Close();
                    fs.Close();
                    al.Add((i + 1) + ".) 0x" + checksum.ToString("X"));
                }
                catch
                {
                    MessageBox.Show("Error While Signing \"" + listBox1.Items[i].ToString() + "\"", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            for (int i = 0; i < al.Count; i++)
            {
                temp += al[i] + "\n";
            }
            if (temp != "")
            {
                MessageBox.Show(temp, "Done");
            }
- TheSilentModders
 - Posts: 44
 - Joined: Mon Aug 07, 2006 9:40 pm
 - Location: Murfreesboro, Tennessee
 - Contact:
 
- 
				Monkey Terd
 - Posts: 2032
 - Joined: Tue May 17, 2005 6:34 pm
 - Location: T E X A S
 
| 
                                                     | 
                            
                                
                                                     | 
                            
                                
                                                     | 
                            
                                
                                                     | 
                            
| 
                                                     | 
                            
                                
                                                     | 
                            
                                
                                                     | 
                            
                                
                                                     | 
                            
| 
                                                     | 
                
TheSwampFox made one a long time ago that resigned multiple maps, its probably the fastest one I have used so far.-DeToX- wrote:I think it was r4ndom/prodigy made one a long time ago...TheSilentModders wrote:wow this is very cool i haven't saw a signer that could sign more than one map. good job for your first app.
Formerly known as Limpmybizket.
						Tru.Monkey Terd wrote:TheSwampFox made one a long time ago that resigned multiple maps, its probably the fastest one I have used so far.-DeToX- wrote:I think it was r4ndom/prodigy made one a long time ago...TheSilentModders wrote:wow this is very cool i haven't saw a signer that could sign more than one map. good job for your first app.

eeeewww... mesagebox.show????
msgbox("")
			
			
									
									msgbox("")
WTF! LOL stupid animals.
						Hawaiian Modder wrote:Don't evade word sensors.
- 
				Shalted
 - Posts: 565
 - Joined: Wed Nov 17, 2004 8:41 am
 - Location: Vancouver, BC This is where people put their modding team because they feel important.
 - Contact:
 
| 
                                                     | 
                            
                                
                                                     | 
                
Code: Select all
                if (listBox1.Items.Count != 0)
                {
                    for (int i = 0; i < listBox1.Items.Count; i++)
                    {
                        if (listBox1.Items.Contains(ofd.FileName))
                        {
                        }
                        else
                        {
                            listBox1.Items.Add(ofd.FileName);
                        }
                    } Code: Select all
                if (listBox1.Items.Count != 0)
                {
                    for (int i = 0; i < listBox1.Items.Count; i++)
                    {
                        if (!listBox1.Items.Contains(ofd.FileName))
                        {
                            listBox1.Items.Add(ofd.FileName);
                        }
                    } 
Awaiting connection...
						





