Prefer Git for all the things

This commit is contained in:
William Vu 2018-10-19 15:40:16 -05:00
parent e4c71265fb
commit cea619aab1
2 changed files with 10 additions and 8 deletions

View File

@ -16,7 +16,7 @@ additional code paths to be followed.
1. `git clone git://git.libssh.org/projects/libssh.git`
2. `cd libssh` and `git checkout libssh-0.8.3`
3. `patch -p0 < /path/to/metasploit-framework/external/source/libssh/ssh_server_fork.patch`
3. `git apply -p0 /path/to/metasploit-framework/external/source/libssh/ssh_server_fork.patch`
4. Follow the steps in `INSTALL` to build libssh
5. Run `build/examples/ssh_server_fork` (I like to `strace` it)

View File

@ -1,6 +1,8 @@
--- examples/ssh_server_fork.c.orig 2018-10-17 18:28:06.476708511 +0000
+++ examples/ssh_server_fork.c 2018-10-19 05:45:08.754976769 +0000
@@ -235,8 +235,6 @@
diff --git a/examples/ssh_server_fork.c b/examples/ssh_server_fork.c
index 217c5298..20008c76 100644
--- a/examples/ssh_server_fork.c
+++ b/examples/ssh_server_fork.c
@@ -235,8 +235,6 @@ struct channel_data_struct {
struct session_data_struct {
/* Pointer to the channel the session will allocate. */
ssh_channel channel;
@ -9,7 +11,7 @@
};
static int data_function(ssh_session session, ssh_channel channel, void *data,
@@ -406,8 +404,8 @@
@@ -406,8 +404,8 @@ static int shell_request(ssh_session session, ssh_channel channel,
if (cdata->pty_master != -1 && cdata->pty_slave != -1) {
return exec_pty("-l", NULL, cdata);
}
@ -20,7 +22,7 @@
}
static int subsystem_request(ssh_session session, ssh_channel channel,
@@ -421,16 +419,13 @@
@@ -421,16 +419,13 @@ static int subsystem_request(ssh_session session, ssh_channel channel,
static int auth_password(ssh_session session, const char *user,
const char *pass, void *userdata) {
@ -38,7 +40,7 @@
return SSH_AUTH_DENIED;
}
@@ -496,9 +491,7 @@
@@ -496,9 +491,7 @@ static void handle_session(ssh_event event, ssh_session session) {
/* Our struct holding information about the session. */
struct session_data_struct sdata = {
@ -49,7 +51,7 @@
};
struct ssh_channel_callbacks_struct channel_cb = {
@@ -530,19 +523,11 @@
@@ -530,19 +523,11 @@ static void handle_session(ssh_event event, ssh_session session) {
ssh_set_auth_methods(session, SSH_AUTH_METHOD_PASSWORD);
ssh_event_add_session(event, session);