I followed a guide in how to solve the Rubik Cube however from time ti time I incurr in a case that is not covered by guide and I obtain an almost solved Cube except for 2 pieces. Seems also the online solver of that website is bugged for this particolar status, so how do I get out of this stuck state?
The case you are showing can be solved by doing a pure algorithm to solve corner orientation. Luckily the algorithm for solving this case quickly is very easy. You simply place the unsolved corners on the left and do sune U2 bsune (U2). I personally use this in both my speed solves and in my blind solves (though conjugated most of the time).
In longhand, this algorithm is R U R' U R U2 R' U2 R' U' R U' R' U2 R U2
If you are unfamiliar here is a short description of sune and bsune.
sune: The name of the algorithm R U R' U R U2 R' in which you take out one of the slots and then put it back in another way.
backsune: Also known as bsune, this is doing a sune from the back. The algorithm for this is R' U' R U' R' U2 R
I have no cube at hand, but one of the online solvers provides the solution.
See the link below:
Added 07 May 2018 per request by Rand al'Thor.
The procedure devised by the site under the link above is as follows:
R' U F2 U' F2 U' R' U R2 D' F2 D F2
Please note I made a mistake in the problem definition: I defined the left-hand upper corner rotated clockwise and the right-hand upper corner rotated counter-clockwise, opposite to what you show on photographs. Luckily you can just rotate the whole cube so that the yellow and green faces swap their positions, and the solution would fit exactly your problem
Added 08 May 2018
...or just apply the solution twice ;-)
I'm not sure what guide you've followed, because there are loads of different beginner methods. Personally I always orient the top two, three or four corners in the same way, using multiples of
R' D' R D (2x), since it's very easy to remember (although a bit longer to execute and counterproductive if you plan to transition into speedcubing in the future).
For your particular case it would mean the following algorithm (starting with yellow at the top, and red at the front):
R' D' R D (4x)
R' D' R D (2x)
Or completely written out:
R' D' R D R' D' R D R' D' R D R' D' R D U R' D' R D R' D' R D U'
Here is a video I created a while back with the Beginner's Method I personally learned. Starting at the linked 30:40 it covers orienting the top layer corners. I showed it with three corners, four corners, or two corners unsolved. Yours is the same as the one with two corners that I show at 33:37, although your corners are next to each other instead of kitty-corner of each other.