Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- testr="""dhcp
- 120601:002618 wifid[2473]: I sysev:dispatch:code=Disconnected:
- 120601:002618 cmd[2430]: I def:tcpreset_proc_entry:tcpreset= /proc/tcpreset:Resetting TCP sockets
- 120601:002618 cmd[2430]: I def:tcpreset_details:resetparam=43,skiplist=22,5900,8000:TCP Reset details
- 120601:002618 wifid[2473]: I lipc:evts:name=cmDisconnected, origin=com.lab126.wifid:Event sent
- dhcp
- 120601:002619 wifid[2473]: I netm:event:handleCtrlEvent (Reset) connectionNumber=23:
- 120601:002624 wifid[2473]: I wmgr:event:handleWpasupNotify(<2>Authentication), state=Searching:
- 120601:002624 wifid[2473]: I wmgr:event:handleWpasupNotify(<2>CTRL-EVENT-DISCONNECTED), state=Searching:
- 120601:002625 wifid[2473]: I wmgr:handleCtrlEvent:ev=ConfirmDisconnect, state=Searching:
- 120601:002625 cvm[3307]: I LipcService:EventArrived:source=com.lab126.wifid,name=cmDisconnected,arg0=<None>,arg1=<None>:
- 120601:002625 wifid[2473]: I sysev:dispatch:code=Disconnected:
- 120601:002625 cmd[2430]: I def:tcpreset_proc_entry:tcpreset= /proc/tcpreset:Resetting TCP sockets
- 120601:002625 cmd[2430]: I def:tcpreset_details:resetparam=43,skiplist=22,5900,8000:TCP Reset details
- 120601:002625 wifid[2473]: I lipc:evts:name=cmDisconnected, origin=com.lab126.wifid:Event sent
- 120601:002625 wifid[2473]: I netm:event:handleCtrlEvent (Reset) connectionNumber=24:
- 120601:002644 cvm[3307]: I Keyboard:Information::Keyboard open requested
- 120601:002644 cvm[3307]: I Keyboard:Information::Keyboard opened
- 120601:002730 cvm[3307]: I Keyboard:Information::Keyboard close requested
- 120601:002730 eink_fb: W einkfb_print_buffers_equal_message:def:area_update(non-flashing):x1=152,x2=512,y1=494,y2=524
- 120601:002730 cvm[3307]: I Keyboard:KEY_INFO:keysTyped=0,elapsedTime=45759:Keyboard closed
- 120601:002730 wifid[2473]: I ipchandler:get_property:prop=currentEssid:
- 120601:002730 eink_fb: I bs_cmd_ld_img_upd_data_which:def:temp=22C:from pmic
- 120601:002734 wifid[2473]: I wmgr:importNetworkItem:nw=[74814418913682df9698cc5f7e987cb2, secured=yes, smethod=, psk=**************] sr=[74814418913682df9698cc5f7e987cb2 (xx:xx:xx:xx:e8:02) 2437 -44 WPA-PSK-TKIP+CCMP,WPA2-PSK-TKIP+CCMP, WPS]:
- 120601:002734 wifid[2473]: I fconf:saving:file=/var/local/system/wifid.conf, nsect=2:
- 120601:002730 eink_fb: W einkfb_print_buffers_equal_message:def:area_update(non-flashing):x1=0,x2=600,y1=766,y2=800
- 120601:002731 eink_fb: W einkfb_print_buffers_equal_message:def:area_update(non-flashing):x1=24,x2=576,y1=88,y2=712
- 120601:002731 eink_fb: W einkfb_print_buffers_equal_message:def:area_update(non-flashing):x1=28,x2=572,y1=424,y2=596
- 120601:002731 eink_fb: W einkfb_print_buffers_equal_message:def:area_update(flashing):x1=0,x2=600,y1=0,y2=40
- 120601:002733 eink_fb: W einkfb_print_buffers_equal_message:def:area_update(non-flashing):x1=32,x2=568,y1=554,y2=594
- 120601:002734 cvm[3307]: I BaseCursorHandler:USER_SOFTKEY_PRESS:KeyPressed=submit:User pressed submit
- 120601:002734 wifid[2473]: I ipchandler:get_property:prop=profileData:
- 120601:002734 wifid[2473]: E wmgr:profileData:essid=74814418913682df9698cc5f7e987cb2:essid not found
- 120601:002734 wifid[2473]: E ipchandler:exception:Invalid argument: essid not found:
- 120601:002734 wifid[2473]: I ipchandler:set_property:prop=createProfile:
- 120601:002734 wifid[2473]: I wmgr:handleCtrlEvent:ev=CreateNetwork, state=Searching:
- 120601:002734 wifid[2473]: I wmgr:importNetworkItem:nw=[74814418913682df9698cc5f7e987cb2, secured=yes, smethod=, psk=********] sr=[74814418913682df9698cc5f7e987cb2 (xx:xx:xx:xx:e8:02) 2437 -44 WPA-PSK-TKIP+CCMP,WPA2-PSK-TKIP+CCMP, WPS]:
- 120601:002734 wifid[2473]: I fconf:saving:file=/var/local/system/wifid.conf, nsect=2:"""
- ln = testr.split("\n")
- print ('Total Number of Lines: ' + str(testr.count("\n")+1))
- #list(enumerate(testr))
- #for i, line in enumerate(testr):
- # print i + 1
- print ("DHCP was found " + str(testr.count('dhcp')) + " time(s).")
- for line in ln:
- if 'dhcp' in line:
- print line.strip()
- print ("PSK= was found " + str(testr.count('psk=')) + " time(s).")
- for line in ln:
- if 'psk=' in line:
- print 'The length(s) of the PSK used is ' + str(line.count('*'))
Advertisement
Add Comment
Please, Sign In to add comment