Skip to content

Instantly share code, notes, and snippets.

@joaoceron
joaoceron / shodan.supported.ics.scan.txt
Last active June 7, 2019 11:44
shodan.io ICS protocols
bacnet Gets various information from a BACnet device.
s7 Communicate using the S7 protocol and grab the device identifications.
iec-61850 MMS protocol
codesys Grab a banner for Codesys daemons
dnp3 A dump of data from a DNP3 outstation
fox Grabs a banner for proprietary FOX protocol by Tridium
secure-fox Grabs a banner for proprietary FOX protocol by Tridium
ethernetip Grab information from a device supporting EtherNet/IP over TCP
ethernetip-udp Grab information from a device supporting EtherNet/IP over UDP
general-electric-srtp Check whether the GE SRTP service is active on the device.
# mirai signature
"tcp[4:4] == ip[16:4]"
# insert pandas Dataframe into InfluxDB
import sys
from influxdb import InfluxDBClient
dbname = "test"
user = "admin"
pwd = "admin"
host = "localhost"
port = 8086
@joaoceron
joaoceron / gist:52432baa9cdc3ca903ba196424b6ac51
Last active November 6, 2018 08:44
RIPE Atlas: find all the probes for a list of countries
from ripe.atlas.cousteau import ProbeRequest
# find all the probes for a list of countries
filters = {"country_code__in":"AU,BR,CH,DE,ES,FR,IT,JP,NL,RU,SE,GB,US,ZA"}
probes = ProbeRequest(**filters)
result = []
# get the dualstack probes only
for probe in probes:
if (probe["address_v4"] and probe["address_v6"]):
@joaoceron
joaoceron / gist:e29990cd8404f1cf8fb38baaf5638d37
Created June 5, 2018 11:30
search strings in dataframe
import pandas as pd
import numpy as np
def search(df, *words): #1
"""
Return a sub-DataFrame of those rows whose Name column match all the words.
"""
return df[np.logical_and.reduce([df['Name'].str.contains(word) for word in words])] # 2
df = pd.DataFrame({'Name':['Virginia Google Governor',