1
0
Fork 0
forked from Elijah/AudioBot
AudioBot/name.c

25 lines
589 B
C
Raw Normal View History

2024-01-25 22:03:22 -05:00
#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;
}