LiveW Serial Finder 1.0.1 (open-source)

Status
Not open for further replies.
Some serial key sites allow users to vote if a serial works or not. The percentage is that of the amount of people voted that serial as working. But you'll often see 0% because no1 voted on it yet. It's nothing important really.
 
Really great program Hyperz reminds me off the other one you also made ;)

btw here are other mirrors just in case of deadlinks.
Code:
http://www.filedropper.com/lsf101

http://www.filefactory.com/file/a1hhhg5/n/LSF_1.0.1.rar 

http://www.filesavr.com/lsf101_1
 
Thanks for the feedback. For those familiar with the C# language, if you want to write an add-on for another site it's really easy. Say you want to write an add-on for myserialsite.com you would create a .cs file in the Addons folder called MySerialSite_com.cs. You use the code of one of the 2 default addons in there to quickly get a 'skeleton' for your add-on. This one for example:

Code:
/* ---------------------------------------------------------
 *         LiveW Serial Finder Addon
 * ---------------------------------------------------------
 * 
 *  Created        : 08/12/2009 (dd/mm/yyyy)
 *  By            : Hyperz
 *  For Site    : www.serialnumber.in
 * 
 * ---------------------------------------------------------
 * 
 *  Additional credits :
 * 
 *  - HtmlAgilityPack V1.0
 *    Simon Mourier
 *    <simon underscore mourier at hotmail dot com>
 * 
 * ---------------------------------------------------------
 * 
 *  References linked in the CSharpCodeProvider are :
 *  - System.dll
 *  - System.Data.dll
 *  - System.Deployment.dll
 *  - System.Drawing.dll
 *  - System.Web.dll
 *  - System.Windows.Forms.dll
 *  - System.Xml.dll
 *  - lsf.exe
 * 
 * ---------------------------------------------------------
 *  (c) 2008 - Hyperz [hyperz.2007@gmail.com]
 * ---------------------------------------------------------
 * 
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *  
 */

//#define DEBUG

#region Namespaces
using System;
using System.Collections.Generic;
//using System.Data;
//using System.IO;
using System.Net;
//using System.Text;
//using System.Text.RegularExpressions;
using System.Web;
using Hyperz.LSF;
using HtmlAgilityPack;
#endregion

namespace Hyperz.LSF.Addons
{
    public class SerialNumber_In : Grabber
    {
        public SerialNumber_In()
        {
            // Set up the required properties.
            this.Name = "SerialNumber.In";
            this.SearchUrl = "http://serialnumber.in/";
            this.SerialUrl = "http://serialnumber.in/includes/serial.php?id=";
        }

        public override string GetSerial(string id)
        {
            string serial = "";
            HtmlDocument doc = new HtmlDocument();
            doc.LoadHtml((new WebClient()).DownloadString(this.SerialUrl + id));
            
            try
            {
                // Grab serial.
                serial = doc.DocumentNode.SelectNodes("//textarea")[0].InnerText;
            }
            catch (Exception e)
            {
#if DEBUG
                System.Windows.Forms.MessageBox.Show(e.Message, this.Name + " Addon Error [GetSerial() Method]");
#endif
            }

            // Return our serial.
            return HttpUtility.HtmlDecode(serial.Replace("\n", "\r\n"));
        }

        public override System.Windows.Forms.DataGridViewRow[] SearchFor(string search, System.Windows.Forms.DataGridView grid)
        {
            List<System.Windows.Forms.DataGridViewRow> results = new List<System.Windows.Forms.DataGridViewRow>();
            search = "q=" + Uri.EscapeDataString(search) + "&btnsearch=Search";
            string postResult = this.HttpPost(this.SearchUrl, search);
            
            // Did we get something?
            if (postResult == null) return results.ToArray();

            try
            {
                System.Windows.Forms.DataGridViewRow result;
                //string idAttr = "";
                HtmlDocument doc = new HtmlDocument();
                doc.LoadHtml(postResult);
                
                // Loop trough all elements that contain serials.
                foreach (HtmlNode node in doc.DocumentNode.SelectNodes("/html/body/div/div[2]/div/div/div/table/tbody/tr"))
                {
                    result = new System.Windows.Forms.DataGridViewRow();
                    result.CreateCells(grid);

                    string[] id = node.ChildNodes[1].ChildNodes[0].GetAttributeValue("href", "").Split('/');

                    // Setup the values:
                    // --------------------------
                    // 0 => the unique id, leave this to null. The backend will automaticly set it ;)
                    // 1 => website name
                    // 2 => serial key title
                    // 3 => OS platform, set as "N/A" when the site doesn't give this info.
                    // 4 => the ID we're going to need to call the right page for this serial (this cell is hidden).
                    result.Cells[0].Value = null;
                    result.Cells[1].Value = this.Name;
                    result.Cells[2].Value = node.ChildNodes[1].ChildNodes[0].InnerText + " " +
                        "[" + node.ChildNodes[0].InnerText + "] " +
                        "[" + node.ChildNodes[2].InnerText + "]";
                    result.Cells[3].Value = "N/A";
                    result.Cells[4].Value = id[id.Length - 1].Trim();

                    // Add to the result to the list.
                    results.Add(result);
                }
            }
            catch (Exception e)
            {
#if DEBUG
                System.Windows.Forms.MessageBox.Show(e.Message, this.Name + " Addon Error [SearchFor() Method]");
#endif
            }

            // Convert list to an array and return it.
            return results.ToArray();
        }
    }
}
If you know C# that code should be really easy to understand. All you have to do is edit the class name and make edits to the 2 functions. You can do this in less then 30 minutes.

Every time the program starts it will compile all .cs files in the Addons folder and generate a DLL for them which will get loaded by the program. So you don't really need Visual Studio or anything, even good ol' notepad will do to quickly write an add-on.
 
Status
Not open for further replies.
Back
Top