Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


DomainAgent 0.1 Alpha released
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

DomainAgent 0.1 Alpha released

alexalex Member
edited May 2013 in General

I just pushed recent changes to the code and I can say it’s the first version working out-of-the-box. Still plenty to do, but if you’re impatient you can grab a zipped version from GitHub.

Installation
Upload all the files to your desired location
Edit INCLUDES/database.php and provide MySQL connection details
Point your browser to install.php

What needs fixing:
MySQL queries sanitization
This version works, but it’s still far from stable, and still needs some functionality, so let’s call it “Alpha”
I know there will be a lot of critique, and I welcome it. Keep in mind it’s my first PHP project :)

«1

Comments

  • I'll try to install it on my free shared hosting account :) Thanks for sharing your work.

  • alexalex Member

    Not such a great idea (yet) as there's no login implemented, meaning everyone would be able to access it. I'm in the middle of adding authentication.

  • :O I see, then I'll have to install php in my nginx VPS :S

  • alexalex Member

    You could restrict access to the directory using htaccess though

  • $dName = mysql_real_escape_string(htmlentities($_POST['dname']));

    Use PDO, bitte?

  • alexalex Member

    @Ellimist said: Use PDO, bitte?

    will do, once I learn what it is!

  • alexalex Member

    @prae5 said: It installs fine, creates tables, etc... When you add a Registrar it works and if i check out the table in mysql the content is there. However, it never displays it in the web gui - Likewise it then prevents you adding a domain as it isn't listing it.

    I can't replicate it :(

  • @alex said: will do, once I learn what it is!

    Please take down the project until you make it use MySQLi or PDO. You will thank me later.

  • CronusCronus Member

    I have the same issue as @alex The entries are created but nothing is being displayed on the page.

    Using Debian 7 and lighttpd and php5.4.4-14 if it helps

  • alexalex Member

    @MrAndroid said: Please take down the project until you make it use MySQLi or PDO. You will thank me later.

    please get off your high horse sir

    @Cronus said: The entries are created but nothing is being displayed on the page.

    redownload it and try again, just pushed new commits

  • NoermanNoerman Member

    @alex said: Keep in mind it’s my first PHP project :)

  • joepie91joepie91 Member, Patron Provider
    edited May 2013

    Go have a read at http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers, to learn how to do MySQL in PHP properly.

    mysql_ is deprecated, dangerous, and must be avoided. No exceptions.

    Additionally, only use htmlspecialchars (not htmlentities!) on output and not in a query, so that the data in your database is 'clean' and untouched.

  • alexalex Member

    @joepie91 said: Go have a read at http://wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers, to learn how to do MySQL in PHP properly.

    thanks for the link, currently looking at NetTuts+, but will checki it later on

    @joepie91 said: use htmlspecialchars (not htmlentities!) on output and not in a query

    will do, next on my list

    At some point I would like to rewrite it using a framework, most likely Laravel, but not until most of the functionality is included, as this project is my way to learning PHP, using framework will be next step

  • joepie91joepie91 Member, Patron Provider

    @alex said: thanks for the link, currently looking at NetTuts+, but will checki it later on

    That seems like a surprisingly good article. A few remarks:

    • The article says it's not officially deprecated yet; by now, however, it is.
    • Be sure to use the prepare method - the quote method is still very insecure!
    • There's quite a few tutorials using insecure practices floating around on NetTuts+... while this particular one is good, others might not be. If in doubt, make a thread here and ask people whether they can see any issues with it :)

    @alex said: At some point I would like to rewrite it using a framework, most likely Laravel, but not until most of the functionality is included, as this project is my way to learning PHP, using framework will be next step

    That would probably be a good idea.

  • alexalex Member

    @joepie91 said: If in doubt, make a thread here and ask people whether they can see any issues with it :)

    will do thanks for all the tips!

  • alexalex Member
    // allow letters and numbers
    $action = preg_replace('/[^-a-zA-Z0-9_]/', '', $_GET['action']); 
    // allow only numbers for id
    $id = preg_replace("/[^0-9]/","", $_GET['id']);    
    

    Am I doing it right?

  • lol is he still locked out read this post

    http://dagent.org/2013/05/locked-out-of-let/

  • alexalex Member

    @kandosan said: lol is he still locked out read this post

    nah, it's been sorted here

  • udkudk Member

    @alex look at PHP's filter_var() with sanitization filters: http://www.php.net/manual/en/filter.filters.sanitize.php

  • alexalex Member
    edited May 2013

    @udk said: @alex look at PHP's filter_var() with sanitization filters: http://www.php.net/manual/en/filter.filters.sanitize.php

    thanks for the link, but is there anything wrong with doing it with regular expressions?

  • udkudk Member
    edited May 2013

    Use whatever you're comfortable with. Probably slightly slower to use regex, but for this sort of thing it isn't going to cause issues. One thing I do love filter_var() for is validating email addresses - regex for that can get extremely complicated if done right.

  • @alex Not if you know what you're doing No. <-period

  • JoeMeritJoeMerit Veteran

    can you make a function in the software that will automatically take the shittiest domains and create domain auctions for them on LET, will save a lot of work for a lot of people.

  • upfreakupfreak Member

    @JoeMerit said: can you make a function in the software that will automatically take the shittiest domains and create domain auctions for them on LET, will save a lot of work for a lot of people.

    You probably want AutoDomainAgent™ @Dewlance

  • CronusCronus Member

    @alex Works now, just need to check the case on your tables, creates domains but looks for Domains :)

  • alexalex Member

    @Cronus said: @alex Works now, just need to check the case on your tables, creates domains but looks for Domains :)

    done

  • blergh_blergh_ Member

    MySQL ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Domains.RegID' in 'field list'

    herp-derp.

  • alexalex Member
    edited May 2013

    @blergh_ said: herp-derp.

    save yourself time and move on, unless you know how to redownload fixed version

  • blergh_blergh_ Member

    @alex
    re-download fixed version? do you even git, bro.

  • Ben1002Ben1002 Member

    @blergh_

    It would take you 30 seconds to add the column that is missing.

Sign In or Register to comment.