- Joined
- Sep 9, 2021
- Messages
- 9,680
- Reaction score
- 5,213
- Awards
- 32
From what I understand, it is very close to C syntax or functions.
Since Im somewhat familiar with C, and bash, that's how I look at python code.
Essentially what I am attempting to write is a real-time security monitor, that simply bans attackers upon log entry, that runs every ten seconds or by log tripwire. Normal security method is by whitelist/allowed IP addresses only. Some other security tools may exist.
So, lets say we have a big ol file of ip addresses hidden in strings, whether sudo drops, or possible attack, or real system entry.
There are also spamhaus lists that it will match against as a side function of determining who the attacker is, and goes a step further in trying to backtrack the intruder.
But lets start with basics.
fPtr = open("/root/secmon/IPDenyFile.txt","r+")
while(line<>EOF) do
fPtr.read ()
if isIPAddr(line) then print "Bad IP found: line.IPAddr\n" + fPtr.read()
fPtr.close()
So that's what I can think of off what Ive read, and what Im trying to understand. Any insight appreciated.
This is actually being done for free for a friend due to hackers targeting him.
Since Im somewhat familiar with C, and bash, that's how I look at python code.
Essentially what I am attempting to write is a real-time security monitor, that simply bans attackers upon log entry, that runs every ten seconds or by log tripwire. Normal security method is by whitelist/allowed IP addresses only. Some other security tools may exist.
So, lets say we have a big ol file of ip addresses hidden in strings, whether sudo drops, or possible attack, or real system entry.
There are also spamhaus lists that it will match against as a side function of determining who the attacker is, and goes a step further in trying to backtrack the intruder.
But lets start with basics.
fPtr = open("/root/secmon/IPDenyFile.txt","r+")
while(line<>EOF) do
fPtr.read ()
if isIPAddr(line) then print "Bad IP found: line.IPAddr\n" + fPtr.read()
fPtr.close()
So that's what I can think of off what Ive read, and what Im trying to understand. Any insight appreciated.
This is actually being done for free for a friend due to hackers targeting him.
Last edited: