Skip to content

Commit

Permalink
Switch to GitHub Actions (#20)
Browse files Browse the repository at this point in the history
Closes #19.
  • Loading branch information
woodruffw committed Dec 26, 2019
1 parent 742b1a3 commit 0001535
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 32 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,23 @@
name: CI

on:
push:
branches:
- master
pull_request:
schedule:
# run CI every day even if no PRs/merges occur
- cron: '0 12 * * *'

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: make onesixtyone
- name: Test
run: |
sudo apt install -y snmpd
sudo /etc/init.d/snmpd restart
bash dotest.sh
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
@@ -1,8 +1,7 @@
onesixtyone
===========

[![Build Status](https://travis-ci.org/trailofbits/onesixtyone.svg)](https://travis-ci.org/trailofbits/onesixtyone)
[![Coverity Scan Build Status](https://scan.coverity.com/projects/10906/badge.svg)](https://scan.coverity.com/projects/onesixtyone)
[![Build Status](https://img.shields.io/github/workflow/status/trailofbits/onesixtyone/CI/master)](https://github.com/trailofbits/onesixtyone/actions?query=workflow%3ACI)

The SNMP protocol is a stateless, datagram oriented protocol. An SNMP scanner is a program that sends SNMP requests to multiple IP addresses, trying different community strings and waiting for a reply. Unfortunately SNMP servers don't respond to requests with invalid community strings and the underlying UDP protocol does not reliably report closed UDP ports. This means that 'no response' from the probed IP address can mean either of the following:

Expand All @@ -25,7 +24,7 @@ COMPATIBLE - Software: Windows 2000 Version 5.0 (Build 2195 Uniprocessor Free)
192.168.112.64 [public] Power Macintosh, hardware type 406; MacOS 9.0;
OpenTransport 2.5.2
192.168.104.254 [public] Novell NetWare 4.11 August 22, 1996
192.168.112.83 [public] Macintosh Quadra 650, System Software 7.1
192.168.112.83 [public] Macintosh Quadra 650, System Software 7.1
192.168.244.210 [public] RICOH Aficio 850 / RICOH Network Printer D model
192.168.240.39 [public] Cisco Systems WS-C5000
192.168.244.103 [public] HPJ3210A AdvanceStack 10BT Switching Hub Management
Expand Down
7 changes: 6 additions & 1 deletion dotest.sh
@@ -1,8 +1,13 @@
#!/bin/bash

pidof snmpd || { echo "snmpd not running?"; exit 1; }

result=$(./onesixtyone 127.0.0.1)

if [[ "$result" == *"public"* ]]; then
echo "OK"
exit 0
fi
exit 1

echo "FAIL"
exit 1

0 comments on commit 0001535

Please sign in to comment.