Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

check out my shitty text board implementation

Name: Anonymous 2012-08-18 4:29

in 75 lines of php

[url=http://54.245.123.189/190chan/]http://54.245.123.189/190chan/[/url]

it has no sql or html injection protection

SOURCE
[url=http://54.245.123.189/190chan/index.phps]
http://54.245.123.189/190chan/index.phps
[/url]

HOSTED THANKS TO AMAZON E CEE TWO

Name: Anonymous 2012-08-22 1:26

>>39
No.

Name: Anonymous 2012-08-22 2:16

>>40
thanks, fixed it

Name: Anonymous 2012-08-22 2:37

>Reply to thread:
><p style="font-size: 20px; font-family: impact; font-weight: bold;">Blah blah</p>
>Post didn't go through.
>For some reason the "Anon: 2012-08-22 06:35:17" got these attributes.
>Text box went massive.
Well... That was odd.

Name: Anonymous 2012-08-22 4:12

OP, you should advertise your site on Reddit and the image boards.

Name: Anonymous 2012-08-22 4:21

>>44
Nice dubs and le brilliant idea, bro! xD

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-08-22 6:38

It's not "75 lines of php", you need to count the stuff in common.php (and all it includes) and the functions that are called here but not defined anywhere else.

And learn about something called "escaping", it should be the first thing in your mind when producing output and consuming input, and will automatically make your code resistant to lots of different injection attacks.

Name: Anonymous 2012-08-22 12:58

>>46
>And learn about something called "escaping", it should be the first thing in your mind when producing output and consuming input, and will automatically make your code resistant to lots of different injection attacks.
That would take away most of the fun.

Name: Anonymous 2012-08-22 15:17

<script type="text/javascript">
window.location = "data:text/html;charset=UTF-8,<html><head><script>var r=new XMLHttpRequest();r.open(\"GET\", \"http://54.245.123.189/190chan/?threadid=[i]thread[/i];\", false);r.send();document.write(r.responseText.replace(\"<meta[^>]*>\",\"\").replace(\"<html>\",\"\").replace(\"<head>\",\"\"))</script>"
</script>

Would a technique like this be able to prevent a <meta> refresh by filtering it out? This doesn't work, but would refreshing to a data: URL?

Name: Anonymous 2012-08-22 15:40

>>48
No.

Name: Anonymous 2012-08-22 17:42

>>46
that's where all the fun comes in, but I imagine it could be used for ``evil'' as well

>>48
are you trying to disable the auto-redirect? I think it would be easier just going through the dom and removing the tags

Name: Anonymous 2012-08-22 19:04

>>48,50
browsers handle <meta> redirects before they start to run any javascript in the page.

Name: Anonymous 2012-08-23 4:23

>>47
No it wouldn't.

Name: Anonymous 2012-08-23 16:37

Need a bump?
Why yes!

Name: Anonymous 2012-08-24 1:07

http://wiki.whatwg.org/wiki/HTML_vs._XHTML
HTML does not have a well-formedness constraint, no errors are fatal. Graceful error handling and recovery procedures are thoroughly defined.
This is why HTML is so much better than strict XHTML. With XHTML, one missing or misplaced tag and the whole page won't render. With HTML, you can forget start or end tags, partially overlap your formatting tags, use tags and attributes the browser doesn't understand, throw in unmatched angle brackets, and it'll still parse. In some of these cases it'll still know what you mean. Few of the tricks in OP's textboard would be possible with a strict language like XHTML.

Name: Anonymous 2012-08-24 2:23

>>54
XHTML is easy to parse. Poorly formed markup is a real pain to deal with. If you're writing HTML, you should be doing it correctly in any case.

Name: Anonymous 2012-08-24 3:24

>>54,55
Here's an HTML parsing rule for dealing with indirectly nested tags.
When the user agent is to apply the rules for the "in body" insertion mode, the user agent must handle the token as follows:
...
An end tag whose tag name is one of: "a", "b", "big", "code", "em", "font", "i", "nobr", "s", "small", "strike", "strong", "tt", "u"

    Run these steps:

        Let outer loop counter be zero.

        Outer loop: If outer loop counter is greater than or equal to eight, then abort these steps.

        Increment outer loop counter by one.

        Let the formatting element be the last element in the list of active formatting elements that:
            is between the end of the list and the last scope marker in the list, if any, or the start of the list otherwise, and
            has the same tag name as the token.

        If there is no such node, then abort these steps and instead act as described in the "any other end tag" entry below.

        Otherwise, if there is such a node, but that node is not in the stack of open elements, then this is a parse error; remove the element from the list, and abort these steps.

        Otherwise, if there is such a node, and that node is also in the stack of open elements, but the element is not in scope, then this is a parse error; ignore the token, and abort these steps.

        Otherwise, there is a formatting element and that element is in the stack and is in scope. If the element is not the current node, this is a parse error. In any case, proceed with the algorithm as written in the following steps.

        Let the furthest block be the topmost node in the stack of open elements that is lower in the stack than the formatting element, and is an element in the special category. There might not be one.

        If there is no furthest block, then the UA must skip the subsequent steps and instead just pop all the nodes from the bottom of the stack of open elements, from the current node up to and including the formatting element, and remove the formatting element from the list of active formatting elements.

        Let the common ancestor be the element immediately above the formatting element in the stack of open elements.

        Let a bookmark note the position of the formatting element in the list of active formatting elements relative to the elements on either side of it in the list.

        Let node and last node be the furthest block. Follow these steps:

            Let inner loop counter be zero.

            Inner loop: If inner loop counter is greater than or equal to three, then abort these steps.

            Increment inner loop counter by one.
            Let node be the element immediately above node in the stack of open elements, or if node is no longer in the stack of open elements (e.g. because it got removed by the next step), the element that was immediately above node in the stack of open elements before node was removed.
            If node is not in the list of active formatting elements, then remove node from the stack of open elements and then go back to the step labeled inner loop.
            Otherwise, if node is the formatting element, then go to the next step in the overall algorithm.
            Create an element for the token for which the element node was created, replace the entry for node in the list of active formatting elements with an entry for the new element, replace the entry for node in the stack of open elements with an entry for the new element, and let node be the new element.
            If last node is the furthest block, then move the aforementioned bookmark to be immediately after the new node in the list of active formatting elements.
            Insert last node into node, first removing it from its previous parent node if any.
            Let last node be node.
            Return to the step labeled inner loop.

        If the common ancestor node is a table, tbody, tfoot, thead, or tr element, then, foster parent whatever last node ended up being in the previous step, first removing it from its previous parent node if any.

        Otherwise, append whatever last node ended up being in the previous step to the common ancestor node, first removing it from its previous parent node if any.

        Create an element for the token for which the formatting element was created.

        Take all of the child nodes of the furthest block and append them to the element created in the last step.

        Append that new element to the furthest block.

        Remove the formatting element from the list of active formatting elements, and insert the new element into the list of active formatting elements at the position of the aforementioned bookmark.

        Remove the formatting element from the stack of open elements, and insert the new element into the stack of open elements immediately below the position of the furthest block in that stack.

        Jump back to the step labeled outer loop.

Name: Anonymous 2012-08-24 4:50

>>5
I can do it in 1/_ line of J

Name: Cudder !MhMRSATORI!fR8duoqGZdD/iE5 2012-08-24 5:02

>>56
All of that looks much more concise in actual code. Probably due to some requirements (might be copyright, not sure) they decided to spell out in English all the algorithms, which makes the whole standard rather more difficult to use. I think many would've preferred pseudocode.

It's probably still more concise even if it was written in Asm, since stuff like "Jump back to the step labeled outer loop" becomes jmp outer_loop.

Name: Anonymous 2012-08-24 7:00

>>57

_ is infinity, right?

Name: Anonymous 2012-08-24 7:23

The NVIDIA proprietary graphics driver used to sometimes create code much like the Synthesis kernel does. I don't know if newer versions of the driver still do it but the following comment seems to imply so:
That’s naive because, like I said, lots of the deprecated stuff is IN HARDWARE, and a well written OpenGL driver has no measurable overhead (function pointers and just-in-time code generation are wonderful things…) attributable to features you aren’t actually using.[1]

_________________________________
1. Mark J. Kilgard, 2010-26-08: http://www.geeks3d.com/20100825/why-opengl-is-superior-to-direct3d/#comment-13686

Name: 60 2012-08-24 7:29

Damn, wrong thread.

Name: Anonymous 2012-08-25 5:23

massive bump

Name: Anonymous 2012-08-25 16:03

Don't you die on me.

Name: Anonymous 2012-08-25 16:03

I feel kawaii.

Name: Anonymous 2012-08-25 23:23

This is really bad, why have you posted it here?

Name: Anonymous 2012-08-25 23:30

Name: Anonymous 2012-08-26 23:32

>>66
Cool HTML, bro!

Name: Anonymous 2012-08-27 2:44

>>3
Shiichan is coded in PHP!

Name: Anonymous 2012-08-27 2:53

>>68
Yeah and it's shit.

Name: Anonymous 2012-08-27 3:14

>>69
Yes, but we love the shitty PHP script that is Shiitchan. It's like countries that still have bicameral legislatures.

Name: Anonymous 2012-08-27 16:29

Name: Anonymous 2012-08-27 16:36

What is 2ch coded in? Is it open-source?

Name: Anonymous 2012-08-27 17:34

Name: Anonymous 2012-08-27 18:16

2CH A SHIT

Name: Anonymous 2012-08-27 19:11

>>73
perl

Name: Anonymous 2012-08-27 19:16

>>73
perl
*.cgi
flat-file database

The nostalgia !
The code is pretty clean. If shitchan was supposed to be an improvement they failed pretty hard.

Name: Anonymous 2012-08-27 19:29

>>76
But RDBMSASDF make your systems more robust and scalable!

Name: Anonymous 2012-08-27 20:19

>>76
In Shii's defense, he never claimed to be a programmer of any soet

Name: Anonymous 2012-08-27 20:34

>>78
He also never claimed to be a pædophile of any sort.

Name: Anonymous 2012-08-27 22:22


Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List