How to read in Python a file between two lines

#!/urs/bin/python
import sys,re

if(__name__ == “__main__”):
with open(“Autosupport”) as f:
for l in f:
pattern=’^Replication Data Transferred over 24hr.*’
pattern2=’^Replication Detailed History’
if(re.match(pattern,l)):
print(l)
for l2 in f:
print (l2)
if (re.match(pattern2,l2)):
sys.exit(0)

Become a better programmer

One of the goals for 2017 is to become a better programmer.

I always had an interest in computer programming, but I feel that this year I want to deeply inmerse more in this (amazing) topic.

I want to read some books to become a better programming, like the following ones:

Head first design patterns:

https://www.amazon.es/Head-First-Design-Patterns-Freeman/product-reviews/0596007124/ref=dpx_acr_txt?showViewpoints=1

Programming Pearls:

https://www.amazon.es/Programming-Pearls-Joe-Bentley/dp/8177588583/ref=sr_1_1?ie=UTF8&qid=1484162195&sr=8-1&keywords=programming+pearls

Clean Code
https://www.amazon.es/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882/ref=cm_cr_arp_d_product_top?ie=UTF8

Apart from that I want to code more, do more coding!

I have joined a Professional Android Developer Micromaster

https://courses.edx.org/dashboard/programs/45a14e9d-8f08-44b4-a00b-84d47b012237/professional-android-developer

Prehistoric computing

Thanks to the effort of microhobby.org I have discovered that all the numbers of the old Spanish computing magazine: MicroHobby, can be downloaded in a PDF format.

When I saw them, I remembered almost every single cover of the magazine (and I am impressed by the quality of those covers).

Furthermore I have discovered amazed that I did a very small contribution on number 1 (I completely forgot about this, truly)

This was probably 1990.

http://microhobby.speccy.cz/mhf/196/MH196_14.jpg

Yes, computers have been part of my life always.

Processing network captures in pcap format

I would like to build my own tool for analyzing network captures.

Most of the time my job involves to spot why a network protocol is performing slowly: using Wireshark for that task is nice, but I want something more automatic, just able to detect the issues I normally deal with, in an automatic way.

That is the reason I have decided to do some homework and analyze which libraries are available for processing pcap files.

The original pcap library in C can be found @ tcpdump.org

Information about the file format can be found @ Libpcap information

There is a port to python of the pcap library Python port of the pcap library

Also in Python, there is a tool that seems to be much more ambitious but worthy: Scapy

This is just a first sketch. Lot of job needs to be done to accomplish something useful.

Get your hands dirty

You cannot learn anything worthwhile, if  you do not get your hands dirty.

The theoretical knowledge fails normally as soon as you try to apply it on the real world, so the best thing for learning something new is to start practising as soon as possible. Talking is cheap, doing is not.

That attitude: to try, to test, to push the limits, is the right one.
I will be sharing here whatever satisfies my own interests, with no order in particular.

Because by teaching we learn.

“Docendo discimus”