Page 2 of 3

Re: Simple Remote Desktop

Posted: Sun Feb 23, 2025 6:35 pm
by AZJIO
Etayson
There are examples of data transmission over the network here on the forum, and I also wanted to write such a program. But the problem appeared when I began to think about how I could reduce the data flow by determining the difference between the current and the previous frame in order to transfer the square with the changes and place it on the previous frame. Then I realized that it would put a lot of strain on the processor if a video was playing on the screen. Then you need to determine the window where the video is playing and not analyze it, but transfer it as it is. That is, we need a function that defines windows. But the windows can also overlap with each other. In general, I got confused and realized that I couldn't do it. There was also an idea to capture the screen with 1 cm squares, if the squares did not change, they would be used from the previous frame, and on another desktop they would form a picture like puzzles. Well, the screens also don't match, as a result, you either need to scale the window or transfer it as it is using scrolling. In general, I realized that this is a hard job.
Or maybe need a video codec that determines all this by itself?

Re: Simple Remote Desktop

Posted: Sun Feb 23, 2025 6:39 pm
by Kwai chang caine
Hello Etayson,

First....it's the first time (i believe :oops: ) i talk to you, and i'm happy to can do that 8)

After, thanks a lots for your precious explanations, i understand better now 8)
You cannot imagine the pleasure you make to me when you have posted this jewel of code :shock:
I say to me : "It's surely not a full code with the main functions of VNC and surely without fludity" :|
At the beginning, i cannot use your nice work, because it's so simple....with the minimum of gadget that i not see the button change of "Connect" to "Accept" :oops:
And after numerous try...i see the "Accept" and after click, the miracle, an apparition, the graal... :shock:

Image

And I was so happy,

Image

that it reminded me of the good old days, several decades ago when I saw the codes of the great masters of this forum perform miracles with PB, that I did not believe possible.

Image

I would have danced on my desk

Really, you gave me one of the two dreams that I have been trying to achieve since the beginning that I entered the wonderful PB family
And I want to thank you once again, for the happiness that your extraordinary code, brings me 8)

Thanks to you, I will finally be able to help my whole family without having to create accounts, enter passwords :evil:
Because applications like teamviewver are less and less easy to use
As for VNC, there are so many settings and buttons, that I have never really managed to make it work on a machine where it is not installed
And I do not want to install it on my family's machines, because one time I got "hacked" and I saw my mouse wandering around by itself and opening files, etc ....

So a thousand thanks again 8) 8)

I continue to try to adapt your diamond of code to my needs, and I must admit that it is not easy for my little brain, but it is the price to pay to finally have this code after decades magical :oops:
And i have see you know the great ASM :shock: so i can call you MASTER now 8)

Image

Re: Simple Remote Desktop

Posted: Sun Feb 23, 2025 7:09 pm
by Etayson
AZJIO wrote: Sun Feb 23, 2025 6:35 pm Etayson
There are examples of data transmission over the network here on the forum, and I also wanted to write such a program. But the problem appeared when I began to think about how I could reduce the data flow by determining the difference between the current and the previous frame in order to transfer the square with the changes and place it on the previous frame. Then I realized that it would put a lot of strain on the processor if a video was playing on the screen. Then you need to determine the window where the video is playing and not analyze it, but transfer it as it is. That is, we need a function that defines windows. But the windows can also overlap with each other. In general, I got confused and realized that I couldn't do it. There was also an idea to capture the screen with 1 cm squares, if the squares did not change, they would be used from the previous frame, and on another desktop they would form a picture like puzzles. Well, the screens also don't match, as a result, you either need to scale the window or transfer it as it is using scrolling. In general, I realized that this is a hard job.
Or maybe need a video codec that determines all this by itself?
In full-screen video viewing mode, of course, the processor resources will be spent, but this is a maximum of up to 10%. In normal mode it is 1-2% Although I am not sure that viewing video on a remote PC is necessary, especially full-screen. But your logic is correct. A screenshot of the entire screen is taken using BitBlt_. Rectangles are checked, those in which changes occurred are sent to the receiving PC. And this screenshot remains for the next cycle.

Re: Simple Remote Desktop

