Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from subprocess import Popen, CREATE_NEW_CONSOLE,PIPE,STDOUT
- import time
- import subprocess
- import datetime
- import os
- #import envSI
- class Wiresharking:
- """Wireshark Server subclass"""
- def __init__(self,**kwargs):
- self.filters=''
- self.window_ip = kwargs.get('ip')
- print type(self.window_ip)
- self.window_user= kwargs.get('username')
- self.window_password= kwargs.get('password')
- self.dest_path= kwargs.get('Target_path')
- self.interface= kwargs.get('interface')
- self.terminal='cmd'
- self.home=kwargs.get('Home_path')
- def test(self):
- print 'hi'
- return self.window_ip
- SERVER_01 = Wiresharking(
- name='WIRESHARK_ENV91',
- ip='192.168.1.16',
- username=r'NSN-INTRArechandr', #always prepend r , before giving your username and password
- password='jan@2018',
- prompt='$ ',
- autostart=False,
- unzip_capture=True,
- filter='',
- #interface=['ens2f0'],
- interface='Ethernet',
- Target_path=r'D:Userspankaj-mDesktopTest'
- )
- print SERVER_01.test()
- <type 'str'>
- hi
- 192.168.1.16
- pybot -V env.py Check.robot
- *** Settings ***
- Library Wiresharking.py
- *** Test Cases ***
- Test
- check
- *** Keywords ***
- check
- ${abc} = test
- log ${abc}
- 16:13:37.279 INFO None
Add Comment
Please, Sign In to add comment