{"id":18625646,"url":"https://github.com/varugasu/getrun","last_synced_at":"2025-04-11T04:32:38.064Z","repository":{"id":112596704,"uuid":"242654653","full_name":"varugasu/getrun","owner":"varugasu","description":"A golang program to retrieve Running Configuration from Cisco IOS devices + Deprecated Kex and Ciphers","archived":true,"fork":false,"pushed_at":"2023-03-07T11:58:00.000Z","size":3713,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T01:58:30.700Z","etag":null,"topics":["go-ssh","golang","golang-network","golang-ssh","network","ssh"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/varugasu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-02-24T05:33:11.000Z","updated_at":"2024-02-06T15:33:39.000Z","dependencies_parsed_at":"2023-04-18T05:31:08.933Z","dependency_job_id":null,"html_url":"https://github.com/varugasu/getrun","commit_stats":null,"previous_names":["varugasu/getrun"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varugasu%2Fgetrun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varugasu%2Fgetrun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varugasu%2Fgetrun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varugasu%2Fgetrun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/varugasu","download_url":"https://codeload.github.com/varugasu/getrun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345202,"owners_count":21088231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go-ssh","golang","golang-network","golang-ssh","network","ssh"],"created_at":"2024-11-07T04:35:30.314Z","updated_at":"2025-04-11T04:32:37.305Z","avatar_url":"https://github.com/varugasu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Get Running Configuration from Cisco IOS\n\nThis code works at best effort; therefore, the SSH client tries to connect to servers even **with not recommended Kex and Ciphers**:\n\n```golang\nDIAL:\n\tconn, err = ssh.Dial(\"tcp\", addr, sshConfig)\n\tif err != nil {\n\t\tm := regexp.MustCompile(`server offered: \\[(.*)\\]`)\n\n\t\terrString := err.Error()\n\t\tif strings.Contains(errString, \"key exchange\") {\n\t\t\tsshConfig.Config.KeyExchanges = strings.Split(m.FindStringSubmatch(errString)[1], \" \")\n\t\t\tgoto DIAL\n\t\t}\n\t\tif strings.Contains(errString, \"server cipher\") {\n\t\t\tsshConfig.Config.Ciphers = strings.Split(m.FindStringSubmatch(errString)[1], \" \")\n\t\t\tgoto DIAL\n\t\t}\n\t\treturn nil, err\n\t}\n\n```\n\n`goto` had proved very useful in this case because it reduced the amount of code to handle all these exceptions.\n\n## Usage:\n\n```\n./getrun -t {target} -P {port} -u {username} -p {password}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarugasu%2Fgetrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvarugasu%2Fgetrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvarugasu%2Fgetrun/lists"}