Packet Capture And Threading, Capture Library Waits For "thread Stop"

Apr 5, 2009

So I am hacking together an app which listens to traffic using SharpPcap library, it reconstructs the packets from sessions using the code from TpcRcon.

Listening and reconstructing part work on their own . What I want is on each packet arrival main window gets an event so it can display the packet , and when session is reconstructed display a complete packet (I am interested in HTTP ones) . -That is where it breaks with weird symptoms: for example right now it does not stop on invoking stop listening method - the sharppcap library function hangs there forever waiting on this line of code : m_pcapThreadEvent.WaitOne();//wait for the 'stopped' signal from thread

I also had it not working and crashing in sharppcap function because I had omitted one parameter in form delegate- which makes no sense, because form delegate does not deal with packet capture at all and only reacts on "New Packet" event from my "Listener" class (which is only there to notify main form)

My app starts as module main instancing class "Listener". MainForm has it
registered as friend with event and handles even "New Packet"

Main Form:
Private Sub uiListenStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btListenStart.Click
aLogger.AddMessage("Started Listening")

[Code]....

View 1 Replies


ADVERTISEMENT

Use Packet X To Capture Packets From A Certain Program That Uses UDP?

Jun 12, 2011

I have been trying to figure out how to use Packet X to Capture Packets from a certain program that uses UDP. Does anyone know how to do so?

View 1 Replies

Capture Event In Another Thread?

May 6, 2012

I'd like to create a WebBrowser for the purpose of taking a screenshot of a website. Once its finished it will update a thumbnail image in a ListView. I'd like the whole operation to be done in the background so the UI remains responsive.I toyed with Creating the WebBrowser in a new thread and calling Navigate. I can use a loop to watch for the ReadyState of the webbrowser before I do the screencapture. However it will only continue with the thread if I use Application.DoEvents in that loop. I've never been a huge fan of doing this and would prefer to watch for an event instead. However if I add a handles clause to the WebBrowser it doesn't fire (I tried creating the WebBrowser in the thread, and also tried by declaring it as shared within the class scope).

View 3 Replies

Capture Keypress / Let User Pick Their Own Start/stop Key?

Oct 29, 2011

Currently I have the start-key for my vb.net application hardcoded like this:

GetAsyncKeyState(Keys.F2)

Where vb.net sais "F2 As System.Windows.Forms.Keys = 113" on mouse-over.But I want my users to be able to pick their own Key. If I make a drop-down box (combobox) and pre-define some choices in there (Like ESC or F3), all those choices are strings. How can I convert those strings to a System.Windows.Forms.Keys integer? Also, I'd like it to also be possible to "capture" a single keypress. So they'd click the "capture" button, and the next key they hit will be saved as the start/stop button. But I wouldn't even know where to begin looking for that one.

View 2 Replies

Capture A Program Initializing And Stop It, So It Doesn't Interrupt Code?

Jun 22, 2009

A spreadsheet formatter that I made for the department opens and closes Excel spreadsheets in the backround. If someone opens Excel while the macro is running, it stalls the entire program. I need a way to sense Excel opening, then stop it, preferably with a message box saying what just happened.

View 1 Replies

Threading Progress Bar In .net - Thread Operation Not Valid Control 'ProgressBar1' Accessed From A Thread Other Than The Thread It Was Created On

Feb 17, 2012

Would anyone be able to help me here please. I'm fairly new to VB.net and threading so im just trying to figure out what is happening.When I debug this I am getting the error thread operation not valid: Control 'ProgressBar1' accessed from a thread other than the thread it was created on.

I'm a little lost as to why the error is occuring or how to fix it. I've had to put the progress bar in a separate thread otherwise the GUI crashes

[Code]...

View 2 Replies

VS 2008 Terminate A Threading.thread Using Thread.abort?

Jun 10, 2010

im trying to terminate a threading.thread using thread.abort the thread runs a download connection so is usually in the middle of socket.recieve or socket.send or socket.connect when aborting i just want to terminate the thread no matter what thread.abort raises an MDA excpetion. so i ticked it off in the debug exceptions menu. now it doesnt raise an exception, but the thread simply wont terminate. my program wont close unless i press top in the debugger.i cant pause downloads because i cant terminate the thread this code wasn't working?

Dim vT As Threading.Thread
For Each vT In clsDownloader.DownloadThreads
If Not vT Is Nothing Then
vT.Abort()

[code].....

as for the exception concerning threads being aborted from other threads being dangerous, how is it possible to send a message from a main thread to another thread to abort itself? as far as i know the only way to a abort one thread from another is to just kill it (because i dont know of ways for a thread to communicate with another).

