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
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 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
#!/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 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
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) |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
char buffer[16]; | |
int main(int argc, char **argv) { | |
if(argc < 2) { | |
printf("no parameters specified\n"); | |
exit(-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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
char buffer[16]; | |
int main(int argc, char **argv) { | |
if(argc < 2) { | |
printf("no parameters specified\n"); | |
exit(-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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
void do_something(void) { | |
printf("this is not a secret\n"); | |
} | |
void print_secret(void) { | |
printf("this is a secret\n"); |
OlderNewer