Skip to content

Commit

Permalink
fix url parse bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
jz committed Mar 21, 2024
1 parent 8c726bf commit a022958
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions client-drv/client-drv/kquery_pdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ class kqpdb {
if (server_.empty()) {
return;
}
if (server_.back() != '/') {
server_.push_back('/');
}

kfile f(path);
if (!f.valid()) {
Expand Down
2 changes: 1 addition & 1 deletion client-drv/client-drv/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ NTSTATUS DriverMain(PDRIVER_OBJECT pDriverObj, PUNICODE_STRING pRegistryString)
pDriverObj->DriverUnload = DriverUnload;

try {
kqpdb::set_default_server("http://39.105.177.215:9025/");
kqpdb::set_default_server("http://www.zzzou.xyz:9025");
kqpdb pdb("\\SystemRoot\\System32\\ntoskrnl.exe");

////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion client/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "query_pdb.h"

int main() {
qpdb::set_default_server("http://localhost:8080");
qpdb::set_default_server("http://www.zzzou.xyz:9025");

try {
qpdb pdb(R"(C:\Windows\System32\ntoskrnl.exe)");
Expand Down
3 changes: 3 additions & 0 deletions client/query_pdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class qpdb {
if (server_.empty()) {
return;
}
if (server_.back() == '/') {
server_.pop_back();
}

std::ifstream f(path, std::ios::binary);
if (!f.is_open()) {
Expand Down
3 changes: 3 additions & 0 deletions server/downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ downloader::downloader(std::string path, std::string server)
spdlog::error("invalid downloader, path: {}, server: {}", path_, server_);
return;
}
if (server_.back() != '/') {
server_.push_back('/');
}

server_split_ = split_server_name();
if (server_split_.first.empty()) {
Expand Down

0 comments on commit a022958

Please sign in to comment.