Posts

Showing posts with the label programming

Batch Files - the art of creating viruses

Image
I could just you give the  codes to paste  in notepad and  ask you to save files with extension .bat and   your deadly batch viruses would be ready. But instead of that, I have focussed on making the basics of batch files clear and developing the approach to code your own viruses. What are Batch Files ? Lets begin with a simple example , Open your command prompt and change your current directory to 'desktop' by typing 'cd desktop' without quotes. Now type these commands one by one 1. md x  //makes directory 'x' on desktop 2. cd x  // changes current directory to 'x' 3. md y // makes a directory 'y' in directory 'x' We first make a folder/directory 'x', then enter in folder  'x',then make a folder 'y' in folder 'x' . Now delete the folder 'x'. Lets do the same thing in an other way. Copy these three commands in  notepad and save file as anything.bat   Now just double...

How to send emails in large quantities with PHP script and cronjobs

I need to send a newsletter to 8000 subscribers, but my host only supports sending 100 messages per hour. I need a php script that does this job, send 8000 emails with a limit of 100 emails per hour, if possible using cronjobs for me not having to keep the browser open while the script is running You should have a database table with these columns: =============== Suscribers Table =============== |id (int)|email (varchar)|sent (tinyint) |1|example1@domain.com|0 |2|example2@domain.com|0 |3|example3@domain.com|0 Then something like this PHP script: // DB Connection require_once 'db.php'; // Check if we have users with a 0 sent value $query = mysql_query("SELECT COUNT(id) FROM suscribers WHERE sent = 0"); $results = mysql_num_rows($query); // If there's one or more suscribers with a 0 sent value if ($results >= 1) {     // Initialize and require Swift or any other email library for PHP     require_once 'swift/lib/swift_required.php';     $tra...