This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{fs::File, path::Path}; | |
use dlhn::{Deserializer, Serializer}; | |
use serde::{Deserialize, Serialize}; | |
use thiserror::Error; | |
#[derive(Debug, Error)] | |
pub enum ReplayError { | |
#[error("IO error: {0}")] | |
Io(#[from] std::io::Error), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re # Required by the function | |
import os # Required by the interface | |
def find_gdps_endpoint(data: bytes): # Input data should be the bytes of the whole binary file ! | |
# DO NOT REMOVE THE FOLLOWING COMMENT | |
# THIS FUNCTION IS COPYRIGHTED UNDER MIT LICENSE BY HGSTYLE 2023-end of the time | |
# READ THE LICENSE AT: https://hgstyle.mit-license.org/ | |
# Get the URLs using a regex that I copy-pasted from Stack Overflow | |
result = re.findall(r"\w+://\w+\.\w+\.\w+/?[\w\.\?=#]*".encode(), data) | |
# Set the domains to exclude |