Tag: service

C#

Start or Stop Windows Service with c#

Start a service Boolean StartService(String name) { try { System.ServiceProcess.ServiceController service = new System.ServiceProcess.ServiceController(); service.ServiceName = name; service.Start(); return true; } catch { return false; } }Boolean StartService(String name) { try { System.ServiceProcess.ServiceController service = new System.ServiceProcess.ServiceController(); service.ServiceName = name; service.Start(); return true; } catch { return false; } } Stop a service Boolean StopService(String …

Metasploit, Phishing

Let’s go Phishing

Phishing is an attempt to steal sensitive information by impersonating a well known organization or website. In the same manner you can trick a user to steal her MySQL credentials. One of the abilities of Metasploit is this, mimic known services and capture user credentials. Among the various capture modules there is a module called …

DoS, Metasploit

Denial Of Service attacks with Metasploit

A denial-of-service attack (DoS) is an attempt to make a machine or network resource unavailable to its intended users. Apache HTTP Server Apache httpd has been the most popular web server on the Internet since April 1996. It consists of thousand of lines of code and a vast variety of modules and extensions. Therefore, vulnerabilities …

Microsoft Windows Server 2003, Microsoft Windows Server 2008, Windows 7

Check Status of Windows Service

To check if a local or a remote Windows service is running or not, create a batch file, name it for ex. check_service.bat and paste the following code: @echo off sc \localhost query Apache2.2 > service_status.txt Find /i "RUNNING" service_status.txt >> service_status.txt IF %errorlevel% == 0 ( echo service is running ) ELSE ( echo …

Microsoft Windows

Start or Stop Windows Service using batch file

Start Windows Service Open notepad and create a new file named for ex start_my_service.bat. Paste in file the following lines: @echo off echo "starting my_service" net start "my_service" echo "done" @echo on   pause@echo off echo "starting my_service" net start "my_service" echo "done" @echo on pause Save the file, right click on it and select …

PHP

How To Write A Simple PHP Web Service

Web Services are Everywhere! Let’s see how easy it is to create one using PHP, MySQL and XML! First of all create a mysql database named notes. Add a table named notes too: CREATE TABLE IF NOT EXISTS `notes` ( `ID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `Title` VARCHAR(50) COLLATE utf8_unicode_ci NOT NULL, `Note` VARCHAR(500) COLLATE …

Cross-Platform, Java

Creating a simple Web Service in Java

Create a web service application project in Netbeans. Create a class named Customers. In this class we will declare the methods that our service will provide to clients. 1 2 3 4 5 6 7 8 9 10 11 12 13 import javax.jws.WebMethod; import javax.jws.WebService;   @WebService public class Customers {   public Customers(){}   …

Linux, proFTPD, Servers/Services

Hide ProFTPD version from hachers

Lets edit proftpd.conf 1. Keep a backup first of /etc/proftpd.conf file 2. sudo nano /etc/proftpd.conf To hide proftpd version we add a line above ServerName ServerIdent Off We can also change proftpd service name for the outside world: ServerName “MyFTPServer” or put something else 3. Restart proftpd service sudo /etc/init.d/proftpd restart