我使用 gdb -p
pidof test
访问 gdb 进行调试
结果如图
和
不知道为什么新进程马上就退出了。如果您能给我一些解决问题的想法或解决方案,我将不胜感激
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import socket
import ssl
import re
import md5
import os
import uuid
from pwn import *
context(log_level='debug',arch='amd64',os='linux')
PROTO = "udp"
SERVER_IP = "127.0.0.1"
SERVER_PORT = 5060
USERNAME = "3000"
PASSWORD = "3000"
SUBSCRIBE_USERNAME = "3000"
# default to SIP TCP
socktype = socket.SOCK_STREAM
if PROTO == "udp":
socktype = socket.SOCK_DGRAM
sock = socket.socket(socket.AF_INET, socktype)
if PROTO == "tls":
sock = ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_TLSv1)
sock.connect((SERVER_IP, SERVER_PORT))
sh = remote.fromsocket(sock)
......
sh.sendline(newmsg)
sh.interactive()
os.system("cat")