전체 글 549

Mitsubishi PLC Q Series Control code, using by Python3(MC protocol)

import socketimport reimport datetimedef send_packet(ip, port, hex_dump, network_num, station_num, cpu_num): """ 주어진 IP와 포트에 hex 데이터를 전송하고 응답을 처리합니다. Args: ip (str): 대상 서버의 IP 주소. port (int): 대상 서버의 포트 번호. hex_dump (str): 전송할 hex 데이터 문자열. network_num (str): 네트워크 번호 (hex). station_num (str): 스테이션 번호 (hex). cpu_num (str): CPU 번호 (hex). Returns:..

카테고리 없음 2025.02.24

Mitsubishi PLC R Series Control code, using by Python3

더보기import socket import struct def read_r_series_data(ip, port, device_code, device_number, read_length):     """R 시리즈 PLC에서 데이터를 읽어오는 함수"""     # SLMP 프레임 생성     command = b'\x04\x01'  # 워드 데이터 읽기 명령어     sub_command = b'\x00\x00'     device_code_bytes = device_code.encode('ascii')     device_number_bytes = struct.pack('    read_length_bytes = struct.pack('    data = command + sub_command + dev..

web_security 2025.02.24

eee

import socket def send_packet(ip, port, hex_dump): # 입력된 hex 값으로 바이트로 변환 packet = bytes.fromhex(hex_dump) # 소켓 생성 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: # 서버에 연결 sock.connect((ip, port)) # 데이터 전송 sock.sendall(packet) print("Packet sent successfully!") except Exception as e: print("Error occurred:", e) finally: # 소켓 닫기 sock.close() # 테스트를 위한 IP 주소, 포트 및 hex 값 설정 ip_address ..

카테고리 없음 2024.03.08

국산 토종 종갓집 웹쉘

손수 만든 webshell 이며 command 실행, 파일 쓰기/수정/삭제 기능 따윈 없습니다. 기능이 허접한 웹쉘이므로, 가급적이면 github에 있는 웹쉘을 쓰시길 바라며 정말 이 형편 없는 웹쉘이 필요한 사람에게 사용되었으면 좋겠네요. 아무리 기능이 없다고 해도, 이런 악의적인 파일을 임의의 사이트에 업로드 하여 테스트하는 행위는 매우 위험하므로 wargame, test 사이트에만 올리시길 바랍니다. ㅅㄱ 순서는 asp webshell, jsp webshell, php webshell 순서대로 진행됩니다 Current Directory Files (File) (Directory) Directory: (File) (Directory) Error occurred: made by J.K.jsp Direc..

web_security 2023.04.18