Introduce my name Fadli, I work as a bug bounty hunter, I found a vulnerability in an existing gitlab system which allows me to change the gitlab administrator/root password and also be able to view all source code and secret credentials. This finding is Critical, get shell to access server/linux operating system. please reply my email bfadliyanto@gmail.com

Commit 7bab1820 authored by 朱婉杰's avatar 朱婉杰

image to video

parents
Pipeline #515 failed with stages
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
i.ico

139 KB

import cv2
import os
import re
import tkinter as tk
from tkinter import simpledialog
def natural_sort_key(s):
return [int(text) if text.isdigit() else text.lower() for text in re.split('([0-9]+)', s)]
def images_to_video(image_folder, video_name, fps=24, target_width=640, target_height=480):
# 支持更多图片格式
supported_extensions = ('.png', '.jpg', '.jpeg', '.bmp')
images = [img for img in os.listdir(image_folder) if img.endswith(supported_extensions)]
images.sort(key=natural_sort_key)
if not images:
print("未找到图片文件。")
return
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
video = cv2.VideoWriter(video_name, fourcc, fps, (target_width, target_height))
for image in images:
img_path = os.path.join(image_folder, image)
try:
frame = cv2.imread(img_path)
if frame is None:
print(f"无法读取图片: {img_path}")
continue
# 调整图片尺寸
resized_frame = cv2.resize(frame, (target_width, target_height))
video.write(resized_frame)
except Exception as e:
print(f"处理图片 {img_path} 时出错: {e}")
video.release()
print(f"视频 {video_name} 已生成。")
if __name__ == "__main__":
root = tk.Tk()
root.withdraw()
image_folder = simpledialog.askstring("输入路径", "请输入图片文件夹的路径:")
if image_folder:
video_name = 'output_video.mp4'
fps = 1
# 设置目标尺寸
target_width = 2560
target_height = 1440
images_to_video(image_folder, video_name, fps, target_width, target_height)
root.destroy()
# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['test.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='test',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=['i.ico'],
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment