When using python dnslib.server example and trying make queries from bind9 server python dns server get these error's:
Mar 5 20:07:23 mx1 named[1868]: success resolving '85.31.199.1.domain.example/A' (in 'domain.example'?) after disabling EDNS
Mar 5 20:41:29 mx1 named[1868]: success resolving '141.36.123.190.domain.example/A' (in 'domain.example'?) after reducing the advertised EDNS UDP packet size to 512 octets
Any hint or solution how this can solve with python dnslib.server library ?
EDNS is a specific feature of DNS nameservers, albeit not a new one. But it needs specific support (code to handle it).
What you see is that bind9 as a client detects that the server it speaks too lacks EDNS support and hence fallback to some previous sane setup.
The changelog of your library has this:
0.7 2012-10-20 Add initial EDNS0 support (untested)
and nothing after, so it does not look good.
The code source shows two promising classes:
EDNS0
EDNSOption
It seems to be used when parsing the record in RR.parse that the server uses, but it may be working or not, we can not judge since you do not show your code and how it uses the library.
So, in short, either the library has a problem and its EDNS code will need to be improved or there is some problem in your program using it.
The related question is why you use this library, is it just to experiment/learn or to really build a product on top of it? In the last case, depending on what you are doing, lack of EDNS support may create you problems (for example for DNSSEC).
Related
I'm updating a code (originally written in python 2.7) to be compatible with both python 2.7 and python 3. The code used the package Pyro(3) which doesn't seem to be compatible with python 3, so I've tried to use Pyro4 instead. Although using Pyro4 has helped solve some of the problems I was having it doesn't seem have the Event Server (subscribe) feature that was in Pyro (unless I'm missing something obvious??).
Has it been renamed to something else in Pyro4, or is there another way that I can use subscriber in Pyro4? If not is there another package that anyone can recommend that can be used instead?
Thanks for your help!!
You're right, Pyro4 doesn't provide an event service as standard part of the library.
Now, the event service in Pyro3 was very basic. It should be easy to rebuilt it yourself on Pyro4, it should be a few dozen lines of code at most. But I suggest to also have a look at the 'messagebus' example that comes with Pyro4 already.
That's all I can say really, because you didn't tell us any specific details about what the requiremens on your communication layer in your application are (other than that it used to use Pyro3)
Currently, i want to implement a trading system for steam games (with python).
So, i searched github, but sadly, there are only
https://github.com/Jessecar96/SteamBot
https://github.com/Jessecar96/SteamKit2
Yeah, they works good. But they are C# -- don't tell me python can't do this :).
So, i want to start with the steamkit part. I thought it's not difficult(maybe just some web-apis), but when i kinda review the code of SteamKit2, i find it seems use TcpConnection to Steam Network, don't know how they get the protocol.
Does anyone has any idea about this, i think about use python load steamkit2.dll, but im really noob with C#
You don't want to use the SteamKit2 port on that repository. It is a branch (and an out dated one at that) of the official SteamKit2 repository. It also looks like they are attempting to get rid of the branch based on this issue discussion.
To answer your question, there is a port of SteamKit to Python. It is called PySteamKit and is written by one of the contributors to SteamKit2.
Unfortunately, there doesn't seem to be much documentation in the Wiki of either the official SteamKit or the Python port on how to use the package. You may have to look at the Samples provided by SteamKit which are in C#.
I'm looking to see if there is a way to connect or disconnect to a wireless network in python, preferably a way that would work for both public and secured networks if I supplied the password. If I can configure the options about wireless, that would be an added bonus (ex. see all networks in range, see information about networks in range (like encryption type)). I run a windows computer, so I see many answers to this question in Linux, or other operating systems, but none in windows. Thanks in advance.
You'll probably have to use one of the DLLs in windows for that. Using ctypes you can get access to the win32 API from Python.
It looks like the functions from wlanapi.dll, starting with WlanOpenHandle and WlanEnumInterfaces might do what you want.
Edit: For example code, see the accepted answer to this.
I have a Digi ConnectPort X4 here and I am going to run a simple web server on it to serve the information from the ZigBee network that is attached.
The HTTPBaseServer and subclasses are pure Python classes, but I also want to have some kind of database running on the device. As I don't need to have complex functionality, I thought I would try to get PySQLite running on this embedded box.
However, as it turns out, I cannot use GCC on this box, so is there any other possibiliy to get some kind of database functionality on this box? Or did I miss a possibility to get that SQLite adapter on this box?
Someone must have had a compiler to make Python. A compiler is required to get (py)sqlite working.
You may be able to use the db/anydbm module instead which will use a flavour of dbm or a pure Python alternative. This won't give you a SQL database, but will give you a key value store which is likely good enough for your needs.
I am in the same situation as you. You can make yourself a pseudo DB with some tuples, or in my case some dictionarys. Something like that:
pseudoDB={}
pseudoDB[1]={'id':1, 'zb-dev-object':ZB_object, 'power':power_value} #and so on
I am trying to generate a large graph visualization using Ubigraph and its xml-rpc interface. However Ubigraph's xmlRPC server is not fast enough to handle the call rate generated by my python code, and freezes. I have tried all the performance tips listed on the website to no avail. The direct wrapper is not available in the free version of Ubigraph, hence my question: are there any Free (as in speech) alternatives to Ubigraph?
I think that you may be having the same problem I was. It is not that ubigraph cannot handle the xmlrpc, but that there is a problem with the 64-bit release. It kept freezing on me at completely unpredictable times (sometimes after 22 edges, sometimes after 1500 edges...).
Try the 32-bit release instead. It has been solid for me.
Have you had a look at graphviz? Does this have to be a service, or could you just run it locally?