Upload files to "/"

This commit is contained in:
meer 2026-07-19 22:29:48 +00:00
parent 8254b9444f
commit 8f7f60fa6c
2 changed files with 35 additions and 0 deletions

35
elon_all.c Normal file
View File

@ -0,0 +1,35 @@
// elon_all.c
// elonizes ur system
/* compile:
gcc -shared -fPIC -o elon_all.so elon_all.c -ldl
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <dlfcn.h>
#include <string.h>
int printf(const char *fmt, ...) {
(void)fmt;
return fprintf(stdout, "elon musk\n");
}
ssize_t write(int fd, const void *buf, size_t count) {
(void)buf; (void)count;
const char *msg = "elon musk\n";
size_t len = strlen(msg);
// Call the real write
static ssize_t (*real_write)(int,const void*,size_t) = NULL;
if (!real_write) real_write = dlsym(RTLD_NEXT, "write");
return real_write(fd, msg, len);
}
ssize_t send(int sockfd, const void *buf, size_t len, int flags) {
(void)buf; (void)len; (void)flags;
const char *msg = "elon musk\n";
size_t mlen = strlen(msg);
static ssize_t (*real_send)(int,const void*,size_t,int) = NULL;
if (!real_send) real_send = dlsym(RTLD_NEXT, "send");
return real_send(sockfd, msg, mlen, flags);
}

BIN
elon_all.so Normal file

Binary file not shown.