|
Hey,
The idea is very simple, as Blazor can run ether as a Webassembly or over SignalR, shouldn`t it be possible when using a SignalR connection, to mirror the whole website of a user?
Like for support purposes, to inject a support person directly into what the user is seeing by mirroring the connection and replay all actions from one user to the output of another one?
|
|
|
|
|
Hi all hacking members I am new join
|
|
|
|
|
Wrong site: this is not a hacking site, and we do not condone, support, or assist in the production of malicious code in any way, form, or manner. This is a professional site for professional developers.
You will get no help hacking anything here.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
That's why I didn't add a report in S&A.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
What's wrong with hacking? I had a parrot doing it all the time!
|
|
|
|
|
In the words of Biff Tannen: "I think you've got the wrong car, McFly."
|
|
|
|
|
I like hacking. That's one of the best ways to learn how things work. Do you have a question?
|
|
|
|
|
Learning how to exploit a vulnerability teaches not how to code.
Been doing development for over 20 years, and a "little" paranoid. Sporting my own hostfile and delivering updates to multiple hosts.
I like education.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: Learning how to exploit a vulnerability teaches not how to code. Sure it can.
Just like SQL injection. That's hacking but we talk about it all the time. Hacking is a good way to learn how things work.
|
|
|
|
|
20212 wrote: Sure it can. No, it doesn't; it teaches nothing about patterns, not even about security, it only shows where breaches are.
20212 wrote: Just like SQL injection Thank you for proving my point.
20212 wrote: That's hacking but we talk about it all the time. Hacking is a good way to learn how things work. It's a way of learning to know about weaknesses, not about how things work. Here an analogy for ya; you claim you can run an atomic power plant, because you know an unguarded door. In my opinion, you not even less qualified than any real programmer, but a liability.
And you know you are; that's why I post under my real name, and you don't dare too.
--edit
From a real criminal; do you have any questions?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: Thank you for proving my point. I don't think you understand your point then.
If all we told people is to use parameterized queries but did not explain why, the lesson would not be learned as well. Explaining how non-parameterized queries can allow someone to hack your db is magnitudes more valuable than just telling them to use parameters.
Eddy Vluggen wrote: that's why I post under my real name, and you don't dare too. 1. You can't prove that it's your real name.
2. You can't prove this is not my real name.
|
|
|
|
|
20212 wrote: I don't think you understand your point then. Not my problem, is it?
20212 wrote: If all we told people is to use parameterized queries but did not explain why, the lesson would not be learned as well. Explaining how non-parameterized queries can allow someone to hack your db is magnitudes more valuable than just telling them to use parameters. Again, thanks for proving my point
20212 wrote: 1. You can't prove that it's your real name. I can, there's a photograph on here from me. Look it up. No, no record government linking me to that, I not that much of a fool.
20212 wrote: 2. You can't prove this is not my real name. Easy, that's not even a legal name; you're not allowed to name children like that.
I been a developer for over 20 years. Been concerned with security for the same time. We "know a bit" about the subject
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
|
20212 wrote: Just like SQL injection. I am so old that I find the very idea of SQL injection completely crazy. Why would anyone even get close to the idea of passing SQL code ahead, without parsing it and consider it against authorization restrictions?
I know. "Because it would reduce performance". So then you could make two versions of your SQL based application: One HighPeformance version to use when benchmarking or comparing against alternatives. When you boost multiplatform and high availability, there is another, "safe" version with all the flexibility and functionality ruining performance, but beneficial in a lot of other ways.
|
|
|
|
|
trønderen wrote: I am so old that I find the very idea of SQL injection completely crazy. Why would anyone even get close to the idea of passing SQL code ahead, without parsing it and consider it against authorization restrictions? Because often there's none such restriction. Looking at you VB programmers.
trønderen wrote: I know. "Because it would reduce performance" Not in any way. So proven you don't know.
The rest of your drivel I not gonna answer to. You entitled to your petty opinions, and that's why I'm paid more.
Any other questions?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: The rest of your drivel I not gonna answer to. You entitled to your petty opinions, and that's why I'm paid more. Fine. I'll keep your comment in mind when judging the quality of other utterings your make at CP.
|
|
|
|
|
trønderen wrote: Fine. I'll keep your comment in mind Do that.
trønderen wrote: when judging the quality of other utterings your make at CP. You not in any position to judge me.
Go ahead. It's a free world.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Eddy Vluggen wrote: You not in any position to judge me If you are seriously suggesting that I am morally or professionally "obliged" to take your utterings at face value, with no critical evaluation, assessment or judgement, then your utterings are utterly without any trace of value. Certainly to me - and I think many others would agree.
My comment was a response to your response, referring to my post as "drivel" and "petty opinions". That does not put you in any strong position to reject judging opinions about your posts. Feel free to declare yourself as inviolable, but don't expect the rest of the world to honor your wish.
|
|
|
|
|
trønderen wrote: If you are seriously suggesting that I am morally or professionally "obliged" to take your utterings at face value, with no critical evaluation, assessment or judgement, then your utterings are utterly without any trace of value. Certainly to me - and I think many others would agree. No, of course not. You take them as they are, and do with it what you want.
trønderen wrote: don't expect the rest of the world to honor your wish. If you go "hacking", don't expect law to humor your wish about hats.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Excellent when you are in Cairns we can have a game of golf, I'm only an average hacker though!
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
You're more a swinger than a hacker?
|
|
|
|
|
If you meant "mincing meat", then yes.
Otherwise, BGS9.
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
The hacking comes from too much vaping.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it.
― Confucian Analects: Rules of Confucius about his food
|
|
|
|
|
Hello everyone. I am just a beginner programmer.
I am learning recursion and dynamic programming.
I realized that even for Fibonacci numbers, recursion is not suitable - and there you need to use dynamic programming.
:thumbsup:
Well, I looked at the tutorials, it's good when you can deduce the recurrent relation and then everything is clear...
But if we cannot do it, how then?
????
For example, I took the famous task "Knight's tour" and solved it using recursion.
using System;
namespace KnightChess
{
class Field
{
public int index { get; set; }
public Field(int _index)
{
index = _index;
}
}
class Board
{
int height;
int width;
public (int, int) curKnightPos;
int value;
public Field[,] boardArr;
public static bool CanMoveKnight1(Board Board)
{
return (Board.width > Board.curKnightPos.Item1 + 1) && (Board.height > Board.curKnightPos.Item2) &&
(Board.boardArr[Board.curKnightPos.Item1 + 1, Board.curKnightPos.Item2].index == -1);
}
public static Board MoveKnight1(Board Board)
{
Board Transformed = new Board(Board);
Transformed.curKnightPos.Item1 += 2;
Transformed.curKnightPos.Item2++;
Transformed.boardArr[Transformed.curKnightPos.Item1 - 1, Transformed.curKnightPos.Item2 - 1].index = ++Transformed.value;
return Transformed;
}
public static bool CanMoveKnight2(Board Board)
{
return (Board.width > Board.curKnightPos.Item1) && (Board.height > Board.curKnightPos.Item2 + 1) &&
(Board.boardArr[Board.curKnightPos.Item1, Board.curKnightPos.Item2 + 1].index == -1);
}
public static Board MoveKnight2(Board Board)
{
Board Transformed = new Board(Board);
Transformed.curKnightPos.Item1++;
Transformed.curKnightPos.Item2 += 2;
Transformed.boardArr[Transformed.curKnightPos.Item1 - 1, Transformed.curKnightPos.Item2 - 1].index = ++Transformed.value;
return Transformed;
}
public static bool CanMoveKnight3(Board Board)
{
return (Board.curKnightPos.Item1 > 1) && (Board.height > Board.curKnightPos.Item2 + 1) &&
(Board.boardArr[Board.curKnightPos.Item1 - 2, Board.curKnightPos.Item2 + 1].index == -1);
}
public static Board MoveKnight3(Board Board)
{
Board Transformed = new Board(Board);
Transformed.curKnightPos.Item1--;
Transformed.curKnightPos.Item2 += 2;
Transformed.boardArr[Transformed.curKnightPos.Item1 - 1, Transformed.curKnightPos.Item2 - 1].index = ++Transformed.value;
return Transformed;
}
public static bool CanMoveKnight4(Board Board)
{
return (Board.curKnightPos.Item1 > 2) && (Board.height > Board.curKnightPos.Item2) &&
(Board.boardArr[Board.curKnightPos.Item1 - 3, Board.curKnightPos.Item2].index == -1);
}
public static Board MoveKnight4(Board Board)
{
Board Transformed = new Board(Board);
Transformed.curKnightPos.Item1 -= 2;
Transformed.curKnightPos.Item2++;
Transformed.boardArr[Transformed.curKnightPos.Item1 - 1, Transformed.curKnightPos.Item2 - 1].index = ++Transformed.value;
return Transformed;
}
public static bool CanMoveKnight5(Board Board)
{
return (Board.curKnightPos.Item1 > 2) && (Board.curKnightPos.Item2 > 1) &&
(Board.boardArr[Board.curKnightPos.Item1 - 3, Board.curKnightPos.Item2 - 2].index == -1);
}
public static Board MoveKnight5(Board Board)
{
Board Transformed = new Board(Board);
Transformed.curKnightPos.Item1 -= 2;
Transformed.curKnightPos.Item2--;
Transformed.boardArr[Transformed.curKnightPos.Item1 - 1, Transformed.curKnightPos.Item2 - 1].index = ++Transformed.value;
return Transformed;
}
public static bool CanMoveKnight6(Board Board)
{
return (Board.curKnightPos.Item1 > 1) && (Board.curKnightPos.Item2 > 2) &&
(Board.boardArr[Board.curKnightPos.Item1 - 2, Board.curKnightPos.Item2 - 3].index == -1);
}
public static Board MoveKnight6(Board Board)
{
Board Transformed = new Board(Board);
Transformed.curKnightPos.Item1--;
Transformed.curKnightPos.Item2 -= 2;
Transformed.boardArr[Transformed.curKnightPos.Item1 - 1, Transformed.curKnightPos.Item2 - 1].index = ++Transformed.value;
return Transformed;
}
public static bool CanMoveKnight7(Board Board)
{
return (Board.width > Board.curKnightPos.Item1) && (Board.curKnightPos.Item2 > 2) &&
(Board.boardArr[Board.curKnightPos.Item1, Board.curKnightPos.Item2 - 3].index == -1);
}
public static Board MoveKnight7(Board Board)
{
Board Transformed = new Board(Board);
Transformed.curKnightPos.Item1++;
Transformed.curKnightPos.Item2 -= 2;
Transformed.boardArr[Transformed.curKnightPos.Item1 - 1, Transformed.curKnightPos.Item2 - 1].index = ++Transformed.value;
return Transformed;
}
public static bool CanMoveKnight8(Board Board)
{
return (Board.width > Board.curKnightPos.Item1 + 1) && (Board.curKnightPos.Item2 > 1) &&
(Board.boardArr[Board.curKnightPos.Item1 + 1, Board.curKnightPos.Item2 - 2].index == -1);
}
public static Board MoveKnight8(Board Board)
{
Board Transformed = new Board(Board);
Transformed.curKnightPos.Item1 += 2;
Transformed.curKnightPos.Item2--;
Transformed.boardArr[Transformed.curKnightPos.Item1 - 1, Transformed.curKnightPos.Item2 - 1].index = ++Transformed.value;
return Transformed;
}
public static void Print(Board Board)
{
for (int i = Board.width - 1; i >= 0; i--)
{
for (int j = 0; j < Board.height; j++)
{
Console.Write(Board.boardArr[i, j].index + " ");
}
Console.WriteLine();
}
Console.WriteLine();
}
public static bool isFull(Board Board)
{
foreach(var el in Board.boardArr)
{
if (el.index == -1)
{
return false;
}
}
return true;
}
public Board(Board Board)
{
height = Board.height;
width = Board.width;
curKnightPos = Board.curKnightPos;
value = Board.value;
boardArr = new Field[width, height];
for (int i = 0; i < width; i++)
{
for (int j = 0; j < height; j++)
{
boardArr[i, j] = new Field(Board.boardArr[i, j].index);
}
}
}
public Board(int _height, int _width, (int, int) _curKnightPos)
{
height = _height;
width = _width;
curKnightPos = _curKnightPos;
value = 1;
boardArr = new Field[_width, _height];
for(int i = 0; i < _width; i++)
{
for (int j = 0; j < _height; j++)
{
boardArr[i, j] = new Field(-1);
}
}
boardArr[_curKnightPos.Item1 - 1, _curKnightPos.Item2 - 1].index = 1;
}
}
class Program
{
static void Main(string[] args)
{
#region input and define
Console.WriteLine("Please enter board's width");
string temp;
temp = Console.ReadLine();
int width;
bool success;
success = int.TryParse(temp, out width);
if (!success)
{
Console.WriteLine("Width be natural a number");
return;
}
Console.WriteLine("Please enter board's height");
temp = Console.ReadLine();
int height;
success = int.TryParse(temp, out height);
if (!success)
{
Console.WriteLine("Height be natural a number");
return;
}
Console.WriteLine("Please enter board's curKnightPosX");
temp = Console.ReadLine();
int curKnightPosX;
success = int.TryParse(temp, out curKnightPosX);
if (!success)
{
Console.WriteLine("CurKnightPosX be natural a number");
return;
}
Console.WriteLine("Please enter board's curKnightPosY");
temp = Console.ReadLine();
int curKnightPosY;
success = int.TryParse(temp, out curKnightPosY);
if (!success)
{
Console.WriteLine("CurKnightPosY be natural a number");
return;
}
if ((curKnightPosX > width) || (curKnightPosY > height))
{
Console.WriteLine("curKnightPos out of range");
return;
}
Board Board = new Board(height, width, (curKnightPosX, curKnightPosY));
#endregion
GetTransformsMap(Board);
Console.ReadKey();
}
private static void GetTransformsMap(Board board)
{
if (!Board.CanMoveKnight1(board) && !Board.CanMoveKnight2(board) && !Board.CanMoveKnight3(board) && !Board.CanMoveKnight4(board) &&
!Board.CanMoveKnight5(board) && !Board.CanMoveKnight6(board) && !Board.CanMoveKnight7(board) && !Board.CanMoveKnight8(board))
{
if (Board.isFull(board))
{
Board.Print(board);
}
}
if (Board.CanMoveKnight1(board))
{
GetTransformsMap(Board.MoveKnight1(board));
}
if (Board.CanMoveKnight2(board))
{
GetTransformsMap(Board.MoveKnight2(board));
}
if (Board.CanMoveKnight3(board))
{
GetTransformsMap(Board.MoveKnight3(board));
}
if (Board.CanMoveKnight4(board))
{
GetTransformsMap(Board.MoveKnight4(board));
}
if (Board.CanMoveKnight5(board))
{
GetTransformsMap(Board.MoveKnight5(board));
}
if (Board.CanMoveKnight6(board))
{
GetTransformsMap(Board.MoveKnight6(board));
}
if (Board.CanMoveKnight7(board))
{
GetTransformsMap(Board.MoveKnight7(board));
}
if (Board.CanMoveKnight8(board))
{
GetTransformsMap(Board.MoveKnight8(board));
}
}
}
}
We enter the size of the board and the coordinates of the initial position of the knight - after which the calculation takes place.
Video attached
DropMeFiles – free one-click file sharing service[^]
As you can see from the video for 8x8, we get one of the solutions in a reasonable amount of time.
But if the task is to get all the solutions?
Even for 6x6 it already freezes - everything depends on memory, I have 8GB of RAM.
:) :) :)
Help, how can this example be optimized to get ALL solutions?
Will it change anything if rewritten in C ++ or there in python?
|
|
|
|
|