View 2 Replies

Capture A Tv Dvb-s Signal?

Dec 13, 2010

I am trying to capture a tv dvb-s signal via vb.net since a long time now.I have tried to get it work with the Microsoft examples, but no success till yet.I had success with analog tv tuning, but digital tuning is still far away, also I don't find any examples with dvb-s and vb.net or c#.

View 1 Replies

Capture A Value In Line?

Feb 4, 2011

how can i capture the value of left in the line below using string function:

left position is left:215px

i must capture the value 215.

View 2 Replies

Capture CMD Output?

Mar 7, 2011

Target:

Send commands to a CMD.

Retrieve their corresponding output (result).

Present the output in a TextBox.

Example:

send "ipconfig" to CMD.Present the output (result) of the command in Text1 TextBox.

View 2 Replies

Capture Form1, Not What Is On Top

Mar 26, 2012

I want to capture Form1 window, not what is on top (what I actually see).

Dim screenshot As System.Drawing.Bitmap
Dim graph As Graphics

[code]....

It captures what is on top, for example: I have firefox on top, so in myPic.bmp will by firefox, not Form1 window. So, how can I do that when some programs are on top, it captured Form1 window?

View 3 Replies

Capture Image With Web Cam?

Nov 15, 2011

i want a code for capturing snap through webcam i have a form where i placed a button, what i want is when i click that button it capture a snap and save it in c: drive ?

View 1 Replies

Capture Input From USB?

Aug 27, 2010

Searching found many answers along the lines of it depends on the device driver", but I don't think that it's that way here.

I have a cheap & nasty RFID tag reader. You just have to open notepad, touch a tag to the read and its serial number appears in notepad (I have not tried it in Linux).

Anyhoo, how can I programatically capture this serial number in VB.net (20088 express)?

View 2 Replies

Capture The PC Screen

Oct 13, 2010

When I first saw Silverlight, I thought that there was a How Do I: video that demonstrated how to capture the PC screen and save it in a WMV file. Since I can't find anything like that I'm wondering if I was dreaming or it has been removed from the Net. My goal is to create a video capture Class that I can use to demonstrate my program and add the feature in my program so the user can record any issues they are having with my program and send it to me. This way I can see what issues they are having with my program.

View 2 Replies

Capture Url When IE Exits?

Aug 5, 2010

I want to allow my user to add urls to a database, much as a user might add file names. I have a form with a label, a textbox, and a browse button. I would like the browse button to load the user's default browser and then have the final url appear in the textbox when the browser closes. I have not been able to do that, but I have come close. I have not found a way to capture the url from an arbitray browser, so I instead load ie.exe and then capture the url with an OnQuit handler. That works (even verified by the debugger) but I am unable to get the url to appear in the textbox without actually clicking in the textbox once ie closes. I would like a suggestion as to how to avoid making my user click in the textbox and, if possible, to load the user's default browser and still capture the url. Here is my code for the Browse button (IE is defined at the class level as Dim WithEvents IE As SHDocVw.InternetExplorer):

theURL = ""
IE = New SHDocVw.InternetExplorer
AddHandler IE.OnQuit, AddressOf HandleIEQuit

[code].....

View 3 Replies

Get The Web Camera Capture?

May 5, 2010

how can i get the web camera capture?and put it in the tool box?

View 1 Replies

How To Capture A Frame From A DVD

Aug 1, 2010

I have a personal project to complete and one of the smaller aspects is to capture about 10-20 seconds of video or a screenshot (bitmap,jpg, etc)from a DVD. This is made even more complicated by the fact that the video files may be .VOB, .AVI or .MPG and using numerous codecs (DivX, Xvid, etc).

I have searched on google and the tutorials here, but nothing seems to fit.

Does anyone have some "simple" references, URL's, blogs, code examples that would help with my quest? (My policy is not the KISS principal, but the KISFSP ... "Keep It Simple For Stupid People")

View 4 Replies

How To Capture Captcha

Jan 21, 2010

im making right now a auto sign up application for example in registering yahoo mail when i click a button in VB all information will be filled out and submit

Private Sub btnFillUp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFillUp.Click
Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("Input")
WebBrowser1.Document.GetElementById("FirstName").InnerText = "John"
WebBrowser1.Document.GetElementById("SecondName").InnerText = "Joe"

[code]....

View 11 Replies

How To Capture URL Response

Aug 11, 2009

I asked a question like this earlier this week, but I think I was way off basis, and I think I was getting help on the wrong subject. Let me explain the entire situation here, and I will be as detailed as Possible. I have developed an application for Windows Mobile Devices using Visual Basic 2008. One feature of the application, allows users to view records that are stored online, on the device.

