{"action":"created","issue":{"url":"https://api.github.com/repos/ktbyers/netmiko/issues/838","repository_url":"https://api.github.com/repos/ktbyers/netmiko","labels_url":"https://api.github.com/repos/ktbyers/netmiko/issues/838/labels{/name}","comments_url":"https://api.github.com/repos/ktbyers/netmiko/issues/838/comments","events_url":"https://api.github.com/repos/ktbyers/netmiko/issues/838/events","html_url":"https://github.com/ktbyers/netmiko/issues/838","id":330953109,"node_id":"MDU6SXNzdWUzMzA5NTMxMDk=","number":838,"title":"Privilege Escalation for a Cisco like device","user":{"login":"newsera","id":7327443,"node_id":"MDQ6VXNlcjczMjc0NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/7327443?v=4","gravatar_id":"","url":"https://api.github.com/users/newsera","html_url":"https://github.com/newsera","followers_url":"https://api.github.com/users/newsera/followers","following_url":"https://api.github.com/users/newsera/following{/other_user}","gists_url":"https://api.github.com/users/newsera/gists{/gist_id}","starred_url":"https://api.github.com/users/newsera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newsera/subscriptions","organizations_url":"https://api.github.com/users/newsera/orgs","repos_url":"https://api.github.com/users/newsera/repos","events_url":"https://api.github.com/users/newsera/events{/privacy}","received_events_url":"https://api.github.com/users/newsera/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-10T09:14:00Z","updated_at":"2018-06-10T15:36:39Z","closed_at":null,"author_association":"NONE","body":"```\r\nFile \"/home/ubuntu/.local/lib/python3.5/site-packages/netmiko/base_connection.py\", line 1051, in send_command\r\n    search_pattern))\r\nOSError: Search pattern never detected in send_command_expect: \\(test\\-com\\-access\\-sw11\\)\\ \\>\r\n```\r\n\r\nI believe this is breaking since it unusually has parenthesis for hostname and also has a space between ) and > \r\n\r\nHow can I get this working assuming I use \"cisco_ios\" as device type? I have already provided the secret parameter but the privilege escalation isn't happening since it never detects \">\"\r\n\r\nDevice Interaction through SSH looks as follows: \r\n(test-com-access-sw11) >enable\r\nPassword:*********\r\n\r\n(test-com-access-sw11) #"},"comment":{"url":"https://api.github.com/repos/ktbyers/netmiko/issues/comments/396058386","html_url":"https://github.com/ktbyers/netmiko/issues/838#issuecomment-396058386","issue_url":"https://api.github.com/repos/ktbyers/netmiko/issues/838","id":396058386,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjA1ODM4Ng==","user":{"login":"newsera","id":7327443,"node_id":"MDQ6VXNlcjczMjc0NDM=","avatar_url":"https://avatars1.githubusercontent.com/u/7327443?v=4","gravatar_id":"","url":"https://api.github.com/users/newsera","html_url":"https://github.com/newsera","followers_url":"https://api.github.com/users/newsera/followers","following_url":"https://api.github.com/users/newsera/following{/other_user}","gists_url":"https://api.github.com/users/newsera/gists{/gist_id}","starred_url":"https://api.github.com/users/newsera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newsera/subscriptions","organizations_url":"https://api.github.com/users/newsera/orgs","repos_url":"https://api.github.com/users/newsera/repos","events_url":"https://api.github.com/users/newsera/events{/privacy}","received_events_url":"https://api.github.com/users/newsera/received_events","type":"User","site_admin":false},"created_at":"2018-06-10T15:36:39Z","updated_at":"2018-06-10T15:36:39Z","author_association":"NONE","body":"Its a Whitebox Switch running custom OS. \r\n\r\nFound the issue. It was getting stuck when the code was unable to retrieve a multi paged command output. Passing \"terminal length 0\" fixed the issue, but I was under the impression that \"cisco_ios\" already takes care of \"terminal length 0\"\r\n\r\n```\r\nfrom netmiko import ConnectHandler\r\n\r\ncomm = {\r\n    'device_type': 'cisco_ios',\r\n    'ip':   'test',\r\n    'username': 'testuser',\r\n    'password': 'testpass',\r\n    'port' : 22,          # optional, defaults to 22\r\n    'secret': 'testpass',     # optional, defaults to ''\r\n    'verbose': True,       # optional, defaults to False\r\n}\r\n\r\nnet_connect = ConnectHandler(**comm)\r\noutput = net_connect.send_command('show ip int brief')\r\nprint(output)\r\nnet_connect.enable()\r\noutput = net_connect.send_command('terminal length 0')\r\noutput = net_connect.send_command('show ver')\r\nprint(output)\r\n```"}}
{"actor":{"display_login":"newsera"}}