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

Pages: 1-4041-

Try to kill my web server

Name: Anonymous 2015-07-24 19:50

Come at me brah

http://5.101.97.110:81/

Name: Anonymous 2015-07-24 19:59

Well why not! We're your personal army after all.

Name: Anonymous 2015-07-24 20:01

>>2
You were not invited anyways.

Name: Anonymous 2015-07-24 23:23

LOL that wasn't fucking hard. Goodbye web server

Name: Anonymous 2015-07-24 23:25

Just in case you're curious
curl --data-binary @lol.txt http://5.101.97.110:81
The contents of lol.txt:
OP is a faggot haha

Name: Anonymous 2015-07-24 23:39

Thank you

Name: Anonymous 2015-07-24 23:48

It's back online now, extra hardened.

Name: Anonymous 2015-07-24 23:57

You didn't fix it. Same thing -> brokey

Name: Anonymous 2015-07-25 0:02

Server: myn3

Are you trying to prove that it's pretty much a terrible idea to try to write your own HTTP server? There are so many choices that have all seen real-world use have been worked on by very smart people that consider edge cases like someone POSTing a text file as binary. Anyway if that's what you're doing, good job! :^)

Name: Anonymous 2015-07-25 0:05

Just use something like https://www.hiawatha-webserver.org/ with FCGI

Name: Anonymous 2015-07-25 0:10

>>8
It's something else now, something that didn't break in my desktop machine
>>9
It's a web application, not much a web server in the sense since it only serves a very specific set of things.
Plus those very smart people are the same that made retard decisions like the architecture of the Apache server.
>>10
I don't bloated shit to store images.

My website may be crashing, but at least is only one day old.

Name: Anonymous 2015-07-25 0:16

>>8
The problem was I forgot to compile it the last time around.

Name: Anonymous 2015-07-25 0:20

What language is this in?

Name: Anonymous 2015-07-25 0:22

>>13
C.

It will be offline for a while now because I found an unrelated bug.

Name: Anonymous 2015-07-25 0:24

>>12
The point is, I am not even a security researcher or anything, and it took me less than 5 minutes to take it down. Sure, you will probably be able to win a game of catch the vuln with me specifically, but that's not saying hardly anything at all.

Fuck I hate it when people use ``bloat'' as an excuse for their NIH syndrome. IHBT

Name: Anonymous 2015-07-25 0:27

>>15

What would be the fun in using python or php?

Name: Anonymous 2015-07-25 0:51

>>16
Hiawatha is in C. FCGI is a C library. You are a nignog.

Name: Anonymous 2015-07-25 1:24

Give us the source code. Or are you enforcing security-through-obscurity? That's usually a bad idea.

Name: Anonymous 2015-07-25 1:29

>>17

I assumed FCGI is some implementation of CGI, which is unnecessary formy needs.

Name: Anonymous 2015-07-25 1:30

>>18

I'm still working on it, I just scrapped the encoded form parser all together.

Name: Anonymous 2015-07-25 1:44

This is painful, just use nginx for gods sake

Name: Anonymous 2015-07-25 2:00

There, fixed and back again -- for now.

I also put the code in a github gist, it's ugly but fuck it, I'm off to bed.
https://gist.github.com/gonmf/4f8c3eddc70e48e745ee

Name: Anonymous 2015-07-25 2:03

Oh come on!

Name: Anonymous 2015-07-25 5:54

Holy shit IHBT