Posted: Sun Feb 23, 2025 7:13 pm
by Etayson
Kwai chang caine wrote: Sun Feb 23, 2025 6:39 pm -snip-
At the beginning, i cannot use your nice work, because it's so simple....with the minimum of gadget that i not see the button change of "Connect" to "Accept" :oops:
And after numerous try...i see the "Accept" and after click, the miracle, an apparition, the graal... :shock:
the accept button appears for a while (20s as i remember), if you accept the connection, then click the add button, and the current client will be added to the list, and you will not need to constantly confirm the connection. The principle is the same as in anydesk.

Re: Simple Remote Desktop

Posted: Sun Feb 23, 2025 7:18 pm
by Kwai chang caine
Etayson why you use 5.31 ?
Believe you it's obligatory to use ASM ?
Because with versions with ASM backend all the warning of antivirus are triggered in the machine slave where i send the EXE even in the mails :cry:

Re: Simple Remote Desktop

Posted: Sun Feb 23, 2025 7:34 pm
by Etayson
Kwai chang caine wrote: Sun Feb 23, 2025 7:18 pm Etayson why you use 5.31 ?
Believe you it's obligatory to use ASM ?
Because with versions with ASM backend all the warning of antivirus are triggered in the machine slave where i send the EXE even in the mails :cry:
This is probably just a tradition. As far as I remember, this is the last version that supports compiling files in the ascii format. I just have a lot of projects that required this support. That's why it's been going on like this.
But this program is compiled in unicode, so you can try a slightly older version. And yes, you are right, on version 5.31, antiviruses often work, I don't even know what the reason is.
Assembler inserts are needed here only for creating a private and public key, as well as creating a common secret key using the Diffie Hellman algorithm. Since I use secp256k1 curves in the program, this works much faster.

Re: Simple Remote Desktop

Posted: Sun Feb 23, 2025 7:55 pm
by Kwai chang caine
Master wrote: I don't even know what the reason is.
I believe it's because in time, several virus are created with our nice PB before when the backend is ASM, it is the price of glory (Faster, lighter, etc..) and i believe read that somewhere on the forum, antivirus recognize the FRED "touch" :lol:
Like each function are created by FRED, when antivirus see a sequence of ASM functions writen by FRED then .... :mrgreen:

Image

This is why we hoped to be freed from this curse when FRED swapped his nice ASM for a good old C, with ASM sequence better known to everyone in the world 8)
Master wrote:Assembler inserts are needed here only for creating a private and public key
What !!!
If i good understand, the ASM and CURVE library is not necessary for your jewel works ???? :shock:
Because i have try to remove the keys without succes :oops:
But i try another time, for make the handling even easier, although it is already quite easy :wink:
I have already found how automaticaly "Accept", because i need that for my great mother who doesn't even know which way to hold the mouse :lol:
She can't even find the window closing cross in the right corner and I often have to help him....I've been living in hell for years, it's enough to make you cry with rage and yet since I've been useless for years I should be used to mediocrity...but there...it's going beyond all limits :twisted:

Re: Simple Remote Desktop

Posted: Sun Feb 23, 2025 8:05 pm
by Etayson
Kwai chang caine wrote: Sun Feb 23, 2025 7:55 pm If i good understand, the ASM and CURVE library is not necessary for your jewel works ???? :shock:
Because i have try to remove the keys without succes :oops:
But i try another time, for make the handling even easier, although it is already quite easy :wink:
I have already found how automaticaly "Accept", because i need that for my great mother who doesn't even know which way to hold the mouse :lol:
She can't even find the window closing cross in the right corner :twisted:
In general, of course, you can cut out all authorization with keys and make a secret key the same for all sessions. But I'm not sure that this is a good idea. The secret key is gentle for encrypting all your actions and images, files are not encrypted. Therefore, you decide whether you need it.
Your motherdoesn't need to constantly confirm the connection, just click accept once and then add. And this way you will make automatic confirmation from this client.

Re: Simple Remote Desktop

Posted: Sun Feb 23, 2025 8:09 pm
by Kwai chang caine
Yes i know it's dangerous to remove the encrypting :oops:
But it's just for use several minutes without installing something :wink:
Sending the EXE, connecting to the slave machine do an action, and close all
And i don't believe i can be hacked in 10 minutes by month ..finally..i hope :mrgreen:

A few days ago, i have already try to connect the great mother machine at 124 miles of my house, and that works perfectly 8)
Just forcing to create virtual server in my box, but i think it's necessary for bypass the box :?:

