Posts

Showing posts from May, 2018

Security Compliance and policies

A. Organisation Level 1.  Service Organisation Control(SOC-1/2 Type-I/II) https://www.netgainit.com/soc-2-type-ii-certification-defined/ 2. General Data protection Regulation Requirements(GDPR) https://www.csoonline.com/article/3202771/data-protection/general-data-protection-regulation-gdpr-requirements-deadlines-and-facts.html 3.  HIPAA (Health Insurance Portability and Accountability Act) https://searchhealthit.techtarget.com/definition/HIPAA 4. NIST(National Institute of Standards and Technology) https://digitalguardian.com/blog/what-nist-compliance 5. (STAR)Security, Trust & Assurance Registry https://cloudsecurityalliance.org/star/#_overview 6. CSA(Cloud Security Alliance) https://www.cloudsecurityalliance.org/csaguide.pdf 7. PCI(Payment Card Industry) https://www.pcisecuritystandards.org/ 8. SOX(Sarbanes-Oxley Act ) https://www.blackstratus.com/sox-compliance-requirements/ 9. ISO27001 ISMS http://www.iso27001security.com/html/tool...

Exploit-DB

https://www.exploit-db.com/exploits/34272/ 3NczQvTgkFQJkpsSVeEAW_6qaBPA3752ZKLpxnrdLdg

How do you substitute the Nth by a given regular expression pattern in python?

I had a need to replace Nth IP address in logs by a given IP address. This is how achieved in pythonic way. It may be useful to you as well. import re mystr = '203.23.48.0 DENIED 302 449 800 1.1 302 http d.flashresultats.fr 10.111.103.202 GET GET - 188.92.40.78 ' src = '1.1.1.1' replace_nth = lambda mystr, pattern, sub, n: re.sub(re.findall(pattern, mystr)[n - 1 ], sub, mystr) mystr = replace_nth(mystr, '\S*\d+\.\d+\.\d+\.\d+\S*' , src, 2 ) print (mystr) # It outputs:203.23.48.0 DENIED 302 449 800 1.1 302 http d.flashresultats.fr 1.1.1.1 GET GET - 188.92.40.78