Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using System.IO;
- using Microsoft.Win32;
- using System.Diagnostics;
- namespace Computrace_Lojack_Checker
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- if (File.ReadLines(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "drivers/etc/hosts")).Any(line => line.Contains("namequery.com"))){
- button2.Enabled = false;
- button2.Text = "Your Hosts file is already patched";
- }
- }
- private string[] files = new string[]{
- @"c:\Windows\system32\rpcnet.exe",
- @"c:\Windows\system32\rpcnetp.exe",
- @"c:\Windows\system32\wceprv.exe",
- @"c:\Windows\system32\identprv.exe",
- @"c:\Windows\system32\Upgrd.exe",
- @"c:\Windows\system32\autochk.exe.bak"
- };
- private string[] kis = new string[]{
- @"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\rpcnet",
- @"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\rpcnetp"
- };
- private string[] pros = new string[]{
- "rpcnet",
- "rpcnetp",
- };
- private string[] hosts = new string[]{
- "127.0.0.1 search.namequery.com",
- "127.0.0.1 search.us.namequery.com",
- "127.0.0.1 search64.namequery.com",
- "127.0.0.1 bh.namequery.com",
- "127.0.0.1 namequery.nettrace.co.za",
- "127.0.0.1 search2.namequery.com",
- "127.0.0.1 m229.absolute.com",
- "127.0.0.1 m*.absolute.com",
- "127.0.0.1 209.53.113.223"
- };
- private void button1_Click(object sender, EventArgs e)
- {
- t.AppendText("LOOKING IN SYSTEM32...\r\n\r\n");
- foreach (string s in files)
- {
- var f = Path.GetFileName(s);
- t.AppendText(File.Exists(s) ? alert(f) : "- "+f+" does not exist.\n");
- }
- t.AppendText("\r\nLOOKING IN REGISTRY...\r\n\r\n");
- foreach(string s in kis){
- t.AppendText(Registry.LocalMachine.OpenSubKey(s) != null ? alert(s) : "- " + s + " does not exist.\n");
- }
- t.AppendText("\r\nLOOKING IN RUNNING PROCESSES...\r\n\r\n");
- foreach (string s in pros)
- {
- t.AppendText(Process.GetProcessesByName(s).Length == 1 ? alert(s) : "- " + s + " does not exist.\n");
- }
- if (t.ForeColor != Color.Red)
- {
- button1.Text = "Everything seems to be fine";
- }
- else
- {
- button1.Text = "Uh-Oh";
- }
- button1.Text = (t.ForeColor != Color.Red) ? "Everything seems to be fine" : "Uh-Oh...";
- }
- private String alert(string file)
- {
- t.ForeColor = Color.Red;
- return "- " + file + " is here : Bad news for you, seems anyone can remote control your device...";
- }
- private void button2_Click(object sender, EventArgs e)
- {
- t.AppendText("\r\nBLOCKING SERVERS IN HOSTS FILE...\r\n\r\n");
- using (StreamWriter w = File.AppendText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "drivers/etc/hosts")))
- {
- foreach (string s in hosts)
- {
- w.WriteLine(s);
- t.AppendText("- "+s+" added\n");
- }
- }
- button2.Enabled = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement