This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App { | |
public static void main(String[] args) throws Throwable { | |
Logger.INSTANCE.log("main() started"); | |
Logger.INSTANCE.log("hello"); | |
Logger.INSTANCE.log("main() finished"); | |
} | |
private static class Logger extends SecurityManager { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App { | |
public static void main(String[] args) throws Throwable { | |
Logger.INSTANCE.log("started"); | |
Logger.INSTANCE.log("hello"); | |
foo(); | |
Logger.INSTANCE.log("finished"); | |
} | |
private static void foo() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from twisted.application import service, internet | |
from twisted.internet.endpoints import serverFromString | |
from twisted.internet.protocol import ServerFactory | |
from twisted.python.components import registerAdapter | |
from twisted.python import log | |
from ldaptor.inmemory import fromLDIFFile | |
from ldaptor.interfaces import IConnectedLDAPEntry | |
from ldaptor.protocols.ldap import distinguishedname | |
from ldaptor.protocols.ldap.ldapserver import LDAPServer | |
import tempfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.naming.NamingEnumeration; | |
import javax.naming.directory.SearchControls; | |
import javax.naming.directory.SearchResult; | |
import javax.naming.ldap.InitialLdapContext; | |
import java.util.Hashtable; | |
public class LDAPLogin { | |
public static void main(String[] args) throws Exception { | |
if (args.length < 2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.naming.NamingEnumeration; | |
import javax.naming.directory.SearchControls; | |
import javax.naming.directory.SearchResult; | |
import javax.naming.ldap.InitialLdapContext; | |
import java.util.Hashtable; | |
public class LDAPInfo { | |
public static void main(String[] args) throws Exception { | |
if (args.length < 1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# we just assume that it's that simple | |
alphabet="qwertyuiopasdfghjklzxcvbnm" | |
password="" | |
found=1 | |
# stop when all guesses failed | |
while [ ${found} -eq 1 ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.HashMap; | |
import java.util.Map; | |
public class CommandLine { | |
public static Parameters parse(String[] args) { | |
Parameters params = new Parameters(); | |
int i = 0; | |
while (i < args.length) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package security.keyexchange; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.math.BigInteger; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.security.KeyFactory; | |
import java.security.KeyPair; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import dht | |
import machine | |
def mesure_temperature_and_humidity(): | |
d = dht.DHT22(machine.Pin(DHT22_PIN)) | |
d.measure() | |
t = d.temperature() | |
h = d.humidity() | |
print('temperature = %.2f' % t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import network | |
nic = network.WLAN(network.STA_IF) | |
nic.active(True) | |
nic.connect(ssid, password) |
OlderNewer