1
0
Fork 0
forked from Elijah/AudioBot
AudioBot/name.c
2024-01-25 22:08:47 -05:00

24 lines
589 B
C

#include <stdio.h>
#include <rfb/rfbclient.h>
#define VNC_PASSWORD "D0gg0!!!"
char * getpassword(rfbClient *client) {
return strdup(VNC_PASSWORD);
};
int main(int argc, char **argv) {
rfbClient* client = rfbGetClient(8,3,4);
rfbEnableClientLogging = FALSE;
client->GetPassword = getpassword;
if (!rfbInitClient(client,&argc,argv) || WaitForMessage(client,50) < 0 || !HandleRFBServerMessage(client)) return 1;
if (*client->desktopName) {
fputs(client->desktopName, stdout);
} else {
printf("a virtual machine");
};
rfbClientCleanup(client);
return 0;
}