This repository has been archived by the owner on Feb 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wedefend.py
81 lines (69 loc) · 2.82 KB
/
wedefend.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import os
import base64
import hashlib
from Crypto import Random
from Crypto.Cipher import AES
#if you see this comment, that's mean I haven't finish yet this project
#by github.com/wishihab
#this python code made for linux user with love
print("Welcome to WeDefend by wishihab")
print("1. Network Activity")
print("2. Process Activity")
print("3. Scan File")
print("4. Folder Lock, Encryption")
fr = int(input("Please choose a number : "))
if fr ==1:
print("1. Listing TCP and UDP connections")
print("2. Listing TCP connections")
print("3. Listing UDP connections")
print("4. Listing TCP and UDP LISTENing connection")
print("5. Listing TCP LISTENing connection")
print("6. Listing UDP LISTENing connection")
chs = int(input("NetworkAct: input a number : "))
if chs == 1: os.system("clear") os.system("netstat -atu | awk {'print $1 " => " $4 " => " $5'}") if chs == 2: os.system("clear") os.system("netstat -at | awk {'print $1 " => " $4 " => " $5'}")
if chs == 3: os.system("clear") os.system("netstat -au | awk {'print $1 " => " $4 " => " $5'}") if chs == 4: os.system("clear") os.system("netstat -ltu | awk {'print $1 " => " $4 " => " $5'}")
if chs == 5: os.system("clear") os.system("netstat -lt | awk {'print $1 " => " $4 " => " $5'}") if chs == 6: os.system("clear") os.system("netstat -lu | awk {'print $1 " => " $4 " => " $5'}")
if chs >= 7: print("-==========OOVVEERR NNUUMMBBEERR============-")
if fr == 2:
print("1. Get list all application background")
prs = int(input("ProcessAct: input a number : "))
if prs == 1: os.system("ps -A")
print("--=====How to kill? usage:pkill -u UID========--")
if prs >= 2: print("---======= OOOVVVEEERRR ======---")
if fr == 3:
print("Usage: scan namefile.ex")
scn = raw_input("Usage here : ")
if scn != null || scn != none:
#do something here
#read usage, check there is "scan" and "namefile.ex"
#do next if correct, do repeat if notcorrect
#scanning process by reading bytes and md5
#if founded do this
fnd = true;
#if notfound do this
fnd = false;
#result here
if fnd == true: print("-=Virus Detected=-")
if fnd == false: print("-=No Virus Detected")
if fr == 4:
print("1. Lock Windows or Linux Folder (Usage: lock )")
print("2. Encrypt and Decrypt File")
tls = int(input("input here : ")
if tls == 1:
print("Usage: lock /pathfolder/")
#declare variable for pathfolder $varfolder
lck = raw_input("Usage: ")
if lck =='lock get$varfolder'
#linux do locking here
#notify encryption
if tls == 2:
print("Usage: encrypt /pathfile/ or decrypt /pathfile/")
#declare variable for pathfile $varfile
enc = raw_input("Usage: ")
if enc =='encrypt get$varfile'
#do encrypting using aes pycrypt
#notify if encrypting success
if enc =='decrypt get$varfile'
#ask password/privatekey if exist
#do decryption using aes pycrypt
#notify if decryption success