I am trying to add some security to my computer at home and would like to have a copy of all Yahoo! IMs sent to me. I am using Python 2.6 on Windows.
I would also like to have every URL in Internet Explorer sent to me.
Wireshark has custom filters for chat protocols like yahoo or to filter for all HTTP traffic. I don't know why you would want to filter only IE, its not the most common browser but you could probably filter by user agent. Wireshark can be invoked on the commandline and you can tap into these pre-built filters. You should use python's subprocess module to execute Wireshark.
Related
Ok, no code here, more trying to get some directions.
I'm working on my home automation using tuya objects. Till now I was able to create a websocket (using python websockets and asyncio) that gets a message and turn on my devices. I created a flask website to configure passwords, keys etc. Now what I'm trying to achieve is using a NFC tag(scanned by my phone) call the websocket sending a message. I bought some NFC tags, got a an android app called NFC Tools to record data into the NFC tag.
Problem is NFC tools doesnt give me too many options I can add text, and URLs but I dont know how to call my websocket from there. Can I call it using its URL like ws://something.go? Can I make the phone not open a browser when I scam the tag? Should I create a page on flask for that and put the page address?
Anyway, I'm kind of lost. Can you guys point me in the right direction?
The right direction is to write your own NFC app for your phone.
In OS has a basic limited (fallback) idea of how to process the different type of Ndef record types, but it mostly relies on App's registering that they are capable for processing a certain record type.
So the OS can process various URL formats and open a web browser BUT ws: is not a standard URI as defined by the Ndef specs.
Thus the OS has nothing to processes it with.
To solve this you would best to make up your own mimeType string and create an App that registers that it can process this mimeType (Android docs on this, iOS has something similar). Then when you scan your custom Tag and the OS know what App can process this Tag, you app then reads the data and processes it accordingly and open the websocket request itself.
End up creating a get route on flask and using NFC Tools Pro with http get to access it. The route just send a message to my websocket and turn on or off my devices. Thx Andrew for the tip I will have that in mind if this goes anywhere far from a personal project.
I have an unlimited internet connection in my house and a limited internet connection in the school.
I want to make a web browser (or something like that) that navigate from my house, get the data (including the streamings), and resends it to my browser in the school.
In Python, using WebKit, a web browser can be created easily and navigate youtube and other pages, I want to recreate that navigation in the other web browser (the one connected in my school).
School browser ⟶ send request to program or another Web browser ⟶ get page data (including streaming) ⟶ tunneling ⟶ sent to school browser.
It’s something like to do a remote web browser.
It sounds like you are trying to make a home private proxy server.
There are plenty of guides on how to do this but here's one I found by quickly looking around:
https://null-byte.wonderhowto.com/how-to/sploit-make-proxy-server-python-0161232/
Depending on your school's restriction method, a proxy server may not be enough to bypass their restrictions. You may also be able to overcome this by completely encrypting communications between your home network and your school system. To do this you would need to set up a home virtual private network (VPN). There are also many guides that you can use to achieve this.
I am trying to make a "proxy" in Python that allows the user to route all of their web traffic through a host machine (this is mainly for me and a couple people I know to confuse/avoid hackers and/or spies, who would only see web pages and so on coming in through one IP). I have run into several difficulties. The first is that I would like to be able to use the final, compiled product with Firefox, which can be set to route all of its traffic through an installed proxy program. I don't know what kind of configuration my proxy needs to have to do this. Second, the way the proxy works is by using urllib.requests.urlretrieve (yes, going to die soon, but I like it) to download a webpage onto the host computer (it's inefficient and slow, but it's only going to be used for a max of 7-10 clients) and then sending the file to the client. However, this results in things like missing pictures or broken submission forms. What should I be using to get the webpages right (I want things like SSL and video streaming to work as well as pictures and whatnot).
(wince) this sounds like "security through obscurity", and a lot of unnecessary work.
Just set up an ssh tunnel and proxy your web traffic through that.
See http://www.linuxjournal.com/content/use-ssh-create-http-proxy
I am working on trying to send XML data to a .NET web service, from an Asterisk Linux box, using Python.
The problems I am running into are:
-- if I use HTTPlib, I can send the XML data; but, the not authenticate first.
-- if I use HTTPlib2, I can authenticate; but, I can't get it to send the data.
In the end, I just need to periodically send data to a client's web service. On my end, I'm not concerned with the response, just sending the data.
Any thoughts on this? Maybe I'm pursuing the wrong path using HTTPlib? Thanks for any assistance at all. I'm not opposed to using a different language; Python just seemed the simplest when this project started.
A very popular module for this is
http://docs.python-requests.org/en/latest/
works great for me for all sorts of requests with and without authentication.
I've written a Python application that makes web requests using the urllib2 library after which it scrapes the data. I could deploy this as a web application which means all urllib2 requests go through my web-server. This leads to the danger of the server's IP being banned due to the high number of web requests for many users. The other option is to create an desktop application which I don't want to do. Is there any way I could deploy my application so that I can get my web-requests through the client side. One way was to use Jython to create an applet but I've read that Java applets can only make web-requests to the server it is deployed on and the only way to to circumvent this is to create a server side proxy which leads us back to the problem of the server's ip getting banned.
This might sounds sound like and impossible situation and I'll probably end up creating a desktop application but I thought I'd ask if anyone knew of an alternate solution.
Thanks.
You can use a signed Java applet, they can use the Java security mechanism to enable access to any site.
This tutorial explains exactly what you have to do: http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html
The same might be possible from a Flash applet. Javascript is also restricted to the published site and doesn't allow being signed or security exceptions like this, AFAIK.
You probably can use AJAX requests made from JavaScript that is a part of client-side.
Use server → client communication to give commands and necessary data to make a request
…and use AJAX communication from client to 3rd party server then.
This depends on the form of "scraping" you intend to do:
You might run into problems running an AJAX call to a third-party site. Please see Screen scraping through AJAX and javascript.
An alternative would be to do it server-side, but to cache the results so that you don't hit the third-party server unnecessarily.
Check out diggstripper on google code.