コード例 #1
0
ファイル: Ghost.cs プロジェクト: vaginessa/ghost-usb-honeypot
        public void Start()
        {
            if (DeviceState != State.BeforeOperation)
            {
                throw new Exception("Device state invalid for this operation");
            }

            Callback = new GhostIncidentCallback(IncidentCreator);
            DeviceID = GhostMountDeviceWithID(GhostDeviceID, Callback, IntPtr.Zero, ImageFileName);
            if (DeviceID == -1)
            {
                int Error = GhostGetLastError();
                throw new Exception(GhostGetErrorDescription(Error));
            }

            DeviceState = State.Mounted;
            Mount       = DateTime.Now;
            OnUpdate();
        }
コード例 #2
0
ファイル: Ghost.cs プロジェクト: jinverar/ghost-usb-honeypot
        public void Start()
        {
            if (DeviceState != State.BeforeOperation)
            {
                throw new Exception("Device state invalid for this operation");
            }

            Callback = new GhostIncidentCallback(IncidentCreator);
            DeviceID = GhostMountDeviceWithID(GhostDeviceID, Callback, IntPtr.Zero, ImageFileName);
            if (DeviceID == -1)
            {
                int Error = GhostGetLastError();
                throw new Exception(GhostGetErrorDescription(Error));
            }

            DeviceState = State.Mounted;
            Mount = DateTime.Now;
            OnUpdate();
        }
コード例 #3
0
ファイル: Ghost.cs プロジェクト: jinverar/ghost-usb-honeypot
 private static extern int GhostMountDeviceWithID(int DeviceID, GhostIncidentCallback Callback, IntPtr Context, String ImageName);
コード例 #4
0
ファイル: Ghost.cs プロジェクト: vaginessa/ghost-usb-honeypot
 private static extern int GhostMountDeviceWithID(int DeviceID, GhostIncidentCallback Callback, IntPtr Context, String ImageName);