I swear to you, i had tears in my eyes :shock:
For all these years I have been forced to use TEAMVIEWER, it is really painful to connect :evil: especially with the grandmother in the team :mrgreen:

And you can be proud, because I was even able to close TEAMVIEWER on the slave machine with your amazing code, and continued with "EtaysonViewver" for finish the job 8)

You really save my life Image

I'm thinking about it....maybe without encryption it will be even smoother :idea:

Re: Simple Remote Desktop

Posted: Sun Feb 23, 2025 11:38 pm
by AZJIO
I would like Linux support. remote_client has 20 WinAPI functions. Of these, probably only SendInput would be difficult to reproduce.

Error in line 1132

Code: Select all

While  And settings("1")\Connect And settings("1")\isReadyRecieve And settings("1")\IamFileReciever
Tried doing a string conversion:

Code: Select all

computeCRC32file = Val(FileFingerprint(filename$, #PB_Cipher_CRC32))
computeCRC32memory = Val(Fingerprint(*transferBuffer, TransferFilesize, #PB_Cipher_CRC32))
Base64EncoderBuffer(*mb1, n1, *mb2, n2)

Re: Simple Remote Desktop

Posted: Fri Feb 28, 2025 7:12 pm
by Kwai chang caine
I have convert the code in X86
That works perfect with W10, but i have a strange behavior with an old machine with W7
This is what i see, the screen is cut in two reverse part :shock:

Image

Somebody understand why ?

Re: Simple Remote Desktop

Posted: Sat Mar 01, 2025 6:48 pm
by Kwai chang caine
I have found the bug, it's because the resolution for my old machine in W7 is too much small :cry:
I have set exactely the resolution on my other machine in W10 and it's exactely the same problem :idea:
Now...i must found how fix this bug, if someone have an idea :oops:

Re: Simple Remote Desktop

Posted: Sun Mar 02, 2025 11:13 am
by Etayson
Kwai chang caine wrote: Sat Mar 01, 2025 6:48 pm I have found the bug, it's because the resolution for my old machine in W7 is too much small :cry:
I have set exactely the resolution on my other machine in W10 and it's exactely the same problem :idea:
Now...i must found how fix this bug, if someone have an idea :oops:
At the top of the window there is information about the screen resolution of the remote PC and how many rectangles it is divided into.

Code: Select all

[0] Total:0.78Mb 0.00 Kb/s (1440x900)[20x12])
Perhaps that the number of rectangles is calculated incorrectly, therefore show what you have.

Re: Simple Remote Desktop

Posted: Sun Mar 02, 2025 3:35 pm
by acreis
It would be great have the conversion to x86 ... is it straighforward or have any gotchas?

Re: Simple Remote Desktop

Posted: Sun Mar 02, 2025 6:52 pm
by Kwai chang caine
Hello Etayson
Master wrote:At the top of the window there is information about the screen resolution of the remote PC and how many rectangles it is divided into.
Thanks a lot for your tips 8) , I had not seen that :oops:
Like i have already say, your jewel always surprising me, day by day, by his hidden functions, and like he works very nice :shock:
Furthermore, nearly all the days i found someone more, and i admire your technical style of programmation 8)

In one world, your amazing code is a little bit at the image of PB :
"A maximum of powerfull functions, for a minimum of buttons" :mrgreen: 8)

Excuse me for all this (perhaps too much) congratulations, but i love so much your works :oops:
Then for answer to your question, this is your nice baby :

Image

And the screen of my X86 machine

Image

ACREIS wrote:It would be great have the conversion to x86 ... is it straighforward or have any gotchas?
Hello Acreis :wink:
You have right, because, this powerfull and splendid code merits to run on old machines two 8)
I don't know if your question is to me, but for achieve this goal i have cheated, because i have only 10% (and again) of the powerfull brain of Etayson :oops:
I have unknitted a great part of the Etayson functions :oops: deleted all the security and crypting (Like that no ASM and no library Curve) and after it's really more simple for reach the X86 :wink:
I don't think, it's a good idea to do that, because that can be a dangerous code :twisted: , if it is bad using. :|
Sure, It would be great if the father of this jewel (or someone of his level) could convert it as it is, because it was really very well thought out and built like it is actually, in my opinion. 8)