i'm trying to write a java program to read everything I post to a certain website (facebook in this case), I'm trying to make a program to save my ongoing chat to text, I can find the POST in fiddler, but how do I read it in java? I didn't try anything so far because I don't know where to start, and I can't search because I don't know what to search for, is there a better way to do it ? thanks
If you're really looking for something like network traffic sniffer written in Java you'll need to start with researching Jpcap.
You could try their samples, they seem to have a code for Java Tcpdump implementation ready to use.
But listening to traffic is a hack and not a solution, thus should be used episodically and not in production. And if it's not in production why bother with Java and not use command line tools like tcpdump or ethereal?
Related
I have a basic understanding of network programming but i have never had anything to do with USB ports.
This is what i am trying to achieve
I need to write a program in Java, to communicate to a device which is connected to USB port and then later send commands.
I tried terminal as follows earlier but it didn't quite work
ls -l /dev/tty.*
screen /dev/tty.usbserrial-FTYRDSX7 9600
The above didn't work out.
So if someone can just guide with what Java classes i should be looking into and if there are any APIs that should help me get started
Unless you're required to build it from the ground up, use a library such as usb4java (also here). Trying to manage it as a block device and interpreting whatever protocols etc., etc is not worth the effort unless there something very unique to your problem.
So i ended up using jssc which is much easier to use with strait forward syntax and methods
I am trying to elaborate SIP messages coming to an Asterisk server and edit them on the fly using Java.
AMI is supposed to work fine with that. Although I can't send any SIP messages though the socket, cause every-time I tried to edit chan_sip.c the server breaks down. So I haven't find a way to access this information from other classes of the manager. I don't want to save those information to a file or database cause this will delay the whole process.
Using Kamailio is not an option cause I want to make a comparison of both solutions so I need Asterisk.
Is there any path I should follow to get this done? I can't figure why editing chan_sip.c bothers Asterisk making him nonfunctional..
Seams like no way with your qualification. Task seams really complex for me(i have more then 10 years experience, including asteirsk internal and c/c++ programming).Try do that using dialplan only
I know this probably sounds really simple, but I've been searching for something that will do this and I have come up with nothing.
What I Need
I need something that will notify me of a new e-mail, but keep playing a sound until I've read the e-mail. Long story short, we get online orders sent to our e-mail at work, and when we are busy, we might miss the initial notification. I need a sound to play repeatedly until one of us has read the e-mail.
What I've Found
I have searched, and I have found many ways to get notifications of a new e-mail. The problem is, however, that they only play a sound once. I thought, "No big deal, just make a really long sound file." The problem with that is that none of these programs stop the sound once I've checked the e-mail. I might hear the sound right away and receive the order, or I might not be able to check it for 5 minutes. Listening to 5 minutes of dinging while preparing an order will drive us all insane.
Does Something Exist?
Does anybody know of any programs that already exist that will do what I need?
Does Nothing Exist?
No way to do this in a program that's already out there? sigh
In that case, what is the easiest API to access gmail from a client computer (and easy to build GUI)? (I'm not getting paid to make this, but it will make life easier for me, so why not?) I am most comfortable working in Java, but I only need to make a program that says, "hey you have new e-mail, let me play you the song of my people until you pay attention to me." Then, once I do something, it marks the e-mail as read. So, whatever language is easiest to do this in will work.
Thank you all so much in advance for any input you may have.
Consider writing a small Application that talks to gmail using IMAP. This should allow you to get the events that the mail has arrived and later when it is read.
Then combine that with a sound playing loop.
Note: I have not tried and do not know how fast the events are supplied after the action is taken.
You might find that one of the mozilla thunderbird plugins does what you want:
eg:
https://addons.mozilla.org/en-US/thunderbird/addon/mailbox-alert/?src=search
https://addons.mozilla.org/en-US/thunderbird/addon/tonequilla/?src=search
https://addons.mozilla.org/en-US/thunderbird/addon/soundplus/?src=search
For instance the mailbox-alert plugin allows you to execute any command you like when an email arrives.
Or, you might write your own extension
Basically i am trying to create a websocket based live chat for a few websites i work on.
the server i have up and working no bother running on the javax.websocket package on a glassfish server.
the standard HTML5 websocket interface i also have working no bother.
the problem is that about 10-20% or our users dont use an HTML5 compatible browser so i need a fallback. Do far the best option i can find seems to be running a swf as a middle man between the websocket server and HTML. The problem there being that action script doesnt support websockets as standard so im having to write my own wrapper.
So far i can connect to the server and perform a successful handshake, i can also receive messages from the server with no issues, the problem is sending messages.
I have had a look through https://www.rfc-editor.org/rfc/rfc6455#section-5.2 at the theory of the data frame for a websocket package and written an attempt at this, i have also looked through various other open source library's without any luck. What happens is whenever i send a message to the server i get a response of
RSV bit(s) incorrectly set.
and then the connection closes (as it should with the websocket protocol).
A large part of the problem i suspect is that this is the first time i have ever even looked at action script never mind attempted using it.
i was just wondering if anyone else had been having this problem/response and preferably has found a solution
in an idea world im looking for a tutorial that i could use to actually understand the creation of the frame better but i cant seem to find one :P
thanks
Matt
As it turns out it was just one of those bizarre bugs that happened for basically no reaseon, i ended up re-writing the section of code that manages the creation of websocket frames and frame fragmentation and it just worked.
ive had a few programmers look the the two examples of code including an action script developer and none of them can work out why the one snippet works and the other doesnt.
On the upside going back over the process has given me a better understanding of the protocol. If there is anyone else that has been having a similar problem feel free to get in touch and i will see if i can help you out.
I want to use a program written in a high level language like Java or Python to talk to a GSM Modem.
I want to be able to tell the modem what number to call and when to call it. I also want to be able to read and send text messages.
I do NOT need to handle voice transmission in either direction of the call.
I'd appreciate recommendations of any applicable libraries and specific modems that are good to start with? I like Java but am willing to try something else.
Thanks
There are a set of relatively standard "AT" commands that can be used for these types of operations - including placing phone calls and sending text messages. Some details around this are at http://www.smssolutions.net/tutorials/gsm/sendsmsat/ and http://www.dreamfabric.com/sms/ (simply first results of a little online searching).
A little more online searching yielded a Java-specific example at http://www.java-samples.com/showtutorial.php?tutorialid=22 .
I had done a little bit of this in Java a number of years back, using the Java Communications API - available at http://www.oracle.com/technetwork/java/index-jsp-141752.html . (My purpose was for interfacing with the phone book on my phone, but this also should have worked with interfacing with the SMS system.)
Almost all modems and (phones which support tethering to your PC) can do this. All modems are equally good at it.There are no starter's modems. Just go through the AT commands specific to your applications and thats it.