How to write a secure application in python? [closed] - python

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Say you write a python application that interacts with a webserver. The application secures your traffic with public-private key encryption (e.g. RSA). How can you prevent someone to read the program in a normal text editor and extract your private key?

Usually user applications that interact with a webserver have 2 methods for authentication.
1-Session authentication: you need to login to the webserver for the server to give you access to the pages or information you need.
2-Token authentication: The server can generate a token that the user can send with the requests.
On the other hand if its an application that only you are going to use you can set the private keys in the environment variables of your operating system and then fetch them using python.
API_SECRET = os.environ.get("SECRET_KEY")

Related

Session Sharing Between Two different Web Applications [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 months ago.
Improve this question
can i share session between different lang applications like:
1st is based on C# and
2nd is based on python, so can i somehow share session?
if yes can someone please tell me how?
You need to have a common means of storing and sharing the data.
This can be your DB or better a shared cache like Redis.
Session data can be stored with a session id as a Key.
Then you can store this Key as a Cookie value to the client which will be passed on every request.
One of the most standardized ways of storing this information into the client is JWT
JWT can be read by almost all kind of server apps.

Web development for smart switches IoT [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have many jinvoo light switches in my house. I control them from the app in my cell or using alexa echo gen 3 and everything works perfect.
Now I am trying to create a local web page that allows me to know the status and to interact with the switches.
I have been looking an api and found nothing. I also thought about creating an Alexa skill to interact with my page or to use and arduino ESP8266.
Any suggestion will be appreciated.
If you know how to control them from a skill, you can create custom tasks for different operations within a skill, then trigger them using Quick Links for Alexa.
Custom tasks: https://developer.amazon.com/en-US/docs/alexa/custom-skills/implement-custom-tasks-in-your-skill.html
Link to custom tasks from a web page: https://developer.amazon.com/en-US/docs/alexa/custom-skills/create-a-quick-link-for-your-custom-task.html#

it is possible to use python code to create automatically a gmail account? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want to develop a program that can create automatically a gmail account with the use of python.
Is it possible?
If you're looking for a disposable email address, look for such a service with a public API (eg. temp mail). Then use http.client or Python Requests to interact with that API.
If your goal is to create spam or ghost accounts - don't. These services are aimed at quality assurance, ie. testing email services.

chat web app that allows sending messages [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am learning Flask and I want to practice by making simple web app.
I want to make a chat web app that allows sending messages between two or more web browsers in Flask but I am not sure where to start or go about building this application. This question is pretty broad but what I want to know is how to structure this application. What are the pieces I need to build this application.
very broad question, but I'd recommend starting here with web sockets http://blog.miguelgrinberg.com/post/easy-websockets-with-flask-and-gevent . Then you can have two member subscribe to a channel and make messages to each other.

How can I create a client side database [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
How can I create a client side database to store information of users on client side. Does anybody know of any tutorials or pointers? Which is the recommended database to use? My client is in .js and uses Django framework.
What you are asking for is called Web Storage and is part of HTML5.
http://diveintohtml5.info/storage.html
http://www.gwtproject.org/doc/latest/DevGuideHtml5Storage.html
However, many times when people SAY they need a client-side database, I ask them the details and it turns out that they don't really need client side storage at all, so proceed with caution.

Categories

Resources