Who is online

Results 1 to 17 of 17
  1. #1
    Enthusiast Jaynno is offline
    MemberRank
    Dec 2010 Join Date
    30Posts

    note Who is online

    Hi,

    If you have a server and you dont want your GA or GM or whatever to know your database password and username, but you want them to know who is online on what map and what nation, simply download this visual studio 10 solution and change a string.

    This is what you need to change :




    this is the result :


    a bug that ive found is if the name is too long.. and i cant make it work good :(



    feel free to do any modification you want. Im new to c# so i know it is a very basic program.

    This is the download link :
    Attached Files Attached Files


  2. #2
    Banned Yamachi is offline
    BannedRank
    Oct 2006 Join Date
    Jolly EnglandLocation
    3,517Posts

    Re: Who is online

    This is a VERY bad idea. Storing the username and password in a string like that is a huge security risk. All someone has to do is open the application in something like .Net Reflector and they have your details. I would not recommend anyone use this... If you're going to use this, at least switch the username and password to read from application settings.
    Last edited by Yamachi; 29-04-11 at 07:30 PM.

  3. #3
    Enthusiast Millenial is offline
    MemberRank
    Nov 2010 Join Date
    44Posts

    Re: Who is online

    Why god use VB for that.

    Just use PHP and make it a webpage. Works far better.

  4. #4
    Account Upgraded | Title Enabled! Amaymon is offline
    MemberRank
    Apr 2011 Join Date
    RomaniaLocation
    252Posts

    Re: Who is online

    Myabe he is good in programming not in php,who knows.

  5. #5
    Enthusiast Jaynno is offline
    MemberRank
    Dec 2010 Join Date
    30Posts

    Re: Who is online

    i have a php one but like i said, im NOOB at c# and it was my first program... i didint know anything about the connection string. thanks yamachi for this constructive comment.

    delete the thread then if its dangerous to use. sorry about that.

    Message to Millenial... if all you can say is that, next time dont say anything or do a constructive comment.


    Thats my php one :
    Attached Thumbnails Attached Thumbnails untitled.jpg  
    Last edited by Jaynno; 29-04-11 at 08:31 PM.

  6. #6
    Banned Yamachi is offline
    BannedRank
    Oct 2006 Join Date
    Jolly EnglandLocation
    3,517Posts

    Re: Who is online

    Quote Originally Posted by Millenial View Post
    Why god use VB for that.

    Just use PHP and make it a webpage. Works far better.
    It's C#, not VB.net...

  7. #7
    Enthusiast Millenial is offline
    MemberRank
    Nov 2010 Join Date
    44Posts

    Re: Who is online

    Quote Originally Posted by Yamachi View Post
    It's C#, not VB.net...
    Does not make pretty much difference.
    Also, there are many PHP online player systems out there.
    You do not need to do one.

  8. #8
    Banned Yamachi is offline
    BannedRank
    Oct 2006 Join Date
    Jolly EnglandLocation
    3,517Posts

    Re: Who is online

    Quote Originally Posted by Millenial View Post
    Does not make pretty much difference.
    Also, there are many PHP online player systems out there.
    You do not need to do one.
    Unless you've got something constructive to say, I suggest you stay out of this thread.

  9. #9
    Enthusiast Jaynno is offline
    MemberRank
    Dec 2010 Join Date
    30Posts

    Re: Who is online

    Thanks yamachi,

    seriously you can delete the thread since its dangerous.

  10. #10
    Banned Yamachi is offline
    BannedRank
    Oct 2006 Join Date
    Jolly EnglandLocation
    3,517Posts

    Re: Who is online

    Well, as I said, all you need to do is store the username and password in the application settings. That would fix the security issue.

  11. #11
    Valued Member KeelzYou is offline
    MemberRank
    Oct 2009 Join Date
    Here & there...Location
    108Posts

    Re: Who is online

    All Yamachi said was that storing the username and password in a string like that is a huge security risk, he didn't mean the program it self was dangerous. So, if you're going to try this do what he said and switch the username and password to read from application settings.

    Edit: Dang, Yama posted before me lol.

  12. #12
    Enthusiast Jaynno is offline
    MemberRank
    Dec 2010 Join Date
    30Posts

    Re: Who is online

    so if i understand i put the username and password in variable like this :

    $user = "theuserhere"
    $pass = "thepasswordhere"

    then in the connection string i put the variable ???

    and those variable are declared in the main class ?

  13. #13
    Account Upgraded | Title Enabled! error0024 is offline
    MemberRank
    Jul 2005 Join Date
    MalaysiaLocation
    896Posts

    Re: Who is online

    Releasing a php code will be better,as a person which are outside still can monitor the online players.Since its easier to use too

  14. #14
    Banned Yamachi is offline
    BannedRank
    Oct 2006 Join Date
    Jolly EnglandLocation
    3,517Posts

    Re: Who is online

    Quote Originally Posted by Jaynno View Post
    so if i understand i put the username and password in variable like this :

    $user = "theuserhere"
    $pass = "thepasswordhere"

    then in the connection string i put the variable ???

    and those variable are declared in the main class ?
    No, you don't declare the variables in the main class... That would cause the exact same security issues. The variables should be stored in the application settings, like I said.

    Project -> Properties -> Settings

    Then use it like this:
    Code:
    connectionString = String.Format("Data Source=localhost;Initial Catalog=Gamedb;User ID={0};Password={1}", Properties.Settings.user, Properties.Settings.pass);

    NOTE: There's no need to declare the types of your variables and their values seperately. Instead of
    Code:
    string blah = null; blah = "asd";
    just do
    Code:
    var blah = "asd"
    Last edited by Yamachi; 30-04-11 at 02:32 PM.

  15. #15
    Enthusiast Jaynno is offline
    MemberRank
    Dec 2010 Join Date
    30Posts

    Re: Who is online

    ive needed to put default in the string :

    Code:
    string connectionString = String.Format("Data Source=localhost;Initial Catalog=Gamedb;User ID={0};Password={1}", Properties.Settings.Default.User, Properties.Settings.Default.Password);

    but this way its working.

    Gonna re-edit the first post tommorow.
    Last edited by Jaynno; 30-04-11 at 06:45 PM.

  16. #16
    Fuck. SheenBR is offline
    ModeratorRank
    Feb 2008 Join Date
    Jaú, BrazilLocation
    2,433Posts

    Re: Who is online

    @Jaynno

    Search for a program named DotFuscator. :)

  17. #17
    Account Upgraded | Title Enabled! Alin1337 is offline
    MemberRank
    Dec 2007 Join Date
    1,096Posts

    Re: Who is online

    very bad idea to give to players your sql informations.
    You will get hacked ;D

    it's easy to decompile :D
    Last edited by Yamachi; 26-05-11 at 01:14 PM. Reason: watch the language



Advertisement