case POST:
if(strcmp(request_uri, "/") == 0){
char not_an_image = 0;
char too_large = 0;
char format_error = 0;
char out_of_memory = 0;
char format_error_or_too_large = 0;
file_info * data = parse_data(buffer, request_size, &not_an_image, &too_large, &format_error, &out_of_memory, &format_error_or_too_large);
if(not_an_image)
return_msg(400, "Bad Request", "File is not an image.", client_fd);
else
if(too_large)
return_msg(400, "Bad Request", "File is too large.", client_fd);
else
if(format_error)
return_msg(400, "Bad Request", "Malformed request.", client_fd);
else
if(out_of_memory)
return_msg(400, "Bad Request", "System out of memory", client_fd);
else
if(format_error_or_too_large)
return_msg(400, "Bad Request", "File is too large or the request was malformed.", client_fd);
else
if(data == NULL){
return_msg(400, "Bad Request", "Unspecified error parsing request.", client_fd);
}else{
save_file(data);
return_hyperlink_to_file(data, client_fd);
free(data);

Name: Anonymous 2015-07-25 9:57

Application Logic in See

Name: Anonymous 2015-07-25 14:13

>>22
Jesus. Use an enum instead of a list of defines, don't do that stupid init_id and new_id bullshit, stop declaring everything as static, pass/return struct pointers instead of having 10,000 function parameters, use bitfields or another enum instead of having cascading if/else for each variable, and abstract your parsers.

Name: Anonymous 2015-07-25 14:15

>>22
Also use nonblocking I/O with poll or select instead of relying on RCV_TIMEO because as it is your server can easily be locked up because of the listen_fd queue.

Name: Anonymous 2015-07-25 15:35

/ >>26-27 Shut your whore mouth when you \
| don't know what you're talking about. |
| Of course the server is susceptible to |
| denial of service, and it would be even |
| if I used poll or select, the fucking |
| abominations. And yes, it is obvious I |
| could use switches. And the init_id and |
| new_id is perfect the way it is go eat |
| a dick. And declaring everything as |
| static is good practice when you know |
| it doesn't have to be visible you cock |
| juggler. And fuck yoru abstraction I |
| didn't ask for your opinion, I should |
| have written it in asm just so you |
\ could qq more. /
-----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||

Name: Anonymous 2015-07-25 16:07

>>28
It would be far less susceptible to it if you used multiplexing, retard. You're a shit programmer, acknowledge it so you can stop churning out disgusting code. There's absolutely no reason why new_id and init_id need refer to a global/file scope variable. You've structured the program horribly, so static or not it's still shit.

Name: Anonymous 2015-07-25 16:28

>>29
You don't tell me what to do, C is abstract enough for me that I don't get confused by a measly few hundred lines of code in a single file.
But if you can do a better job do it, without copying shit and post a link to the source, you have until 2015-07-26 16:25 server time. Go.

I'll be waiting faggot.

inb4: actually C is too hardd, I don't have the time alone in my basementtt, I just don't like epoll/IOCP all the way, I didn't say I could program either~~

Name: Anonymous 2015-07-25 17:58

>>30
Whom are you quoting?

Name: Anonymous 2015-07-25 20:02

>>31
Who are you quoting?

Name: Anonymous 2015-07-25 20:15

>>31
>>32
your mom

Name: Anonymous 2015-07-25 21:35

>>33
Optimise your quotes, 「下さい」

Name: Anonymous 2015-07-26 3:52

>>34
Optimize your grammar, 「amabo te」

Name: Anonymous 2015-07-26 5:03

>>30
Non-shit programmers have better things to do than re-implement HTTP servers for the 10,000th time. They just use what's already available. This is just your toy, for fun, we get it. I just hope you learned that what you're doing is not a good idea in the real world. I guess? In reality I could care less, literally everything is pointless, software in general is shit, and I should just kill myself

Name: Anonymous 2015-07-26 7:38

>>36
Why would you kill yourself because software is pointless?

Name: Anonymous 2015-07-26 9:32

>>35
Optimise

Name: Anonymous 2015-07-26 11:03

>>36
Are you okay?

Name: Anonymous 2015-07-26 16:14

>>36
How much less could you care?

Name: Anonymous 2015-07-26 19:39

>>39
Yes
>>40
s/ould/ouldn't/

Name: Anonymous 2015-07-27 11:28

Well and now it also supports compression as per the HTTP standard. And still online, would you look at that.

Name: Faeron 2015-08-23 11:21

Hiawatha is the best. Apache is bloated, nginx has stability issues.

Name: Anonymous 2015-08-23 11:32

Has OP killed himself yet? If not, he'd better get around to it soon.

Name: Anonymous 2015-08-23 15:42

>>43
No, OSU/DECthreads is best.

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