Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharpPcap.PcapException: 'Failed to open Error Code: 3)' #509

Open
haunwoo opened this issue Mar 4, 2024 · 0 comments
Open

SharpPcap.PcapException: 'Failed to open Error Code: 3)' #509

haunwoo opened this issue Mar 4, 2024 · 0 comments

Comments

@haunwoo
Copy link

haunwoo commented Mar 4, 2024

using Newtonsoft.Json.Linq;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Chromium;
using PacketDotNet;
using SharpPcap;
using SharpPcap.WinDivert;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.WebSockets;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

private WinDivertDevice device;

private void Form1_Load_1(object sender, EventArgs e)
{
  this.ws = new EvoWs(this);
  this.Height = 100;
  this.service = ChromeDriverService.CreateDefaultService();
  ((DriverService) this.service).HideCommandPromptWindow = true;
  ((DriverService) this.service).DriverServicePath = "./";
  ((DriverService) this.service).DriverServiceExecutableName = "chromedriver.exe";
  this.options = new ChromeOptions();
  ((ChromiumOptions) this.options).AddArguments(new string[12]
  {
    "--disable-notifications",
    "--disable-popup-blocking",
    "--disable-blink-features=AutomationControlled",
    "--disable-infobars",
    "--disable-gpu",
    "--start-maximized",
    "--disable-web-security",
    "--ignore-certificate-errors",
    "--allow-running-insecure-content",
    "--proxy-auto-detect",
    "--disable-quic",
    "--mute-audio"
  });

        this.device = new WinDivertDevice();
        this.device.Filter = "tcp.SrcPort == 443 || tcp.DstPort == 443";

        CaptureDeviceExtensions.Open((IPcapDevice)this.device, (DeviceModes)0, 1); 
        this.device.OnPacketArrival += new PacketArrivalEventHandler(this.Device_OnPacketArrival);
        this.device.StartCapture();


    }

2024-03-04 22 51 29

An unknown exception is being thrown
Can anyone predict this exception?
If so, please let me know Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant