meltedd / hvnc Goto Github PK
View Code? Open in Web Editor NEWStandalone HVNC Client & Server | Coded in C++ (Modified Tinynuke)
Standalone HVNC Client & Server | Coded in C++ (Modified Tinynuke)
I opened a GUI software through the command line [email protected] Inside the window, but it will open on the real user desktop
ps: [email protected] Network is too laggy
Hi, Thanks a lot for such simple and beautiful code.
It works good in my local network in win7_x86 with DNS 127.0.0.1:6667 .
It also works well when I port forward using portmap.io with DNS like xxxxxxx.portmap.host:6667 and use my own pc as server and client.
It even works, when I use win7_x86 virtualbox as client.
But connection is slow, when using on Microsoft hypervisor.
But its still little faster than qwqdanchun/HVNC.
Do you have any advice on how do I make it fast ?
I don't care for video quality or pixels.
From my experience, when we decrease pixels, its file size decreases.
Also black n white images with colorful images have file size ratio of 2x:3x.
So black n white image is liter and fast.
is normal ? to get this
i use Microsoft Visual Studio Professional 2019
HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\Server\Main.cpp(15,4): warning C4996: 'freopen': This function or variable may be unsafe. Consider using freopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\Server\Main.cpp(16,4): warning C4996: 'freopen': This function or variable may be unsafe. Consider using freopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\Server\Main.cpp(17,4): warning C4996: 'freopen': This function or variable may be unsafe. Consider using freopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>Server.cpp
1>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\Server\Server.cpp(382,38): warning C4018: '>': signed/unsigned mismatch
1>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\Server\Server.cpp(383,40): warning C4018: '>': signed/unsigned mismatch
1>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\Server\Server.cpp(505,10): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>Generating Code...
1>LINK : D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main_bin\Debug\Win32\Server.exe not found or not built by the last incremental link; performing full link
1>Server.vcxproj -> D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main_bin\Debug\Win32\Server.exe
1>Done building project "Server.vcxproj".
2>------ Build started: Project: Client, Configuration: Debug Win32 ------
2>Api.cpp
2>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\common\Api.h(7,32): warning C4455: 'operator ""END_ENC_STR': literal suffix identifiers that do not start with an underscore are reserved
2>HiddenDesktop.cpp
2>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\common\Api.h(7,32): warning C4455: 'operator ""END_ENC_STR': literal suffix identifiers that do not start with an underscore are reserved
2>HTTP.cpp
2>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\common\Api.h(7,32): warning C4455: 'operator ""END_ENC_STR': literal suffix identifiers that do not start with an underscore are reserved
2>Panel.cpp
2>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\common\Api.h(7,32): warning C4455: 'operator ""END_ENC_STR': literal suffix identifiers that do not start with an underscore are reserved
2>Utils.cpp
2>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\common\Api.h(7,32): warning C4455: 'operator ""END_ENC_STR': literal suffix identifiers that do not start with an underscore are reserved
2>Main.cpp
2>D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main\common\Api.h(7,32): warning C4455: 'operator ""END_ENC_STR': literal suffix identifiers that do not start with an underscore are reserved
2>Generating Code...
2>LINK : D:\Downloads\HVNC-HVNC - Tinynuke (Fixed)\HVNC-main_bin\Debug\Win32\Client.exe not found or not built by the last incremental link; performing full link
2>Starting pass 1
I am getting this error while building the server. Which packages should I install?
Severity Code Description Project File Line Hide Status
Error MSB8020 Cannot find build tools (Platform Toolkit = 'v142') for Visual Studio 2019. Please install Visual Studio 2019 build tools to build using v142 build tools. Alternatively, you can upgrade to the current Visual Studio tools by selecting the Project menu or right-clicking on the solution and then selecting "Retarget solution". Server C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets 460
.
due to not free the DG on the function BitmapToJpg
fix it:
oid BitmapToJpg(HDC* hDc, HBITMAP* hbmpImage, int width, int height)
{
ULONG_PTR gdiplusToken;
GdiplusStartupInput gdiplusStartupInput;
if (GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL) != Ok) {
return;
}
Funcs::pSelectObject(*hDc, hbmpImage);
Funcs::pBitBlt(*hDc, 0, 0, width, height, GetDC(0), 0, 0, SRCCOPY);
IStream* jpegStream = NULL;
if (CreateStreamOnHGlobal(NULL, TRUE, &jpegStream) != S_OK) {
GdiplusShutdown(gdiplusToken);
return;
}
Bitmap* image = Bitmap::FromHBITMAP(*hbmpImage, NULL);
if (!image || image->GetLastStatus() != Ok) {
jpegStream->Release();
GdiplusShutdown(gdiplusToken);
delete image;
return;
}
if (image->Save(jpegStream, &jpegID, NULL) != Ok) {
jpegStream->Release();
delete image;
GdiplusShutdown(gdiplusToken);
return;
}
delete image;
LARGE_INTEGER li = { 0 };
jpegStream->Seek(li, STREAM_SEEK_SET, NULL);
Bitmap* jpegImage = Bitmap::FromStream(jpegStream, FALSE);
jpegStream->Release();
if (!jpegImage || jpegImage->GetLastStatus() != Ok) {
delete jpegImage;
GdiplusShutdown(gdiplusToken);
return;
}
HBITMAP compressedImage = NULL;
jpegImage->GetHBITMAP(Color::White, &compressedImage);
Funcs::pGetDIBits(*hDc, compressedImage, 0, height, g_pixels, (BITMAPINFO*)&g_bmpInfo, DIB_RGB_COLORS);
delete jpegImage;
if (compressedImage) {
DeleteObject(compressedImage);
}
GdiplusShutdown(gdiplusToken);
}
Thanks for this modification.Stupid cheaters who steal people's code and make their business using this code.I hope their business will go to hell now.If you add some more options.I believe It will be more useful for people who are enthusiast.You can consider to add some options like.
1.start up Enable/Disable
2.Hidden execution mode/ no popup
3.Finally a builder where we can set port and dns / ip
And
Thanks for this nice works.
Everythin is working, except chrome
The port is read from stdin, can you update your server\Main.cpp to support parsing port from command line arguments?
solved
processes dont spawn except for explorer, powershell, run, and those dont respond to clicks or keyboard inputs
edit: browsers actually do spawn but its unbelievably slow. and unable to be interacted with in any way
tested the hvnc, and its awesome! but i cant seem to launch edge. all the other browsers work fine except edge. please fix it if you can :)
hey a tried compiling the server and client by using g++ with the g++ .cpp -o command and it gave me errors. Here are the logs
HiddenDesktop.cpp: In function 'SOCKET ConnectServer()':
HiddenDesktop.cpp:229:24: warning: converting to non-pointer type 'SOCKET' {aka 'long long unsigned int'} from NULL [-Wconversion-null]
229 | return NULL;
| ^~~~
HiddenDesktop.cpp:231:24: warning: converting to non-pointer type 'SOCKET' {aka 'long long unsigned int'} from NULL [-Wconversion-null]
231 | return NULL;
| ^~~~
HiddenDesktop.cpp:239:24: warning: converting to non-pointer type 'SOCKET' {aka 'long long unsigned int'} from NULL [-Wconversion-null]
239 | return NULL;
| ^~~~
HiddenDesktop.cpp: In function 'void killproc(const char)':
HiddenDesktop.cpp:326:69: warning: passing NULL to non-pointer argument 2 of 'void* CreateToolhelp32Snapshot(DWORD, DWORD)' [-Wconversion-null]
326 | HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, NULL);
| ^~~~
In file included from Client../common/Common.h:13,
from Client\HiddenDesktop.h:2:
C:/msys64/mingw64/include/TlHelp32.h:15:62: note: declared here
15 | HANDLE WINAPI CreateToolhelp32Snapshot(DWORD dwFlags,DWORD th32ProcessID);
| ~~~~~~^~~~~~~~~~~~~
HiddenDesktop.cpp: In function 'void StartFirefox()':
HiddenDesktop.cpp:480:1: error: jump to label 'exit'
480 | exit:
| ^~~~
HiddenDesktop.cpp:448:22: note: from here
448 | goto exit;
| ^~~~
HiddenDesktop.cpp:477:29: note: crosses initialization of 'PROCESS_INFORMATION processInfo'
477 | PROCESS_INFORMATION processInfo = { 0 };
| ^~~~~~~~~~~
HiddenDesktop.cpp:474:22: note: crosses initialization of 'STARTUPINFOA startupInfo'
474 | STARTUPINFOA startupInfo = { 0 };
| ^~~~~~~~~~~
HiddenDesktop.cpp:466:14: note: crosses initialization of 'char browserPath [260]'
466 | char browserPath[MAX_PATH] = { 0 };
| ^~~~~~~~~~~
HiddenDesktop.cpp:452:14: note: crosses initialization of 'char realPath [260]'
452 | char realPath[MAX_PATH] = { 0 };
| ^~~~~~~~
HiddenDesktop.cpp:480:1: error: jump to label 'exit'
480 | exit:
| ^~~~
HiddenDesktop.cpp:445:22: note: from here
445 | goto exit;
| ^~~~
HiddenDesktop.cpp:477:29: note: crosses initialization of 'PROCESS_INFORMATION processInfo'
477 | PROCESS_INFORMATION processInfo = { 0 };
| ^~~~~~~~~~~
HiddenDesktop.cpp:474:22: note: crosses initialization of 'STARTUPINFOA startupInfo'
474 | STARTUPINFOA startupInfo = { 0 };
| ^~~~~~~~~~~
HiddenDesktop.cpp:466:14: note: crosses initialization of 'char browserPath [260]'
466 | char browserPath[MAX_PATH] = { 0 };
| ^~~~~~~~~~~
HiddenDesktop.cpp:452:14: note: crosses initialization of 'char realPath [260]'
452 | char realPath[MAX_PATH] = { 0 };
| ^~~~~~~~
HiddenDesktop.cpp:446:15: note: crosses initialization of 'char* pathEnd'
446 | char pathEnd = Funcs::pStrStrA(path, "\r");
| ^~~~~~~
HiddenDesktop.cpp:480:1: error: jump to label 'exit'
480 | exit:
| ^~~~
HiddenDesktop.cpp:439:22: note: from here
439 | goto exit;
| ^~~~
HiddenDesktop.cpp:477:29: note: crosses initialization of 'PROCESS_INFORMATION processInfo'
477 | PROCESS_INFORMATION processInfo = { 0 };
| ^~~~~~~~~~~
HiddenDesktop.cpp:474:22: note: crosses initialization of 'STARTUPINFOA startupInfo'
474 | STARTUPINFOA startupInfo = { 0 };
| ^~~~~~~~~~~
HiddenDesktop.cpp:466:14: note: crosses initialization of 'char browserPath [260]'
466 | char browserPath[MAX_PATH] = { 0 };
| ^~~~~~~~~~~
HiddenDesktop.cpp:452:14: note: crosses initialization of 'char realPath [260]'
452 | char realPath[MAX_PATH] = { 0 };
| ^~~~~~~~
HiddenDesktop.cpp:446:15: note: crosses initialization of 'char pathEnd'
446 | char pathEnd = Funcs::pStrStrA(path, "\r");
| ^~~~~~~
HiddenDesktop.cpp:443:15: note: crosses initialization of 'char path'
443 | char *path = Funcs::pStrStrA(profilesIniContent, Strs::hd13);
| ^~~~
HiddenDesktop.cpp:441:14: note: crosses initialization of 'BOOL isRelative'
441 | BOOL isRelative = (*isRelativeRead == '1');
| ^~~~~~~~~~
HiddenDesktop.cpp: In function 'DWORD InputThread(LPVOID)':
HiddenDesktop.cpp:532:34: warning: converting to non-pointer type 'long long int' from NULL [-Wconversion-null]
532 | LRESULT resMoveType = NULL;
| ^~~~
HiddenDesktop.cpp:663:92: warning: converting to non-pointer type 'WPARAM' {aka 'long long unsigned int'} from NULL [-Wconversion-null]
663 | LRESULT lResult = Funcs::pSendMessageA(hWnd, WM_NCHITTEST, NULL, lParam);
| ^~~~
HiddenDesktop.cpp:670:92: warning: converting to non-pointer type 'WPARAM' {aka 'long long unsigned int'} from NULL [-Wconversion-null]
670 | lResult = Funcs::pSendMessageA(hWnd, WM_NCHITTEST, NULL, lParam);
| ^~~~
HiddenDesktop.cpp:716:63: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
716 | HMENU hMenu = (HMENU)Funcs::pSendMessageA(hWnd, MN_GETHMENU, 0, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HiddenDesktop.cpp:731:96: warning: converting to non-pointer type 'WPARAM' {aka 'long long unsigned int'} from NULL [-Wconversion-null]
731 | resMoveType = Funcs::pSendMessageA(hWnd, WM_NCHITTEST, NULL, lParam);
| ^~~~
When I make the hvnc connection, the screen comes up. I can run brave etc applications, but in no way, my clicks and keyboard actions are not reflected on the client. There is only the screen.
when u send it to another pc and open it its a big black window that if u close disconnects from server how to fix
After one minute or when excuting start chrome, the screen changes to Dodger Blue.
This repo isnt being updated but just letting people know that im getting a black screen, if anyone else is getting this issue.
Is this hvnc still undetectable by windows defender?
Anybody Explain The Steps How to Run This With all Steps include which files to compile super comfuse !!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.