Tag: system

C#

Execute system command in C#

Execute system commands in C# using Process and ProcessStartInfo classes. Code void ExecuteCommand(String command) { Process process = new Process(); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.WindowStyle = ProcessWindowStyle.Hidden; startInfo.FileName = "cmd.exe"; startInfo.Arguments = "/C " + command; process.StartInfo = startInfo; process.Start(); process.BeginOutputReadLine(); process.WaitForExit(); }void ExecuteCommand(String command) { Process process = new Process(); ProcessStartInfo startInfo = …

Microsoft Windows

Monitor the changes made to OS by the installation of new software

Attack Surface Analyzer takes a snapshot of your system state before and after the installation of product(s) and displays the changes to a number of key elements of the Windows attack surface. Allows: – Developers to view changes in the attack surface resulting from the introduction of their code on to the Windows platform – …

Python

Traceroute system call in python

#!/usr/bin/env python   from subprocess import Popen, PIPE import sys   def tracer(host=None): p = Popen([’traceroute’, host], stdout=PIPE)   while True: try: line = p.stdout.readline() if not line: break print (line.rstrip()) except: break   def main(argv=None): tracer(sys.argv[1])   if __name__ == "__main__": sys.exit(main())#!/usr/bin/env python from subprocess import Popen, PIPE import sys def tracer(host=None): p = …

IDS/IPS, Security, Ubuntu

Install Snort IDS on Ubuntu

SnortĀ® is an open source network intrusion prevention and detection system (IDS/IPS) developed by Sourcefire. Snort Home Page Installation We need Apache, Mysql and PHP. Read this post for instructions on how to install LAMP. Create Snort database Connect to mysql server: mysql -u root -pmysql -u root -p Execute CREATE DATABASE snort;create database snort; …

Microsoft Windows, Windows 7

Delete System Service in Windows 7

Before you delete any service you have to know its real name, not the displayed one. 1. Open services by executing: services.msc 2. Locate your desired service for deletion 3. Right click on it and select Properties 4. On Tab General, there is a field called Service Name. That’s the name that you will provide …