Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Summpot committed Apr 27, 2024
1 parent de247fd commit 3fd8980
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions src/ws2_socket_dns_hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,34 +114,7 @@ unsafe extern "system" fn detour1(
*lpnumberofbytessent = len as u32;
WSASetEvent((*lpoverlapped).hEvent);
return 0;
} else if query.name().to_string().eq("www.pixiv.net.") {
message.add_answers([
Record::from_rdata(
query.name().clone(),
1000,
A::new(104, 18, 42, 239),
)
.into_record_of_rdata(),
Record::from_rdata(
query.name().clone(),
1000,
A::new(172, 64, 145, 17),
)
.into_record_of_rdata(),
]);
TX.as_ref()
.unwrap()
.send(Payload {
message: message.to_owned(),
addr,
addr_len: itolen,
})
.ok();
let len = message.to_bytes().unwrap().len();
*lpnumberofbytessent = len as u32;
WSASetEvent((*lpoverlapped).hEvent);
return 0;
} else if query.name().to_string().eq("accounts.pixiv.net.") {
} else if query.name().to_string().ends_with(".pixiv.net.") {
message.add_answers([
Record::from_rdata(
query.name().clone(),
Expand Down

0 comments on commit 3fd8980

Please sign in to comment.