Skip to content

Instantly share code, notes, and snippets.

@udzura
Created October 23, 2018 09:42
Show Gist options
  • Save udzura/1e14ffeacda2504ab69d467960d42fae to your computer and use it in GitHub Desktop.
Save udzura/1e14ffeacda2504ab69d467960d42fae to your computer and use it in GitHub Desktop.
call codedump(mrb, irep)
irep 0x5650281e45d0 nregs=13 nlocals=8 pools=28 syms=34 reps=1
local variable names:
R1:c
R2:&
R3:id
R4:ip
R5:port
R6:root
R7:veth
file: (eval)
7 000 OP_ENTER 1:0:0:0:0:0:0
8 004 OP_GETCONST R8 :ENV
8 007 OP_STRING R9 L(0) ; "ID"
8 010 OP_SEND R8 :[] 1
8 014 OP_MOVE R3 R8 ; R3:id
8 017 OP_NOP
9 018 OP_GETCONST R8 :ENV
9 021 OP_STRING R9 L(1) ; "IP"
9 024 OP_SEND R8 :[] 1
9 028 OP_MOVE R4 R8 ; R4:ip
9 031 OP_NOP
10 032 OP_GETCONST R8 :ENV
10 035 OP_STRING R9 L(2) ; "PORT"
10 038 OP_SEND R8 :[] 1
10 042 OP_MOVE R5 R8 ; R5:port
10 045 OP_NOP
12 046 OP_MOVE R8 R3 ; R3:id
12 049 OP_NOP
12 050 OP_NOP
12 051 OP_MOVE R9 R1 ; R1:c
12 054 OP_NOP
12 055 OP_NOP
12 056 OP_MOVE R10 R8
12 059 OP_NOP
12 060 OP_SEND R9 :name= 1
13 064 OP_STRING R8 L(3) ; "/root"
13 067 OP_MOVE R9 R1 ; R1:c
13 070 OP_NOP
13 071 OP_NOP
13 072 OP_MOVE R10 R8
13 075 OP_NOP
13 076 OP_SEND R9 :workdir= 1
15 080 OP_GETCONST R8 :Pathname
15 083 OP_STRING R9 L(4) ; "/var/lib/haconiwa/rootfs/"
15 086 OP_MOVE R10 R3 ; R3:id
15 089 OP_NOP
15 090 OP_NOP
15 091 OP_STRCAT R9
15 093 OP_STRING R10 L(5) ; ""
15 096 OP_STRCAT R9
15 098 OP_SEND R8 :new 1
15 102 OP_MOVE R6 R8 ; R6:root
15 105 OP_NOP
16 106 OP_STRING R8 L(6) ; "/usr/sbin/nginx"
16 109 OP_STRING R9 L(7) ; "-g"
16 112 OP_STRING R10 L(8) ; "daemon off;"
16 115 OP_ARRAY R8 3
16 118 OP_MOVE R9 R1 ; R1:c
16 121 OP_NOP
16 122 OP_NOP
16 123 OP_MOVE R10 R8
16 126 OP_NOP
16 127 OP_SEND R9 :init_command= 1
17 131 OP_MOVE R8 R1 ; R1:c
17 134 OP_NOP
17 135 OP_NOP
17 136 OP_SEND R8 :command 0
17 140 OP_LOADSYM R9 :file
17 143 OP_STRING R10 L(9) ; "/var/log/haconiwa.out"
17 146 OP_HASH R9 1
17 149 OP_SEND R8 :set_stdout 1
18 153 OP_MOVE R8 R1 ; R1:c
18 156 OP_NOP
18 157 OP_NOP
18 158 OP_SEND R8 :command 0
18 162 OP_LOADSYM R9 :file
18 165 OP_STRING R10 L(10) ; "/var/log/haconiwa.err"
18 168 OP_HASH R9 1
18 171 OP_SEND R8 :set_stderr 1
19 175 OP_MOVE R8 R1 ; R1:c
19 178 OP_NOP
19 179 OP_NOP
19 180 OP_MOVE R9 R6 ; R6:root
19 183 OP_NOP
19 184 OP_NOP
19 185 OP_SEND R8 :chroot_to 1
20 189 OP_MOVE R8 R1 ; R1:c
20 192 OP_NOP
20 193 OP_NOP
20 194 OP_SEND R8 :daemonize! 0
22 198 OP_STRING R8 L(11) ; "/var/lib/lxcfs"
22 201 OP_MOVE R9 R1 ; R1:c
22 204 OP_NOP
22 205 OP_NOP
22 206 OP_MOVE R10 R8
22 209 OP_NOP
22 210 OP_SEND R9 :lxcfs_root= 1
24 214 OP_MOVE R8 R1 ; R1:c
24 217 OP_NOP
24 218 OP_NOP
24 219 OP_STRING R9 L(12) ; "procfs"
24 222 OP_SEND R8 :mount_independent 1
25 226 OP_MOVE R8 R1 ; R1:c
25 229 OP_NOP
25 230 OP_NOP
25 231 OP_STRING R9 L(13) ; "sysfs"
25 234 OP_SEND R8 :mount_independent 1
26 238 OP_MOVE R8 R1 ; R1:c
26 241 OP_NOP
26 242 OP_NOP
26 243 OP_STRING R9 L(14) ; "devtmpfs"
26 246 OP_SEND R8 :mount_independent 1
27 250 OP_MOVE R8 R1 ; R1:c
27 253 OP_NOP
27 254 OP_NOP
27 255 OP_STRING R9 L(15) ; "devpts"
27 258 OP_SEND R8 :mount_independent 1
28 262 OP_MOVE R8 R1 ; R1:c
28 265 OP_NOP
28 266 OP_NOP
28 267 OP_STRING R9 L(16) ; "shm"
28 270 OP_SEND R8 :mount_independent 1
29 274 OP_MOVE R8 R1 ; R1:c
29 277 OP_NOP
29 278 OP_NOP
29 279 OP_MOVE R9 R6 ; R6:root
29 282 OP_NOP
29 283 OP_NOP
29 284 OP_LOADSYM R10 :host_root
29 287 OP_STRING R11 L(17) ; "/etc"
29 290 OP_HASH R10 1
29 293 OP_SEND R8 :mount_network_etc 2
31 297 OP_MOVE R8 R1 ; R1:c
31 300 OP_NOP
31 301 OP_NOP
31 302 OP_SEND R8 :namespace 0
31 306 OP_STRING R9 L(18) ; "mount"
31 309 OP_SEND R8 :unshare 1
32 313 OP_MOVE R8 R1 ; R1:c
32 316 OP_NOP
32 317 OP_NOP
32 318 OP_SEND R8 :namespace 0
32 322 OP_STRING R9 L(19) ; "ipc"
32 325 OP_SEND R8 :unshare 1
33 329 OP_MOVE R8 R1 ; R1:c
33 332 OP_NOP
33 333 OP_NOP
33 334 OP_SEND R8 :namespace 0
33 338 OP_STRING R9 L(20) ; "uts"
33 341 OP_SEND R8 :unshare 1
34 345 OP_MOVE R8 R1 ; R1:c
34 348 OP_NOP
34 349 OP_NOP
34 350 OP_SEND R8 :namespace 0
34 354 OP_STRING R9 L(21) ; "pid"
34 357 OP_SEND R8 :unshare 1
36 361 OP_MOVE R8 R3 ; R3:id
36 364 OP_NOP
36 365 OP_NOP
36 366 OP_MOVE R9 R1 ; R1:c
36 369 OP_NOP
36 370 OP_NOP
36 371 OP_SEND R9 :network 0
36 375 OP_MOVE R10 R8
36 378 OP_NOP
36 379 OP_SEND R9 :namespace= 1
37 383 OP_MOVE R8 R4 ; R4:ip
37 386 OP_NOP
37 387 OP_NOP
37 388 OP_MOVE R9 R1 ; R1:c
37 391 OP_NOP
37 392 OP_NOP
37 393 OP_SEND R9 :network 0
37 397 OP_MOVE R10 R8
37 400 OP_NOP
37 401 OP_SEND R9 :container_ip= 1
38 405 OP_STRING R8 L(22) ; "haconiwa0"
38 408 OP_MOVE R9 R1 ; R1:c
38 411 OP_NOP
38 412 OP_NOP
38 413 OP_SEND R9 :network 0
38 417 OP_MOVE R10 R8
38 420 OP_NOP
38 421 OP_SEND R9 :bridge_name= 1
39 425 OP_STRING R8 L(23) ; "veth"
39 428 OP_OCLASS R9
39 430 OP_GETMCNST R9 R9::SHA1
39 433 OP_MOVE R10 R3 ; R3:id
39 436 OP_NOP
39 437 OP_NOP
39 438 OP_SEND R9 :sha1_hex 1
39 442 OP_LOADI_0 R10
39 444 OP_LOADI_4 R11
39 446 OP_SEND R9 :[] 2
39 450 OP_STRCAT R8
39 452 OP_STRING R9 L(5) ; ""
39 455 OP_STRCAT R8
39 457 OP_MOVE R7 R8 ; R7:veth
39 460 OP_NOP
39 461 OP_NOP
39 462 OP_MOVE R9 R1 ; R1:c
39 465 OP_NOP
39 466 OP_NOP
39 467 OP_SEND R9 :network 0
39 471 OP_MOVE R10 R8
39 474 OP_NOP
39 475 OP_SEND R9 :veth_host= 1
40 479 OP_STRING R8 L(24) ; "eth0"
40 482 OP_MOVE R9 R1 ; R1:c
40 485 OP_NOP
40 486 OP_NOP
40 487 OP_SEND R9 :network 0
40 491 OP_MOVE R10 R8
40 494 OP_NOP
40 495 OP_SEND R9 :veth_guest= 1
42 499 OP_EXT2
42 499 OP_LOADI R8 1024
42 504 OP_MOVE R9 R1 ; R1:c
42 507 OP_NOP
42 508 OP_NOP
42 509 OP_SEND R9 :cgroup 0
42 513 OP_STRING R10 L(25) ; "pids.max"
42 516 OP_MOVE R11 R8
42 519 OP_NOP
42 520 OP_SEND R9 :[]= 2
43 524 OP_MOVE R8 R1 ; R1:c
43 527 OP_NOP
43 528 OP_NOP
43 529 OP_SEND R8 :capabilities 0
43 533 OP_STRING R9 L(26) ; "cap_sys_chroot"
43 536 OP_SEND R8 :allow 1
44 540 OP_MOVE R8 R1 ; R1:c
44 543 OP_NOP
44 544 OP_NOP
44 545 OP_SEND R8 :capabilities 0
44 549 OP_STRING R9 L(27) ; "cap_net_bind_service"
44 552 OP_SEND R8 :allow 1
46 556 OP_MOVE R8 R1 ; R1:c
46 559 OP_NOP
46 560 OP_NOP
46 561 OP_LOADSYM R9 :msec
46 564 OP_LOADI_3 R10
46 566 OP_LOADI R11 60
46 569 OP_MUL R10 :*
46 572 OP_EXT2
46 572 OP_LOADI R11 1000
46 577 OP_MUL R10 :*
46 580 OP_HASH R9 1
46 583 OP_BLOCK R10 I(0:0x5650281ea0a0)
46 586 OP_SENDB R8 :add_async_hook 1
46 590 OP_RETURN R8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment