Hilfe bei Spammbot

07/04/2012 22:10 Herzlos95#1
Hi Luete, habe heute mal mit hilfe von Youtube einen Spambot erstellt, den man Starten und schließen kann, jedoch nicht Pausieren.
Nun habe ich geschafft das der Bot Pausiert wird, jedoch muss ich die Taste zum Pausieren 2 mal drücken...

Könnte mir vieleicht sagen wo mein Fehler ist?

HotKeySet ("{F1}", "start" )
HotKeySet ("{ESC}", "stop" )
HotKeySet("{F2}", "pause")

$text = InputBox ( "Spambot", "Was willst du spammen?")
MsgBox (0, "Funktionen","Bitte Chatfenster wählen und..." & @CRLF & "F1 = Bot starten" & @CRLF & "ESC = Bot beenden!" & @CRLF & "2xF2 = Pause!" )

Global $Paused

While 1
sleep ( 100 )
WEnd

func start ()
while 1
send ($text)
send ( "{Enter}" )
sleep ( 100 )
WEnd
EndFunc

func stop ()
Exit
EndFunc

Func pause ()
$Paused = NOT $Paused
While $Paused
sleep(0)
WEnd
EndFunc

Freue mich über jede antwort.

MfG Herzlos95
07/05/2012 00:07 Dr.Toni-old#2
Benutz das nächste mal bitte [!code] [/!code] für den Source ( ohne die "!").

Code:
HotKeySet ("{F6}","Start")
HotKeySet ("{F7}","Pause")
HotKeySet ("{F8}","Ende")

$Text = InputBox ("****************","la li lu","du di du")
$Intervall = InputBox("chill out :D","Please type in the time (in milliseconds")
MsgBox (0,"Hotkeys","F6 = Start"&@CRLF&"F7 = Pause"&@CRLF&"F8 = Ende")
Pause()

Func Start()
    While 1
        Send ($Text)
        Send ("{ENTER}")
        Sleep($Intervall)
    WEnd
EndFunc

Func Pause()
    While 1
        Sleep(10)
    WEnd
EndFunc

Func Ende()
    Exit
EndFunc
hab ihn mal ein bisschen umgebaut ;)
07/05/2012 13:58 CantShutMyMouth#3
What am i doing wrong here???

PHP Code:

GUICreate
("Spammer",280,50,100,100)
$Text GUICTRLCreateInput("",5,2,80,20)
$Intervall GUICtrlCreateInput("",191,2,80,20)
$Start GUICtrlCreateButton ("START",10,30,90,20)
$Stop GUICTRLCreateButton("PAUSE",100,30,90,20)
$Exit GUICTRLCreateButton("Exit",191,30,90,20)
GUICTRLCreateLabel("<-Text",85,2,90,20)
GUICTRLCreateLabel("Intervall->",140,2,50,20)
While 
1
   GUIsetState 
(@SW_SHOW)
   
$nMsg GUIGetMsg()
       Switch 
$nMsg
Case $Start
   Start
()
Case 
$Stop
   Pause
()
Case 
$Exit
   Ende
()
EndSwitch
WEnd

Global $Paused 

Func Start
()
    While 
1
        Send 
($Text)
        
Send ("{ENTER}")
        
Sleep($Intervall)
    
WEnd
EndFunc

Func Pause
()
    
$Paused NOT $Paused
While $Paused
sleep
(0)
WEnd
EndFunc

Func Ende
()
    Exit
 
EndFunc 

Thanks for the code you 2,but i tried to make it GUI.. but .when started it sends only 3 at 1 milisecond intervall.....do someone knows why??
07/05/2012 14:14 lolkop#4
you should never use more than one infinite loop, since each one, blocks the others...

a simple rework of your script could look like this:
Code:
Dim $run = False, $timer, $sleepTime

GUICreate("Spammer", 280, 50, 100, 100)
$Text = GUICtrlCreateInput("", 5, 2, 80, 20)
$Intervall = GUICtrlCreateInput("", 191, 2, 80, 20)
$Start = GUICtrlCreateButton("START", 10, 30, 90, 20)
$Stop = GUICtrlCreateButton("PAUSE", 100, 30, 90, 20)
$Exit = GUICtrlCreateButton("Exit", 191, 30, 90, 20)
GUICtrlCreateLabel("<-Text", 85, 2, 90, 20)
GUICtrlCreateLabel("Intervall->", 140, 2, 50, 20)
GUISetState(@SW_SHOW)

While 1
	Switch GUIGetMsg()
		Case $Start
			$run = True
			$sleepTime = GUICtrlRead($Intervall)
		Case $Stop
			$run = False
		Case $Exit
			Exit
	EndSwitch
	If $run And TimerDiff($timer)>$sleepTime Then
		Send($Text)
		Send("{ENTER}")
		$timer = TimerInit()
	EndIf
WEnd
07/05/2012 14:21 CantShutMyMouth#5
Thanks lolkop...it still sends only "3"but i modified a bit:

PHP Code:
Dim $run False$timer$sleepTime

GUICreate
("Spammer"28050100100)
$Text GUICtrlCreateInput(""528020)
$Intervall GUICtrlCreateInput(""19128020)
$Start GUICtrlCreateButton("START"10309020)
$Stop GUICtrlCreateButton("PAUSE"100309020)
$Exit GUICtrlCreateButton("Exit"191309020)
GUICtrlCreateLabel("<-Text"8529020)
GUICtrlCreateLabel("Intervall->"14025020)
GUISetState(@SW_SHOW)

While 
1
    
Switch GUIGetMsg()
        Case 
$Start
            $run 
True
            $Sender 
GUICTRLRead ($Text)
            
$sleepTime GUICtrlRead($Intervall)
        Case 
$Stop
            $run 
False
        
Case $Exit
            
Exit
    EndSwitch
    If 
$run And TimerDiff($timer)>$sleepTime Then
        Send
($Sender)
        
Send("{ENTER}")
        
$timer TimerInit()
    EndIf
WEnd