How do I prove to users that something is safe? - python

Sorry if this seems like some simple question to lots of people. But basically I was working on some rotation calculator for a game I play - for fun. I thought why not share it with the gaming community in reddit in the form of a .exe so everyone could use it (without have to install python and made using Pyinstaller). I understand the risk of malware .. which is my problem. Short story short it got removed with the following message:
" As pointed out in the comments, alot of players are careful about what they click on. If it's not a known download they use they will report it which in turn means it gets removed."
I know this is safe, but i have no way to prove to others it is, which is where i'm stuck. What can i do about this?

Related

What is this bounty challenge on Python

Today I opened up this link https://hackerone.com/ibb-python?type=team&view_policy=true and it says it's a bounty challenge on Python but I couldn't understand the details. What is it saying?
Bug bounty programs on HackerOne are made for cybersecurity specialists. You hack some program - vendor pays you for that. Often are many rules what you can and can't do to get the reward.
There are 2 main rules:
You don't tell anyone about the security problem you found until the vendor allows you to do that. (It can never happen)
You don't try to make any benefits on found problem except the BugBounty payout.
So this python challenge is to find vulnerabilities in python language and python standard lib modules. Honestly, I don't recommend trying to do something if you hear about BugBounty program for the first time .

What are good ways to protect yourself against damaging your system when starting to learn coding/ a new language?

As the title says. I'll give some background as to why I ask this question. I have just started learning a bit of python, and embarrassingly I have re-named all the files in the anaconda folder by running a script I had written in the wrong folder due to misinterpreting the code I was using as an example. This is incredibly frustrating as you can imagine and seems to be quite an easy mistake for a beginner to make. I was wondering if there are any techniques to prevent this sort of thing happening when you're learning, other than being more careful?
Thanks for your advice.
Christian
With low level languages like Assembly, it was much more common for beginners to make damaging mistakes but now adays, you cant do too much damage without really trying to do damage if that makes sense.
When it comes to scripts you don't entirely follow, you should look for things like
Does it modify/read a file?
Does it run any system commands like "rm -rf"
Does it have any infinite loops or anything that seems strange?
Of course this is just a very simple list, there is no actual check list for "bad stuff".
In your case, it sounds like you just got unlucky. Don't look at it as a failure, look at it as you learned what the script can do.
You can also set up a Virtual Machine to use as a "sandbox" for your applications.
One last thing, since you are starting on this journey, it is important to make backups of your code/workspace and your important computer files. This is because you might want to go back to a previous version of your code.
I prefere setting up a virtual machine while coding
"potential dangerous things"
VM's also have the advantage of making snapshots before running the code that afterwards easily can be reset (e.g. for testing things multiple times)

Condensing python code for creating tkinter widgets

I have a program that I'm designing to teach myself Python but have gotten stuck. I've run across a way to condense python code using % and a list of arguments to have it run as code and looping through the list of arguments until it's done, but can't seem to find it in the documentation or with Google, mostly because I can't figure out how to search for it (sadly it's pretty vague I know).
Mostly what I'm trying to do is prevent having to write approx. 300 lines simply for GUI buttons, labels, frames, ect. with very few changes between them.
Obviously the code is huge so it's all available at Github, github.com/kari-fox/MixxMaster. I'm looking for any kind of recommendations for condensing all of the GUI elements, mostly because I find myself copy/pasting any time I need to make minor changes to any of the similar pieces.
Thanks to Steven Summers in the comments for mentioning classes. I had no idea they were so powerful! I found this guide (https://jeffknupp.com/blog/2014/06/18/improve-your-python-python-classes-and-object-oriented-programming/) and it made understanding and implementing classes work perfectly! That helped me cut out almost 100 lines of purely window-building code and let me do a few sneaky things besides. If anyone wants to see the full implementation check out the github link in the question.

How to test a Django app

I´m quite new at python/django development and I would like to know what's the best way to test these kinds of applications. I've been doing a little research and I found libraries like magicmock or minimock but I don't really have any idea if they're good or bad or what are the best practices for Django. Can anyone give me some tips? The project I'm working on it's this one https://github.com/Smart-Studio/fbclm-backend/tree/develop , just in case someone wants to take a look a it.
Thanks!
The Official Django Tutorial touches on testing in chapter 5.
The book Test-Driven Development with Python by Harry Percival (O’Reilly) is available free online. It is a tutorial on building a Django project with complete, comprehensive testing. Be warned, it is very slow paced, sometimes frustrating. The author is dead serious about testing every little thing, and he knows his stuff. There is much to be learned from him.
Edit: Some of the remarks above are not fair. I was about a third of the way through Percival's book when I gave this answer. The author's style of teaching is not slow. The pace is comfortable. The author does lead the reader to type some code only to replace it later, but this does help to understand how the process being tested actually works. For someone who is unfamiliar with TDD, the building process can feel painfully slow. You can write several lines of testing code for every single line of application code, before even writing any of the application code. The author doesn't test "every little thing". He gives the reader guidelines to help decide what does and doesn't need to be tested, and there are several things that need to be tested if you really want good coverage.
I apologize for taking this out of the Stackoverflow context for answers. In this case, the crime had already been committed and this edit was required to fix the bug in my answer.

Online Pair Programming with Python

I'm working with a team mate solving some programming challenges online
I was wondering if there was something like piratepad but for python
Ideally it would allow us to collaborate on the same script online, see what the other is editing, chat, and also run it.
Any idea if there's something like that available for python programming? (js would also come handy)
I've found this which seems pretty great, but it doesn't seem to support multiple people working on the same code
cloud9 (https://c9.io) seems to work for that, but I never tried.
I know it is an old question but I stumbled uponit.

Categories