[Tutor] 2016-02-03 Filter STRINGS from urllib and Pass as VARAIBLE within PYTHON script

2016-02-03 Thread knnleow GOOGLE
advice on how to filter VARIABLES from output below. 01. need to strip out BEGIN_STRINGS b'{ and END_STRINGS }\n' 02. need to filter out these FIELDS FIELD 1 "ip":"222.187.222.220" FIELD 2 "country_code":"CN" FIELD 3 "country_name":"China" FIELD 6 "city":"Shanghai" FIELD 8 "

Re: [Tutor] 2016-02-01 Filter STRINGS in Log File and Pass as VARAIBLE within PYTHON script

2016-02-02 Thread knnleow GOOGLE
Sorry, forget to make use of SET() ... this is the new update. appreciate your advice if we can still optimized further... $ more fail2ban-banned-ipAddress.py #VERSION CONTROL: #2016-01-31 - Initial build by Kuenn Leow # - fail2ban package has to be installed #

Re: [Tutor] 2016-02-01 Filter STRINGS in Log File and Pass as VARAIBLE within PYTHON script

2016-02-02 Thread knnleow GOOGLE
n e-mail: truon...@viettel.com.vn netname:Newass2011xDSLHN-NET remarks: For spamming matters, mail to tie...@viettel.com.vn banIP: 183.3.202.109 whoisFile: abuse-mailbox: anti-s...@ns.chinanet.cn.net abuse-mailbox: antispam_gd...@189.cn country:CN e-mail: ant

[Tutor] 2016-02-01 Filter STRINGS in Log File and Pass as VARAIBLE within PYTHON script

2016-02-01 Thread knnleow GOOGLE
hello all, trying out on how to port my unix shell script to python. get more complicated than i expected.: ( i am not familiar with the modules available in python. anyone care to share how to better the clumsy approach below. regards, kuenn timestamp02 = time.strftime("%