Dostlar zaten pek bir şey değiştirmedim sadece mesaj sayısı ekledim (eğer mesaj sayısını boş bırakırsanız sonsuza kadar gönderiyor)
İyi kullanımlar.
Güncelleme: Delay eklenmiştir.
Python:
import sys
import asyncio
import aiohttp
import logging
from PyQt5.QtWidgets import (
QApplication, QWidget, QLabel, QLineEdit, QPushButton, QVBoxLayout, QHBoxLayout, QDialog, QTextEdit, QProgressBar, QFileDialog
)
from PyQt5.QtCore import Qt, QPropertyAnimation, QThread, pyqtSignal
from urllib.parse import urlparse
import json
logging.basicConfig(filename='spam_app.log', level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
class CustomMessageBox(QDialog):
def __init__(self, message, parent=None):
super().__init__(parent)
self.setWindowFlags(Qt.FramelessWindowHint | Qt.Dialog)
self.setAttribute(Qt.WA_TranslucentBackground)
self.setStyleSheet("""
QDialog {
background-color: #2b2b2b;
border: 2px solid #4CAF50;
border-radius: 10px;
}
QLabel {
color: #FFFFFF;
font-size: 14px;
padding: 10px;
}
QPushButton {
background-color: #4CAF50;
color: white;
border-radius: 10px;
padding: 8px 16px;
font-weight: bold;
}
QPushButton:hover {
background-color: #45A049;
}
""")
self.message_label = QLabel(message)
self.ok_button = QPushButton("Tamam")
self.ok_button.clicked.connect(self.accept)
main_layout = QVBoxLayout()
main_layout.addWidget(self.message_label)
main_layout.addWidget(self.ok_button, alignment=Qt.AlignCenter)
self.setLayout(main_layout)
self.animation = QPropertyAnimation(self, b"windowOpacity")
self.animation.setDuration(500)
self.animation.setStartValue(0)
self.animation.setEndValue(1)
self.animation.start()
def show_custom_error_message(message):
error_dialog = CustomMessageBox(message)
error_dialog.exec_()
class SpamWorker(QThread):
update_status = pyqtSignal(str)
progress_update = pyqtSignal(int)
error_signal = pyqtSignal(str)
def __init__(self, webhook_url, message, count=None, delay=0.1):
super().__init__()
self.webhook_url = webhook_url
self.message = message
self.count = count
self.delay = delay
self.running = True
self.total_count = count if count is not None else float('inf')
async def send_message(self, session, current_count):
data = {"content": self.message}
try:
async with session.post(self.webhook_url, json=data) as response:
if response.status == 204:
self.update_status.emit(f"Log: Mesaj {current_count}/{self.total_count} başarıyla gönderildi.")
else:
error_msg = f"Gönderim başarısız. Hata kodu: {response.status}"
self.update_status.emit(error_msg)
logging.error(error_msg)
except Exception as e:
error_msg = f"Mesaj gönderme hatası: {str(e)}"
self.error_signal.emit(error_msg)
logging.error(f"send_message hatası: {str(e)}")
async def spam_webhook(self):
async with aiohttp.ClientSession() as session:
current_count = 0
while self.running:
if self.count is not None and current_count >= self.count:
break
current_count += 1
await self.send_message(session, current_count)
self.progress_update.emit(current_count)
await asyncio.sleep(self.delay)
def run(self):
asyncio.run(self.spam_webhook())
def stop(self):
self.running = False
class SpamApp(QWidget):
def __init__(self):
super().__init__()
self.worker = None
self.initUI()
def initUI(self):
self.setWindowTitle('Webhook Spammer - Cheatglobal')
self.setGeometry(100, 100, 600, 500)
self.setStyleSheet("""
QWidget {
background-color: #1E1E1E;
color: #D0D0D0;
font-family: 'Segoe UI';
font-size: 14px;
}
QLineEdit {
background-color: #2C2C2C;
color: #FFFFFF;
border-radius: 10px;
padding: 10px;
border: 1px solid #4CAF50;
}
QPushButton {
background-color: #4CAF50;
color: white;
border-radius: 12px;
font-weight: bold;
padding: 10px;
min-width: 120px;
}
QPushButton:hover {
background-color: #45A049;
}
QLabel {
font-size: 16px;
font-weight: bold;
}
""")
self.webhook_label = QLabel('Webhook URL:', self)
self.webhook_input = QLineEdit(self)
self.message_label = QLabel('Mesaj:', self)
self.message_input = QLineEdit(self)
self.count_label = QLabel('Mesaj sayısı (isteğe bağlı):', self)
self.count_input = QLineEdit(self)
self.delay_label = QLabel('Spam gecikmesi (saniye, isteğe bağlı):', self)
self.delay_input = QLineEdit(self)
self.start_button = QPushButton('Spam Başlat', self)
self.start_button.clicked.connect(self.on_start_button_click)
self.stop_button = QPushButton('Spam Durdur', self)
self.stop_button.clicked.connect(self.on_stop_button_click)
self.stop_button.setDisabled(True)
self.load_button = QPushButton('Config Yükle', self)
self.load_button.clicked.connect(self.load_config)
self.save_button = QPushButton('Config Kaydet', self)
self.save_button.clicked.connect(self.save_config)
self.status_label = QLabel('Durum:', self)
self.log_area = QTextEdit(self)
self.log_area.setReadOnly(True)
self.progress_bar = QProgressBar(self)
self.progress_bar.setValue(0)
layout = QVBoxLayout()
layout.addWidget(self.webhook_label)
layout.addWidget(self.webhook_input)
layout.addWidget(self.message_label)
layout.addWidget(self.message_input)
layout.addWidget(self.count_label)
layout.addWidget(self.count_input)
layout.addWidget(self.delay_label)
layout.addWidget(self.delay_input)
button_layout = QHBoxLayout()
button_layout.addStretch()
button_layout.addWidget(self.start_button)
button_layout.addWidget(self.stop_button)
button_layout.addWidget(self.load_button)
button_layout.addWidget(self.save_button)
button_layout.addStretch()
layout.addLayout(button_layout)
layout.addWidget(self.status_label)
layout.addWidget(self.log_area)
layout.addWidget(self.progress_bar)
self.setLayout(layout)
def on_start_button_click(self):
webhook_url = self.webhook_input.text().strip()
message = self.message_input.text().strip()
count_text = self.count_input.text().strip()
delay_text = self.delay_input.text().strip()
if not self.is_valid_webhook(webhook_url) or not message or \
(count_text and not count_text.isdigit()) or \
(delay_text and not self.is_float(delay_text)):
show_custom_error_message("Tüm alanlar zorunludur. URL'nin geçerli olduğundan emin olun, sayılar için geçerli değerler girin!")
return
count = int(count_text) if count_text.isdigit() else None
delay = float(delay_text) if delay_text else 0.1
if count is not None and count <= 0:
show_custom_error_message("Mesaj sayısı 0'dan büyük olmalıdır.")
return
self.status_label.setText("Spam başlatıldı...")
self.start_button.setDisabled(True)
self.stop_button.setDisabled(False)
self.progress_bar.setMaximum(count if count is not None else 0)
self.worker = SpamWorker(webhook_url, message, count, delay)
self.worker.update_status.connect(self.update_status_label)
self.worker.progress_update.connect(self.update_progress_bar)
self.worker.error_signal.connect(self.update_error_message)
self.worker.start()
def on_stop_button_click(self):
if self.worker:
self.worker.stop()
self.status_label.setText("Spam durduruldu.")
self.start_button.setDisabled(False)
self.stop_button.setDisabled(True)
self.progress_bar.setValue(0)
def update_status_label(self, message):
self.log_area.append(message)
logging.info(message)
def update_progress_bar(self, current):
self.progress_bar.setValue(current)
def update_error_message(self, message):
show_custom_error_message(message)
def is_float(self, value):
try:
float(value)
return True
except ValueError:
return False
def is_valid_webhook(self, url):
parsed_url = urlparse(url)
return all([parsed_url.scheme, parsed_url.netloc]) and "discord" in parsed_url.netloc
def load_config(self):
options = QFileDialog.Options()
file_name, _ = QFileDialog.getOpenFileName(self, "Config Yükle", "", "JSON Dosyaları (*.json);;Tüm Dosyalar (*)", options=options)
if file_name:
with open(file_name, 'r') as f:
config = json.load(f)
self.webhook_input.setText(config.get('webhook_url', ''))
self.message_input.setText(config.get('message', ''))
self.count_input.setText(str(config.get('count', '')))
self.delay_input.setText(str(config.get('delay', '')))
def save_config(self):
options = QFileDialog.Options()
file_name, _ = QFileDialog.getSaveFileName(self, "Config Kaydet", "", "JSON Dosyaları (*.json);;Tüm Dosyalar (*)", options=options)
if file_name:
config = {
'webhook_url': self.webhook_input.text(),
'message': self.message_input.text(),
'count': int(self.count_input.text()) if self.count_input.text().isdigit() else None,
'delay': float(self.delay_input.text()) if self.delay_input.text() else 0.1
}
with open(file_name, 'w') as f:
json.dump(config, f, indent=4)
def main():
app = QApplication(sys.argv)
spam_app = SpamApp()
spam_app.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
İyi kullanımlar.
Güncelleme: Delay eklenmiştir.
Son düzenleme: