mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 02:32:57 +00:00
update
This commit is contained in:
@@ -10,7 +10,7 @@ import random
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
class FormTester:
|
||||
def __init__(self, base_url="http://192.168.2.38"):
|
||||
def __init__(self, base_url="http://192.168.2.36"):
|
||||
self.base_url = base_url
|
||||
self.session = requests.Session()
|
||||
self.session.headers.update({
|
||||
@@ -89,15 +89,14 @@ class FormTester:
|
||||
return {
|
||||
'nazev': company_name,
|
||||
'mesto': city,
|
||||
'datum_zalozeni': founding_date,
|
||||
'odeslat': 'Uložit do databáze'
|
||||
'datum_zalozeni': founding_date
|
||||
}
|
||||
|
||||
def submit_form(self, form_data):
|
||||
"""Submit the form with provided data"""
|
||||
try:
|
||||
response = self.session.post(
|
||||
f"{self.base_url}/zapisfirem.php",
|
||||
f"{self.base_url}/firmy_vloz.php",
|
||||
data=form_data,
|
||||
timeout=30
|
||||
)
|
||||
@@ -128,7 +127,7 @@ class FormTester:
|
||||
def run_test(self, interval_seconds=20, max_iterations=None):
|
||||
"""Run the form testing loop"""
|
||||
print(f"🧪 Starting form testing...")
|
||||
print(f"📡 Target: {self.base_url}/zapisfirem.php")
|
||||
print(f"📡 Target: {self.base_url}/firmy_vloz.php")
|
||||
print(f"⏰ Interval: {interval_seconds} seconds")
|
||||
print(f"🔄 Max iterations: {'Unlimited' if max_iterations is None else max_iterations}")
|
||||
print("=" * 60)
|
||||
@@ -175,7 +174,7 @@ def main():
|
||||
tester = FormTester()
|
||||
|
||||
# Run with 0.5-second interval for faster testing (you can change this)
|
||||
tester.run_test(interval_seconds=0.001)
|
||||
tester.run_test(interval_seconds=0.0001)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user