Skip to main content

No project description provided

Project description

TP-Generator

Installation

From PyPI:

pip install TP-Generator

From Source:

git clone https://github.com/truocphan/TP-Generator.git --branch <Branch/Tag>
cd TP-Generator
python setup.py build
python setup.py install

Basic Usage

Generating testcases for the Sniper attack

from TP_Generator import AttackTypes

InjectionPoints = [
	"RequestBody||id",
	"RequestBody||name"
]

Payloads = [
	[
		"' AND '1'='1",
		"' AND '1'='0"
	]
]

for testcases in AttackTypes.Sniper(InjectionPoints, Payloads):
	print(testcases)

# OUTPUT:
# {'RequestBody||id': "' AND '1'='1"}
# {'RequestBody||id': "' AND '1'='0"}
# {'RequestBody||name': "' AND '1'='1"}
# {'RequestBody||name': "' AND '1'='0"}

Generating testcases for the Batteringram attack

from TP_Generator import AttackTypes

InjectionPoints = [
	"RequestBody||id",
	"RequestBody||name"
]

Payloads = [
	[
		"' AND '1'='1",
		"' AND '1'='0"
	]
]

for testcases in AttackTypes.Batteringram(InjectionPoints, Payloads):
	print(testcases)

# OUTPUT:
# {'RequestBody||id': "' AND '1'='1", 'RequestBody||name': "' AND '1'='1"}
# {'RequestBody||id': "' AND '1'='0", 'RequestBody||name': "' AND '1'='0"}

Generating testcases for the Pitchfork attack

from TP_Generator import AttackTypes

InjectionPoints = [
	"RequestBody||id",
	"RequestBody||name"
]

Payloads = [
	[
		"' AND '1'='1",
		"' AND '1'='0"
	],
	[
		"' OR '1'='1",
		"' OR '1'='0"
	]
]

for testcases in AttackTypes.Pitchfork(InjectionPoints, Payloads):
	print(testcases)

# OUTPUT:
# {'RequestBody||id': "' AND '1'='1", 'RequestBody||name': "' OR '1'='1"}
# {'RequestBody||id': "' AND '1'='0", 'RequestBody||name': "' OR '1'='0"}

Generating testcases for the Clusterbomb attack

from TP_Generator import AttackTypes

InjectionPoints = [
	"RequestBody||id",
	"RequestBody||name"
]

Payloads = [
	[
		"' AND '1'='1",
		"' AND '1'='0",
		"' && '1'='1"
	],
	[
		"' OR '1'='1",
		"' OR '1'='0",
	]
]

for testcases in AttackTypes.Clusterbomb(InjectionPoints, Payloads):
	print(testcases)

# OUTPUT:
# {'RequestBody||id': "' AND '1'='1", 'RequestBody||name': "' OR '1'='1"}
# {'RequestBody||id': "' AND '1'='1", 'RequestBody||name': "' OR '1'='0"}
# {'RequestBody||id': "' AND '1'='0", 'RequestBody||name': "' OR '1'='1"}
# {'RequestBody||id': "' AND '1'='0", 'RequestBody||name': "' OR '1'='0"}
# {'RequestBody||id': "' && '1'='1", 'RequestBody||name': "' OR '1'='1"}
# {'RequestBody||id': "' && '1'='1", 'RequestBody||name': "' OR '1'='0"}

Generating the TOTP, HOTP code

from TP_Generator import MFA_Generator

print(MFA_Generator.TOTP("JBSWY3DPEHPK3PXP"))
# OUTPUT: 862642

print(MFA_Generator.HOTP("JBSWY3DPEHPK3PXP", 1))
# OUTPUT: 996554

Generating the WordPress Nonce for unauthenticated users with wp-rest action

from TP_Generator import Nonce_Generator

action = "wp-rest"
NONCE_KEY = "Y9(H0]_u8BA:^or^<^4>AM@EkgnAm`{Mpsq*H!Z-?8 OHe6ITmPY6kQSai)y3w{}"
NONCE_SALT = "xV&%-Ji<,`Clp+|bqt9<c%JrGpq!EiMy///`z0+<D1F<E%H14mha9Csm<TH;~TfH"

print(Nonce_Generator.WordPress_Nonce(nonce_action=action, WORDPRESS_NONCE_KEY=NONCE_KEY, WORDPRESS_NONCE_SALT=NONCE_SALT))
# OUTPUT: ac06630f78

CHANGELOG

TP-Generator v2024.8.10

  • Updated: AttackTypes: Sniper, Batteringram, Pitchfork, Pitchfork
  • New: Nonce_Generator: Generate the WordPress Nonce

TP-Generator v2024.6.13

  • Updated: MFA_Generator: Fixed error generating TOTP, HOTP from jython

TP-Generator v2024.4.5

  • New: Bruteforcer_List: UUID1

TP-Generator v2024.3.3

  • New: MFA_Generator: TOTP (Time-based One-Time Password) and HOTP (HMAC-based One-Time Password)

TP-Generator v2024.3.1

  • New: Generate test cases for attack types: Sniper, Battering Ram, Pitchfork, Cluster Bomb

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TP_Generator-2024.8.10.tar.gz (5.5 kB view details)

Uploaded Source

Built Distributions

TP_Generator-2024.8.10-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

TP_Generator-2024.8.10-py2-none-any.whl (6.4 kB view details)

Uploaded Python 2

File details

Details for the file TP_Generator-2024.8.10.tar.gz.

File metadata

  • Download URL: TP_Generator-2024.8.10.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.10

File hashes

Hashes for TP_Generator-2024.8.10.tar.gz
Algorithm Hash digest
SHA256 61ea30dbf6e80527153388f4f5cf36eceff48c5baede0e5a945c5d69ff1474a7
MD5 b9080eacd4dec070b419882d859a3126
BLAKE2b-256 54b6ddcd14b0ea520861fc683e0d93edda651e35b672ae4f7a57de890dd0e67f

See more details on using hashes here.

File details

Details for the file TP_Generator-2024.8.10-py3-none-any.whl.

File metadata

File hashes

Hashes for TP_Generator-2024.8.10-py3-none-any.whl
Algorithm Hash digest
SHA256 98fec8cf6e99a2cf47b04168e2d37b239f76b1c523e58b514b5fd841c4533b9c
MD5 e101fb22ef2dbbe0b880079e92090f09
BLAKE2b-256 2be6ae8501adb3547685f6e5c74dfa952a61582d60925e2df136c79da9e18b93

See more details on using hashes here.

File details

Details for the file TP_Generator-2024.8.10-py2-none-any.whl.

File metadata

File hashes

Hashes for TP_Generator-2024.8.10-py2-none-any.whl
Algorithm Hash digest
SHA256 4858173bda4cc4deb1a79ef9fae441f82b2ccfd48e62b9a141dc54ed0d074dd8
MD5 3b0dd9d23f8e0d5d8068329b40e4e5bc
BLAKE2b-256 a7c333077a4a5eb59b9d520681e96c1020f8a4de3844c8e92bd4459601dfad0b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page