# \[Pentesting\]\[Math\] Bruteforce passwords using cartesian product

DevFeed: [\[Pentesting\]\[Math\] Bruteforce passwords using cartesian product](<https://devfeed.tech/articles/pentesting-math-bruteforce-passwords-using-cartesian-product-20556.md>)

Original publisher: [Read original article](<https://yurichev.com/blog/cartesian/>)

Published: 2025-12-17T23:00:00Z

Content type: tutorial

Language: en

Sources: [Dennis Yurichev](<https://devfeed.tech/sources/dennis-yurichev.md>)

Topics: [math](<https://devfeed.tech/topics/math.md>), [passwords](<https://devfeed.tech/topics/passwords.md>), [Python](<https://devfeed.tech/topics/python.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [examples](<https://devfeed.tech/tags/examples.md>), [passwords](<https://devfeed.tech/tags/passwords.md>), [python](<https://devfeed.tech/tags/python.md>)

## AI overview

This tutorial explains how Python's itertools.product can enumerate password combinations by forming Cartesian products over character sets. It also notes that generating all username-and-password combinations is a Cartesian product of those sets.

## Source excerpt

[Pentesting][Math] Bruteforce passwords using cartesian product