-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce06b07
commit 561d804
Showing
8 changed files
with
132 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,38 @@ | ||
int ssh(); | ||
#pragma once | ||
|
||
#include <libssh2.h> | ||
#include <sys/types.h> | ||
#include <sys/socket.h> | ||
#include <arpa/inet.h> | ||
#include <netdb.h> | ||
#include <poll.h> | ||
#include <fcntl.h> | ||
#include <malloc.h> | ||
#include <algorithm> | ||
#include <3ds.h> | ||
#include "util.hpp" | ||
#include "daisywheel.hpp" | ||
#include "keyboard.hpp" | ||
|
||
class ssh | ||
{ | ||
public: | ||
int init(); | ||
int mainLoop(); | ||
int deinit(); | ||
|
||
private: | ||
std::string hostname = ""; | ||
std::string username = "username"; | ||
std::string password = "password"; | ||
std::string port = "22"; | ||
|
||
int rc, sock, written, auth_pw = 0; | ||
struct addrinfo hints, *res = nullptr; | ||
LIBSSH2_SESSION *session; | ||
LIBSSH2_CHANNEL *channel; | ||
|
||
std::string commandbuf; | ||
char inputbuf[1920]; | ||
util utils; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters