Fix nsig extraction code and some warnings

oops
This commit is contained in:
techmetx11 2024-07-09 18:02:16 +01:00
parent 35fc0bc549
commit de4fab1517
No known key found for this signature in database
GPG Key ID: E60B63635FF4E062
2 changed files with 4 additions and 9 deletions

View File

@ -6,7 +6,7 @@ pub static TEST_YOUTUBE_VIDEO: &str = "https://www.youtube.com/watch?v=jNQXAC9IV
pub static REGEX_PLAYER_ID: &Lazy<Regex> = regex!("\\/s\\/player\\/([0-9a-f]{8})"); pub static REGEX_PLAYER_ID: &Lazy<Regex> = regex!("\\/s\\/player\\/([0-9a-f]{8})");
pub static NSIG_FUNCTION_ARRAY: &Lazy<Regex> = regex!( pub static NSIG_FUNCTION_ARRAY: &Lazy<Regex> = regex!(
"\\.get\\(\"n\"\\)\\)&&\\([a-zA-Z0-9$_]=([a-zA-Z0-9$_]+)(?:\\[(\\d+)])?\\([a-zA-Z0-9$_]\\)" "b=String\\.fromCharCode\\(110\\),c=a\\.get\\(b\\)\\)&&\\(c=([a-zA-Z0-9$_]+)\\[([0-9]+)\\]"
); );
pub static REGEX_SIGNATURE_TIMESTAMP: &Lazy<Regex> = regex!("signatureTimestamp[=:](\\d+)"); pub static REGEX_SIGNATURE_TIMESTAMP: &Lazy<Regex> = regex!("signatureTimestamp[=:](\\d+)");

View File

@ -8,18 +8,13 @@ use consts::DEFAULT_SOCK_PATH;
use jobs::{process_decrypt_n_signature, process_fetch_update, GlobalState, JobOpcode}; use jobs::{process_decrypt_n_signature, process_fetch_update, GlobalState, JobOpcode};
use opcode::OpcodeDecoder; use opcode::OpcodeDecoder;
use player::fetch_update; use player::fetch_update;
use std::{env::args, future, io::Error, sync::Arc}; use std::{env::args, sync::Arc};
use tokio::{ use tokio::{
fs::remove_file, fs::remove_file,
io::{ net::{UnixListener, UnixStream},
self, AsyncBufRead, AsyncBufReadExt, AsyncRead, AsyncReadExt, AsyncWrite, BufReader,
BufWriter, Interest, Ready,
},
net::{TcpListener, UnixListener, UnixStream},
sync::Mutex, sync::Mutex,
task::{futures, spawn_blocking},
}; };
use tokio_util::codec::{Decoder, Framed, FramedRead, FramedWrite}; use tokio_util::codec::Framed;
use crate::jobs::{ use crate::jobs::{
process_decrypt_signature, process_get_signature_timestamp, process_player_status, process_decrypt_signature, process_get_signature_timestamp, process_player_status,