// File: /workspace/github_cpp_makefile_star2_O1/fuad00[P]wifitool/code.cpp
// Function: sniff_func()
bool sniff_func()	{
	for(int q = 0; q<=33; q++)	{  // При помощи данного цикла иммитируем полосу загрузки
		progress(3 * q);
		system("sleep 0.26");
	}
	progress(60);                      // Выводим строку прогресса
	cout << endl;                      // Каретка
	system("cat nets* | sed -n '/Station/q;p' | sed '/Last time seen/d' | awk -F',' '{print $14}' | awk '{$1=$1};1' | sed -r '/^\\s*$/d'"); // Считываем содержимое nets.csv-01.csv и выводим список сетей
	cout << "\n[?] Перепишите название вашей сети (регистр учитывается): ";
	getline(cin >> ws, target_name);   // Необычный способ считать данные (Название сети) с использованием getline. Источник:  

	progress(70);                      // Выводим строку прогресса

	string netname = "cat nets.csv-01.csv | sed -n '/Station/q;p' | sed '/Last time seen/d' | grep '" + target_name + "' | awk -F',' '{print $14}' > tmp/netname.txt";
	const char *netname_init = netname.c_str();

	string netbssid = "cat nets.csv-01.csv | sed -n '/Station/q;p' | sed '/Last time seen/d' | grep '" + target_name + "' | awk -F',' '{print $1}' > tmp/netbssid.txt";
	const char *netbssid_init = netbssid.c_str();

	string channel = "cat nets.csv-01.csv | sed -n '/Station/q;p' | sed '/Last time seen/d' | grep '" + target_name + "' | awk -F',' '{print $4}' > tmp/channel.txt";
	const char *channel_init = channel.c_str();


	system(netname_init);  // Считываем содержимое nets.csv-01.csv и выводим название выбранной сети.
	system(netbssid_init); // Считываем содержимое nets.csv-01.csv и выводим MAC-адрес выбранной сети.
	system(channel_init);  // Считываем содержимое nets.csv-01.csv и выводим канал выбранной сети.


	getline(ifstream("tmp/netname.txt"), target_name);           // Считываем содержимое файла по пути tmp/netname.txt
	getline(ifstream("tmp/netbssid.txt"), target_bssid);         // Считываем содержимое файла по пути tmp/netbssid.txt
	getline(ifstream("tmp/channel.txt"), target_channel_number); // Считываем содержимое файла по пути tmp/channel.txt

	cout << "\nВыбранная сеть: " << target_name << endl;
	cout << "MAC-адрес сети: " << target_bssid << endl;
	cout << "Канал сети: " << target_channel_number << endl;


	cout << "\n[+] Данные сохранены! Можно приступить к ловле хендшейка [4].\n" << endl;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
xorl %ebx, %ebx
leaq 0x25a9(%rip), %r14      # 0x570e
movl %ebx, %edi
callq 0x2bb3
movq %r14, %rdi
callq 0x20f0
addl $0x3, %ebx
cmpl $0x66, %ebx
jne 0x3165
movl $0x3c, %edi
callq 0x2bb3
movq 0x4e43(%rip), %rbx      # 0x7fd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq 0x255e(%rip), %rdi      # 0x5719
callq 0x20f0
leaq 0x25ce(%rip), %rsi      # 0x5795
movl $0x68, %edx
movq %rbx, %rdi
callq 0x2150
movq 0x4e05(%rip), %rdi      # 0x7fe0
callq 0x20e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %edx
leaq 0x50a7(%rip), %r14      # 0x82a8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21f0
movl $0x46, %edi
callq 0x2bb3
leaq 0x25e1(%rip), %rsi      # 0x57fe
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x4031
leaq 0x2619(%rip), %rsi      # 0x584d
movq %rbx, %rdi
callq 0x2200
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x3264
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x326c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x70(%rsp), %r15
movq -0x10(%r15), %rdi
cmpq %r15, %rdi
je 0x329f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x40(%rsp), %rbx
leaq 0x2553(%rip), %rsi      # 0x57fe
leaq 0x4ff6(%rip), %rdx      # 0x82a8
leaq 0x60(%rsp), %rdi
callq 0x4031
leaq 0x25b8(%rip), %rsi      # 0x587b
leaq 0x60(%rsp), %rdi
callq 0x2200
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x32f4
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x32fc
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x332b
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x20(%rsp), %r14
leaq 0x24c7(%rip), %rsi      # 0x57fe
leaq 0x4f6a(%rip), %rdx      # 0x82a8
leaq 0x60(%rsp), %rdi
callq 0x4031
leaq 0x255a(%rip), %rsi      # 0x58a9
leaq 0x60(%rsp), %rdi
callq 0x2200
leaq 0x10(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x337f
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x3386
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x33b5
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x2140
movq (%rsp), %r15
movq %rbx, %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x20f0
movq %r15, %rdi
callq 0x20f0
leaq 0x2493(%rip), %rsi      # 0x586b
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x21e0
movq 0x60(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %edx
leaq 0x4e9e(%rip), %rsi      # 0x82a8
leaq 0x60(%rsp), %rdi
callq 0x21f0
leaq 0x60(%rsp), %rdi
callq 0x2050
leaq 0x2473(%rip), %rsi      # 0x5898
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x21e0
movq 0x60(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %edx
leaq 0x4e11(%rip), %rsi      # 0x8268
leaq 0x60(%rsp), %rdi
callq 0x21f0
leaq 0x60(%rsp), %rdi
callq 0x2050
leaq 0x2454(%rip), %rsi      # 0x58c6
leaq 0x60(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x21e0
movq 0x60(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %edx
leaq 0x4d44(%rip), %rsi      # 0x81e8
leaq 0x60(%rsp), %rdi
callq 0x21f0
leaq 0x60(%rsp), %rdi
callq 0x2050
movq 0x4b11(%rip), %rdi      # 0x7fd0
leaq 0x2410(%rip), %rsi      # 0x58d6
movl $0x1e, %edx
callq 0x2150
movq 0x4dd1(%rip), %rsi      # 0x82a8
movq 0x4dd2(%rip), %rdx      # 0x82b0
movq 0x4aeb(%rip), %rdi      # 0x7fd0
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x4ab5(%rip), %rdi      # 0x7fd0
leaq 0x23d3(%rip), %rsi      # 0x58f5
movl $0x19, %edx
callq 0x2150
movq 0x4d35(%rip), %rsi      # 0x8268
movq 0x4d36(%rip), %rdx      # 0x8270
movq 0x4a8f(%rip), %rdi      # 0x7fd0
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x4a59(%rip), %rdi      # 0x7fd0
leaq 0x2391(%rip), %rsi      # 0x590f
movl $0x15, %edx
callq 0x2150
movq 0x4c59(%rip), %rsi      # 0x81e8
movq 0x4c5a(%rip), %rdx      # 0x81f0
movq 0x4a33(%rip), %rdi      # 0x7fd0
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq 0x49fd(%rip), %rbx      # 0x7fd0
leaq 0x234b(%rip), %rsi      # 0x5925
movl $0x6c, %edx
movq %rbx, %rdi
callq 0x2150
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq 0x49cb(%rip), %rdi      # 0x7fd0
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x3628
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x363f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x3656
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2140
xorl %eax, %eax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x36cd
jmp 0x36cd
jmp 0x36cd
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x36e6
movq 0x70(%rsp), %rsi
jmp 0x36de
movq %rax, %rbx
jmp 0x36e6
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x36fd
movq 0x70(%rsp), %rsi
jmp 0x36f5
movq %rax, %rbx
jmp 0x36fd
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3714
movq 0x70(%rsp), %rsi
jmp 0x370c
jmp 0x36be
jmp 0x36be
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x2050
jmp 0x36d0
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x36e6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x36fd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2140
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x3714
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21c0