Monday, February 6, 2017

I was looking for an answer, I come up reading this...oh I love it!!! well but bcz I'm not nothing but a candidate to a newbie, i don't know this 2 python version (haaaave their own library??) second...so, let me guess...you monkey path because your "peer" more than 2 proxies...what i should call this? the request calls first "darling" then "sweetheart" and finally "babe" , and the server RESPONSE is "oh I like the babe request"???

How do I get the IP address from a http request using the requests library?


I am making HTTP requests using the requests library in python, but I need the ip address from the server that responded the http request and I'm trying to avoid to make two calls (and possibly having a different ip address from the one that responded the request.
Is that possible? Does any python http library allows me to do that?
ps: I also need to make HTTPS requests and to use an authenticated proxy.  ( 😃😃😃😃😁😁 )

Hello guys ;) Imagine that you have a file that controls the ip restrictions of any easy to find mirror cloud Ip address trying to access your system(even those that work on an ambigouse way, like using others to hidden their own) , it seems that no wrapper yet does that , to indangerouse the "system" ..however I found out this question, that it looks its gonna help me, remote control the postgreSQL that i want so much!

How do I find the path to pg_hba.conf from the shell?



pg_config is for compliation information, to help extensions and client programs compile and link against PostgreSQL. It knows nothing about the active PostgreSQL instance(s) on the machine, only the binaries.
pg_hba.conf can appear in many other places depending on how Pg was installed. The standard location is pg_hba.conf within the data_directory of the database (which could be in /home/var/lib/pgsql/var/lib/postgresql/[version]//opt/postgres/, etc etc etc) but users and packagers can put it wherever they like. Unfortunately.
The only valid ways find pg_hba.conf is to ask a running PostgreSQL instance where it's pg_hba.conf is, or ask the sysadmin where it is. You can't even rely on asking where the datadir is and parsing postgresql.conf because an init script might passed a param like -c hba_file=/some/other/path when starting Pg.
What you want to do is ask PostgreSQL:
SHOW hba_file;
This command must be run on a superuser session, so for shell scripting you might write something like:
psql -t -P format=unaligned -c 'show hba_file';
and set the environment variables PGUSERPGDATABASE, etc to ensure that the connection is right.