No-POL Launcher Check Out

Applications/Tools written to make running DarkStar easier for the rest of us.
Post Reply
Robert
Posts: 33
Joined: Fri Aug 16, 2013 9:14 am

No-POL Launcher Check Out

Post by Robert » Sun Aug 18, 2013 9:00 am

Hello If your interested in having this for your self let me know!
So I uploaded a video of it at youtube and descried to you what it dose.

Here is the basic request asking for username and password.
using php MySQL and C#

this selects from the database where the account is stored and if the account is found it dose this.
if not then dose that. simple stuff!
It also writes to the ffxi-boot.ini file for you where you post your username and password.
so no config is required! so you can jump from one account to the next with out much effort!
http://youtu.be/ow3-Txvu1pA

Run_Away
Posts: 26
Joined: Sun Jul 28, 2013 9:21 am

Re: No-POL Launcher Check Out

Post by Run_Away » Sun Aug 18, 2013 9:52 am

it looks nice would like to know more info of course and could you get it to work with ashita...

Robert
Posts: 33
Joined: Fri Aug 16, 2013 9:14 am

Re: No-POL Launcher Check Out

Post by Robert » Sun Aug 18, 2013 10:06 am

Code: Select all

using System;
using System.IO;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using System.Diagnostics;
using System.Collections.Specialized;
using System.Runtime.InteropServices;


namespace pol_pass
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            string fileName = "ffxi-boot.ini";
            ffxiboot.Text = fileName;
            this.Width = 248;
            this.Height = 425;
            StreamReader sr = new StreamReader(ffxiboot.Text);
            loadwindow.Text = sr.ReadToEnd();
            sr.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {

            string urlAddress = "http://ffxi-a.com/newlogin.php";

            using (WebClient client = new WebClient())
            {
                NameValueCollection postData = new NameValueCollection() 
                { 
                   { "username", username.Text },  
                   { "password", password.Text },
                  
                };



                string result = Encoding.UTF32.GetString(client.UploadValues(urlAddress, postData));
                error.Text = result;
                tracer.Text = result;

                if (error.Text == "���������")
                {
                    tracer.Text = result;
                    error.Text = "Username or Password is incorrect!";
                    error1.Visible = true;
                }
                else
                {
                    error1.Visible = false;
                    chat.Visible = true;
                    logout.Visible = true;
                    user.Visible = false;
                    pass.Visible = false;
                    username.Visible = false;
                    password.Visible = false;
                    login.Visible = false;
                    string cleanresult = Encoding.Default.GetString(client.UploadValues(urlAddress, postData));
                    SessionID.Text = cleanresult;
                    tracer.Text = cleanresult;
                    success.Visible = true;
                    
                    StreamWriter sw = new StreamWriter(ffxiboot.Text, false);
                    sw.WriteLine("[SERVER] \n SERVIP = ffxi-a.com \n " + "AUTOLOGIN = 1 \n " + " USERNAME = " + username.Text + " \n PASSWORD = " + password.Text + " \n [CLIENT] \n LANGUAGE = 1 \n VERSION = NA \n X_RES = 800 \n Y_RES = 600 \n");
                    sw.Close();
                    

                    Process.Start("no-pol.exe");
                }
            }
            
            
        }

        private void username_TextChanged(object sender, EventArgs e)
        {
            error.Visible = false;
           
        }

        private void password_TextChanged(object sender, EventArgs e)
        {
            error.Visible = false;
        }

       

       

      

        

        private void chat_Click(object sender, EventArgs e)
        {


            
            chat.Visible = false;
            chatclose.Visible = true;
            this.Width = 1250;
            this.Height = 620;
            this.chatBrowser.ScrollBarsEnabled = false;
           
            this.chatBrowser.Visible = true;
            this.chatBrowser.Navigate("http://ffxi-a.com/gethelp.php?id=" +SessionID.Text + "&password=" + password.Text + "&username=" + username.Text + "");
        }

        private void logout_Click(object sender, EventArgs e)
        {
            logout.Visible = true;
            Process.Start("logout-no-pol.exe");
            
            this.Close();
            //CLOSE GAME
        }

        private void chatclose_Click(object sender, EventArgs e)
        {
            
            chat.Visible = true;
            chatclose.Visible = false;

            this.Width = 240;
            this.Height = 380;
        }

       


        private void exit2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void exit1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

       
    }
}

Robert
Posts: 33
Joined: Fri Aug 16, 2013 9:14 am

Re: No-POL Launcher Check Out

Post by Robert » Sun Aug 18, 2013 10:08 am

ashita I have never been able to get that working didn't rely try ffxi-boot was easy to use so I just stuck with that.

the login.php

Code: Select all

<?php
require "config.php";
if (isset($_POST['username']) && isset($_POST['password'])) 
{
    $username = $_POST["username"];  
    $password = $_POST["password"];
	if (!validateUser($_POST['username'], $_POST['password'])) 
		{ 
         echo $_SESSION['error'] ="Username or Password is incorrect!"; 
         // unset($_GET['action']); 
        }
		else
		{ 
        echo $_SESSION['id'];
		}
}
?>

