Howdy, Stranger!

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

Top Posters

Who's Online (1)

Powered by Vanilla. Made with Bootstrap.
SourcEx.info - The Source Code Database
  • Mr. P-teoMr. P-teo
    Posts: 270
    [align=center]http://www.sourcex.info/images/logo.png[/align]

    http://www.sourcex.info

    SourcEx a free source code database, it is basiclly a search engine for source codes it links to sites that contain the code or you can paste it via our Paste bin API.

    Thanks to everyone who submits there code, you are helping me aswell as other people.

    http://www.sourcex.info
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Xin
    Posts: 3,251
    Looks a nice site, added it to our affiliates. Good luck with it.
    Xin
  • Sh3llc0d3
    Posts: 1,910
    Any language restrictions? Looks a fantastic idea!
  • Xin
    Posts: 3,251
    Suggestions to make it better, add a list page where it lists all the source codes in date added order, with page [1] [2] [3] etc at the bottom.

    As searching can be a pain if you dont know the exam name ;)
    Xin
  • Mr. P-teoMr. P-teo
    Posts: 270
    ^ noted, im working on such features shouldn't take me too long to sort
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Xin
    Posts: 3,251
    said:


    ^ noted, im working on such features shouldn't take me too long to sort



    Added some source code :) il add some more soon.
    Xin
  • Xin
    Posts: 3,251
    You should also have the author field in submit.

    Then you can have things like top submitters and stuff.
    Xin
  • Mr. P-teoMr. P-teo
    Posts: 270
    thanks for the support, im working on the list of all the source's, my only issue is i want to display them newest first but ill find a way[hr]
    said:


    Any language restrictions? Looks a fantastic idea!



    No any language, supports all
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Sh3llc0d3
    Posts: 1,910
    Assuming your using SQL, a simple ORDER BY added onto a query should be ok :)
  • Xin
    Posts: 3,251
    said:


    thanks for the support, im working on the list of all the source's, my only issue is i want to display them newest first but ill find a way[hr]

    said:


    Any language restrictions? Looks a fantastic idea!



    No any language, supports all


    Order by primary key ascending(/descending i cant remember which) that way the newest ones come first.
    Xin
  • Mr. P-teoMr. P-teo
    Posts: 270
    ^ yer somethng like that, i will look into it
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • sangf
    Posts: 203
    perhaps you could use the pastebin api to allow scripts to be pasted from your site, too. it would save an external step to adding code at least.
  • Mr. P-teoMr. P-teo
    Posts: 270
    ^ good suggestion, might do that, or i will make an upload so it saves the files to my host
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Sh3llc0d3
    Posts: 1,910
    Shouldn't you be able to just embed the pastebin data... I'm sure i've seen that done before.
  • Mr. P-teoMr. P-teo
    Posts: 270
    Updated SourcEx, you can now submit and upload your script on my site,
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • sangf
    Posts: 203
    that's pretty cool! :) a few problems appear on the uploaded source, though. i guess because you used something like htmlspecialchars() on the input? and for some off reason things between < and > disapeared (see #include in example below).

    example: http://pastebin.com/FxF0WGEw

    should look like this:


    /**
    * C++ numeric base conversions
    *
    * - sangf
    */

    #include &lt;string&gt;
    #include &lt;climits&gt;
    #include &lt;iostream&gt;

    #if INT_MAX == 2147483647 && UINT_MAX == 4294967295
    typedef int int_32t;
    typedef unsigned int uint_32t;
    #elif LONG_MAX == 2147483647 && ULONG_MAX == 4294967295
    typedef int int_32t;
    typedef unsigned int uint_32t;
    #else
    # error 32-bit integers required for this code
    #endif


    static const char *base_lookup = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\";
    std&#58;&#58;string dec_to_base(int_32t number, int_32t base);

    std&#58;&#58;string dec_to_base(int_32t number, int_32t base)
    {
    if (base &lt;= 1 || base &gt;= 37) throw;
    else
    {
    bool negative = false;
    if (number &lt; 0)
    {
    number -= (number * 2); // negation
    negative = true;
    }
    std&#58;&#58;string hex_int_32t;
    int result = number, remain = 0;
    do
    {
    number = number / base; // division result
    remain = result % base; // remainder result
    result = number;
    hex_int_32t&#46;insert(0, 1, base_lookup&#91;remain&#93;);

    } while (result != 0);

    if (negative) hex_int_32t&#46;insert(0, 1, '-');
    return hex_int_32t;
    }
    }
  • Mr. P-teoMr. P-teo
    Posts: 270
    HMMM, thanks for this information, cant understand why that has happened
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Sh3llc0d3
    Posts: 1,910
    Because as sangf said, you've used a mechanism (I think) to stop malicious code and it's removing anything between the < > to stop any potential code injection.
  • Mr. P-teoMr. P-teo
    Posts: 270
    ^ Thats what iv done but iv removed the mechanism but now im worried about malicious code etc
    Skype: mrpt3o
    Twitter: MrPteo


    image
  • Sh3llc0d3
    Posts: 1,910
    I think you'll find it hard getting a balance between security lockdown and freely uploadable code... possibly worth checking out the pastebin API. If you can, you could make a .cgi script that creates new pastes and php or cgi that shows the pastes.

    Example script (python)
    http://winappdbg.sourceforge.net/blog/pastebin.py
  • Mr. P-teoMr. P-teo
    Posts: 270
    i think i have done enough on that for the time being, Iv PM'ed you about one other update
    Skype: mrpt3o
    Twitter: MrPteo


    image