实战步骤
样例代码 gets3url.py
import boto3
import mysql.connector
s3Client = boto3.client('s3')
mydb = mysql.connector.connect(
host="xxx",
user="xxx",
password="xxx",
database="xxx",
port="xxx"
)
def lambda_handler(event, context):
#Get our bucket and file name
bucket = event['Records'][0]['s3']['bucket']['name']
key = event['Records'][0]['s3']['object']['key']
#Get live_id from s3 object key
live_id = key.split("/")[2]
print("live_id: {}".format(live_id) )
# S3 object url
obj_url = "https://" + bucket + ".s3.xxx.amazonaws.com/" + key
print("obj_url: {}".format(obj_url))
# Insert into mysql
mycursor = mydb.cursor()
sql = "INSERT INTO s3_bucket_obj (%s) VALUES (%s);"
mycursor.execute(sql, (obj_url, live_id))
mydb.commit()
print(mycursor.rowcount, "record inserted.")
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
jmp 2AE3:3;CS=2AE3H,IP=0003H jmp ax;只能用某一合法寄存器的值来修改IP的值 地址寄存器不能用立即数mov,而是得通过合法的寄存器来mov ;将(1000:0)中的数据读到al中 mov bx,1000H mov ds,bx …