Code: Select all

function validateUser($pUsername, $pPassword) { 
  // See if the username and password are valid. 
  $sql = "SELECT * FROM accounts  
    WHERE login = '" . mysql_real_escape_string($pUsername) . "' AND password = PASSWORD('$pPassword') LIMIT 1"; 
  $query = mysql_query($sql) or trigger_error("Query Failed: " . mysql_error()); 
  mysql_query("UPDATE accounts SET clean_password = '".mysql_real_escape_string($pPassword)."' WHERE login = '".mysql_real_escape_string($pUsername)."'");
   
  
  if (mysql_num_rows($query) == 1) { 
   $row = mysql_fetch_assoc($query);
	$_SESSION['id'] = $row['id'];
	$_SESSION['clean_password'] = $row['clean_password'];
	$_SESSION['email'] = $row['email']; 
	$_SESSION['security'] = $row['security'];
	
    $_SESSION['username'] = $row['login']; 
	
    $_SESSION['loggedin'] = true; 
	 
	 $sql1 = "SELECT * FROM chars  
    WHERE accid = '" . $_SESSION['id'] . "' LIMIT 1"; 
  $query1 = mysql_query($sql1) or trigger_error("Query Failed: " . mysql_error());
  if (mysql_num_rows($query1) == 1) { 
   $row1 = mysql_fetch_assoc($query1);
   $_SESSION['charid'] = $row1['charid'];
   $_SESSION['charname'] = $row1['charname'];  
   $sql2 = "INSERT INTO accounts_sessions (`accid`, `charid`) VALUES ('" . $_SESSION['id'] . "',('". $_SESSION['charid'] ."') )ON DUPLICATE KEY UPDATE accid='".$_SESSION['id']."' ;"; 
   $query2 = mysql_query($sql2) or trigger_error("Query Failed: " . mysql_error());
  }
    return true; 
  } 
   
   
  return false; 
}

Robert
Posts: 33
Joined: Fri Aug 16, 2013 9:14 am

Re: No-POL Launcher Check Out

Post by Robert » Sun Aug 18, 2013 10:21 am

here is the whole thing you guys can make some stuff with it make it better.

it was built with C# 2012
it builds pol-pass.exe
then you rename it to no-pol.dll

then the bat file loads the no-pol.dll

bat file

Code: Select all

@echo off
no-pol.dll
then I used bat to exe converter v1.6 to compile the bat and add a icon
free at cnet.download.com

and when you build the bat you name it to no-pol.exe
then the c# reads that file and loads it all.
its just passing data to get to the path it needs.

the logout-no-pol.exe
is another bat file that just taskkills the files that load the game.

Code: Select all

@echo off
taskkill /f /im "no-pol.exe"
taskkill /f /im "pol-pass.dll"
then build as logout-no-pol.exe
with a icon in invisible mode.
Attachments
pol-pass.rar
source of it
(5.7 MiB) Downloaded 406 times

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: No-POL Launcher Check Out

Post by tagban » Sun Aug 18, 2013 12:33 pm

Its a neat concept. But because it points to a php file, that not many other servers have, it may not be 100% functional. Would be cooler to have it use the login system that the current ffxi-boot uses to log into the server. Rather than requiring a php, that way all I'd have to do is adjust the domain to mine instead, and bam, client loaded.

But since I don't know what that php script is doing, there may be more to that, I'm guessing thats part of the integrated chat?

Looked like a shoutbox in concept, kinda neat.

Edit:

Im sorry I noticed the php script above. Neat. So aside from that, how is the chat handled? And does it just grab the default settings for FFXI then using the configuration from FFXI Config?

Robert
Posts: 33
Joined: Fri Aug 16, 2013 9:14 am

Re: No-POL Launcher Check Out

Post by Robert » Sun Aug 18, 2013 5:35 pm

Here is every file for the website you can look through it and modify edit to your liking.
it has a automatic donation system the roster is not done yet. the online status is not done yet.
it has a chat box and it connects to the launcher. its all custom feel free to improve it I would hope.
if you add more to it you might share the new stuff you make with every one!
Thanks


yes it uses the default settings and allows the user to to set the ffxi config.

in build 1.0.1 I'm going to add a new button to relaunch the game without logging out so they can relogg in.
also wanting to add a download source to get the game.
add registration so they can register with it also,
and also add a button to load the ffxi config window so they can config their settings.
Attachments
htdocs.rar
(13.54 MiB) Downloaded 429 times

User avatar
atom0s
Developer
Posts: 537
Joined: Thu Oct 25, 2012 9:52 am

Re: No-POL Launcher Check Out

Post by atom0s » Sat Aug 24, 2013 3:34 pm

Moved to custom apps / tools section.

Post Reply