[Code]...

View 2 Replies

VS 2010 Capture ALT Key?

Jan 6, 2012

<System.Runtime.InteropServices.DllImport("user32.dll")> _
Private Shared Function GetAsyncKeyState(ByVal vkey As System.Windows.Forms.Keys) As Short
End Function

[code].....

View 7 Replies

.net - RegEx - Use Capture Or Group?

Nov 4, 2010

Say I have this list (with unknown delimiters):

ABC-12345, DEF-34567; WER-12312
ERT-23423

I know the regex to mach what I need is: [A-ZÆØÅ]{3}-d{5}. But how do I use the Group or Capture of the .net Match class?

This is my first attempt:

Public Function ParseSites(ByVal txt As String) As List(Of String)
Const SiteIdRegEx = "([A-ZÆØÅ]{3}-d{5})"
Dim list As New List(Of String)

[Code].....

View 2 Replies

.net: Capture Function Keys F1?

Jan 7, 2011

I cannot capture the function keys F1..F12 for my application. I am able to capture regular keys and modifiers such as shift, ctrl, alt, etc.This question recommends KeyPreview = True, however that does not seem to work for my application. What am I doing wrong?

[Code]...

View 2 Replies

An 'easy' Way To Capture Video?

Apr 15, 2012

I've been trying to play with DirectShow but it's getting on top of me and my question on here didn't answered so I'm thinking maybe I should go with a different approach. (DirectShow VB.net can't change recording format). <- Where as that 'works' I can't get it in the format I want it, and I don't really understand it so I'd obviousl like to go down the route of something I can get my head around.

I've googled till my fingers are raw trying to come up with an easy way to record video in my vb.net application, it doesn't have to be fancy, just a preview with a start record, stop record button, that's it.

View 2 Replies

Audio Stream Capture From Web

Nov 18, 2009

I have link: [URL]

I want capture the audio stream on my computer in mp3/wav.

I have no idea from what i should start. What should i use for start developing? I'm working in VS2008 on VB. Can i do it in VB? What additional software i need?

View 2 Replies

Cannot Connect To Capture Card

Jun 22, 2010

I have a multi input capture card (Composit, s-video, ...) and I developed a program with avicap32.dll in vb.net to connect to a webcam. But I can not use this program to connect to composite input of my capture card.It seems the capture card has a default input.

Firstly, How can I change the default input? because I want to connect to compsite input.

Secondly, is there another way to connect to my capture card?

I've been googling but I could not find any code for vb.net or C#.net. They are all in C++ and I could not traslate them to vb.net

View 1 Replies

Capture & Analyze Audio?

Mar 31, 2012

I would like to make a visual representation of the sound toming out of the speakers but stuck at sound because I have no idea how capture/analyze it

View 3 Replies

Capture A Key Outside Of A _Keydown Event?

May 21, 2009

i need to capture a key outside of a _Keydown event.

I need the backspace button (0X08)

View 3 Replies

Capture All Keyboard Events?

Aug 9, 2010

I've written an app with a simple textbox which attempts to identify a user from their typing habits (interval between key presses, duration key is held, time between key strokes ie a->s is quicker than a->v for some users, shorter for others depending on typing style). It's far from perfect but it does correctly identify moderate-large differences in style.I'm hoping to use this as a form of security monitor - If the typing style of the user doesn't fit a recognised pattern, report to a central server.

Of course, the next step in testing this is to begin to capture "regular" typing habits - ie when browsing, switching between apps, etc.What I can't figure out how to do is capture keyboard input for all applications (excluding the login/welcome screen, alternate desktops, etc. - I have no reason to parse that and there's probably not enough input to analyse anyway)Disclaimer: Yes, I know this comes dangerously close to writing a keylogger which is verboten but if I wanted to do that, I'd write a keyboard driver in C++ - I'm sure it would be far more streamlined and easier to obfuscate than a hulking .Net MSIL assembly. I have no doubt I'll be fending off "That's a keylogger" comments but I've hit a wall and need to ask somewhere.

View 2 Replies

Capture Down-arrow Keystroke?

Jul 8, 2009

The feature I'm trying to implement allows the user to press the down-arrow key and "tab" through different features on the form. Is there a way to use the keyPressEventArgs or something similar to catch that? Is it necessary to delve into hooks and processes? And if so, does anyone know a good resource for a beginner?

View 3 Replies

Capture Events In VB 2008?

Apr 27, 2012

how can I capture an event like a button click or timer event, if I created the controls at run-time?

Ex: Dim a As Button

Dim b As Timer

I want to capture the click event of the button "a" and the timer event of the timer "b".

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved