Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _CRT_SECURE_NO_WARNINGS
- #pragma comment(lib, "ws2_32.lib")
- #include <winsock2.h>
- #include <WS2tcpip.h>
- #include <windows.h>
- #include <stdio.h>
- #pragma comment(lib, "lua51.lib")
- extern "C"
- {
- #include "lua.h"
- #include "lauxlib.h"
- #include "lualib.h"
- }
- #define LUA_FUNCTION(name) static int name(lua_State *L)
- #define MAX_CONNECTIONS 32
- #define BUFFER_SIZE 1024
- #define halloc(size) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size)
- #define hfree(ptr) HeapFree(GetProcessHeap(), 0, ptr);
- #define B 1
- #define KB B * 1024
- #define MB KB * 1024
- #define GB MB * 1024
- #define LUA_PRINTBUFFER_SIZE MB
- #define HTTP_DEFAULT_FILE "/index.html"
- #define HTTP_VER "HTTP/1.1 %s\r\n"
- #define HTTP_DATE "%a, %d %b %Y %I:%M:%S %Z\r\n"
- #define HTTP_SERVER "Server: microserver\r\n"
- #define HTTP_CACHECONTROL "Cache-Control: no-cache\r\n"
- #define HTTP_KEEPALIVE "Keep-Alive: timeout=15, max=800\r\n"
- #define HTTP_CONNECTION "Connection: Keep-Alive\r\n"
- #define HTTP_CONTENTTYPE "Content-Type: %s\r\n\r\n"
- #define HTTP_404_CONTENT "<html>\n<head>\n\t<title>Error! 404 Not Found</title>\n<head>\n<body>\n\t<h1 style=\"text-align:center\">Error! 404 Not Found</h1>\n</body>\n</html>"
- int main(int argc, char *aargv[]);
- void parsesendGET(SOCKET *cs, char *request);
- char *ParseLuaTags(char *html);
- LUA_FUNCTION(l_print);
- void ProfileSection2str(char *sec);
- int lstrcmpn(char *str1, char *str2, int size);
- int lstrcnt(char *str1, char chr);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement