	.file	"469664.c"
	.intel_syntax noprefix
	.text
	.globl	crash
	.type	crash, @function
crash:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	crash, .-crash
	.section	.rodata
	.align 8
.LC0:
	.string	"usage: tproxy_captive_portal <ip addr to bind>\n\nIMPORTANT: you must bind to the same address + port you passed\nvia --on-ip and --on-port to the TPROXY iptables rule. Use the\nIP address of the interface that traffic will come in through."
.LC1:
	.string	"couldn't allocate socket"
.LC2:
	.string	"SO_REUSEADDR failed"
	.align 8
.LC3:
	.string	"IP_TRANSPARENT failed. Are you root?"
.LC4:
	.string	"bind failed"
.LC5:
	.string	"listen failed"
	.align 8
.LC6:
	.string	"now TPROXY-listening on %s, '''''port''''' %d"
	.align 8
.LC7:
	.string	"...\nbut actually accepting any TCP SYN with dport 80, regardless of dest IP, that hits the loopback interface!\n"
.LC8:
	.string	"accepted socket from %s:%d; "
	.align 8
.LC9:
	.string	"they think they're talking to %s:%d\n"
	.align 8
.LC10:
	.string	"HTTP/1.0 200 OK\r\n\r\nYou thought you were connecting to %s:%d, but it was actually me, TPROXY!"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 1112
	.cfi_offset 3, -24
	mov	DWORD PTR -1108[rbp], edi
	mov	QWORD PTR -1120[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1108[rbp], 2
	je	.L3
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1080[rbp], eax
	cmp	DWORD PTR -1080[rbp], 0
	jns	.L4
	lea	rdi, .LC1[rip]
	call	crash
.L4:
	mov	DWORD PTR -1092[rbp], 1
	lea	rdx, -1092[rbp]
	mov	eax, DWORD PTR -1080[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC2[rip]
	call	crash
.L5:
	lea	rdx, -1092[rbp]
	mov	eax, DWORD PTR -1080[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 19
	mov	esi, 0
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jns	.L6
	lea	rdi, .LC3[rip]
	call	crash
.L6:
	mov	WORD PTR -1072[rbp], 2
	mov	rax, QWORD PTR -1120[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -1072[rbp]
	add	rdx, 4
	mov	rsi, rax
	mov	edi, 2
	call	inet_pton@PLT
	mov	edi, 1234
	call	htons@PLT
	mov	WORD PTR -1070[rbp], ax
	lea	rcx, -1072[rbp]
	mov	eax, DWORD PTR -1080[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L7
	lea	rdi, .LC4[rip]
	call	crash
.L7:
	mov	eax, DWORD PTR -1080[rbp]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L8
	lea	rdi, .LC5[rip]
	call	crash
.L8:
	mov	rax, QWORD PTR -1120[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 1234
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
.L9:
	mov	DWORD PTR -1088[rbp], 16
	mov	DWORD PTR -1084[rbp], 16
	lea	rdx, -1088[rbp]
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1080[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1076[rbp], eax
	lea	rdx, -1084[rbp]
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1076[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	getsockname@PLT
	movzx	eax, WORD PTR -1054[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	mov	eax, DWORD PTR -1052[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, WORD PTR -1038[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	mov	eax, DWORD PTR -1036[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, WORD PTR -1038[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	mov	eax, DWORD PTR -1036[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rdx, rax
	lea	rax, -1024[rbp]
	mov	ecx, ebx
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1024[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1024[rbp]
	mov	eax, DWORD PTR -1076[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	eax, DWORD PTR -1076[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR -1076[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L9
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"469664.c"
	.text
	.align	2
	.global	crash
	.syntax unified
	.arm
	.fpu softvfp
	.type	crash, %function
crash:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	perror
	mov	r0, #1
	bl	exit
	.size	crash, .-crash
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: tproxy_captive_portal <ip addr to bind>\012\012"
	.ascii	"IMPORTANT: you must bind to the same address + port"
	.ascii	" you passed\012via --on-ip and --on-port to the TPR"
	.ascii	"OXY iptables rule. Use the\012IP address of the int"
	.ascii	"erface that traffic will come in through.\000"
	.align	2
.LC1:
	.ascii	"couldn't allocate socket\000"
	.align	2
.LC2:
	.ascii	"SO_REUSEADDR failed\000"
	.align	2
.LC3:
	.ascii	"IP_TRANSPARENT failed. Are you root?\000"
	.align	2
.LC4:
	.ascii	"bind failed\000"
	.align	2
.LC5:
	.ascii	"listen failed\000"
	.align	2
.LC6:
	.ascii	"now TPROXY-listening on %s, '''''port''''' %d\000"
	.align	2
.LC7:
	.ascii	"...\012but actually accepting any TCP SYN with dpor"
	.ascii	"t 80, regardless of dest IP, that hits the loopback"
	.ascii	" interface!\012\000"
	.align	2
.LC8:
	.ascii	"accepted socket from %s:%d; \000"
	.align	2
.LC9:
	.ascii	"they think they're talking to %s:%d\012\000"
	.align	2
.LC10:
	.ascii	"HTTP/1.0 200 OK\015\012\015\012You thought you were"
	.ascii	" connecting to %s:%d, but it was actually me, TPROX"
	.ascii	"Y!\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1080
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1088
	sub	sp, sp, #4
	str	r0, [fp, #-1088]
	str	r1, [fp, #-1092]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1088]
	cmp	r3, #2
	beq	.L3
	ldr	r0, .L11+4
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1072]
	ldr	r3, [fp, #-1072]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L11+8
	bl	crash
.L4:
	mov	r3, #1
	str	r3, [fp, #-1084]
	sub	r3, fp, #1072
	sub	r3, r3, #12
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-1072]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L11+12
	bl	crash
.L5:
	sub	r3, fp, #1072
	sub	r3, r3, #12
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #19
	mov	r1, #0
	ldr	r0, [fp, #-1072]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L11+16
	bl	crash
.L6:
	sub	r3, fp, #12
	sub	r3, r3, #1040
	sub	r3, r3, #12
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1092]
	add	r3, r3, #4
	ldr	r1, [r3]
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #12
	add	r3, r3, #4
	mov	r2, r3
	mov	r0, #2
	bl	inet_pton
	ldr	r0, .L11+20
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #1040
	sub	r3, r3, #12
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1072]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L11+24
	bl	crash
.L7:
	mov	r1, #10
	ldr	r0, [fp, #-1072]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L11+28
	bl	crash
.L8:
	ldr	r3, [fp, #-1092]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, .L11+20
	mov	r1, r3
	ldr	r0, .L11+32
	bl	printf
	ldr	r0, .L11+36
	bl	puts
.L9:
	mov	r3, #16
	str	r3, [fp, #-1080]
	mov	r3, #16
	str	r3, [fp, #-1076]
	sub	r2, fp, #1056
	sub	r2, r2, #12
	sub	r2, r2, #12
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, [fp, #-1072]
	bl	accept
	str	r0, [fp, #-1068]
	sub	r3, fp, #1056
	sub	r3, r3, #12
	sub	r3, r3, #8
	sub	r1, fp, #1024
	sub	r1, r1, #8
	mov	r2, r3
	ldr	r0, [fp, #-1068]
	bl	getsockname
	ldr	r0, [fp, #-1044]
	bl	inet_ntoa
	mov	r4, r0
	sub	r3, fp, #12
	sub	r3, r3, #1024
	sub	r3, r3, #12
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L11+40
	bl	printf
	ldr	r0, [fp, #-1028]
	bl	inet_ntoa
	mov	r4, r0
	sub	r3, fp, #12
	sub	r3, r3, #1020
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L11+44
	bl	printf
	ldr	r0, [fp, #-1028]
	bl	inet_ntoa
	mov	r4, r0
	sub	r3, fp, #12
	sub	r3, r3, #1020
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	sub	r0, fp, #1016
	mov	r2, r4
	ldr	r1, .L11+48
	bl	sprintf
	sub	r3, fp, #1016
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1016
	mov	r3, #0
	ldr	r0, [fp, #-1068]
	bl	send
	mov	r1, #2
	ldr	r0, [fp, #-1068]
	bl	shutdown
	ldr	r0, [fp, #-1068]
	bl	close
	b	.L9
.L12:
	.align	2
.L11:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	1234
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
