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> | |
__attribute__((constructor)) void init() { | |
char *args[] = {"/bin/sh", NULL}; | |
execve(args[0], args, NULL); | |
} |
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
$ gcc -shared -fPIC trial_division.c -o trial_division.so | |
$ time python uselib.py | |
14115591195084627607 | |
14115591195084627607 = 3667917713 * 3848393639 | |
real 0m30.045s | |
user 0m30.008s | |
sys 0m0.012s |
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
$ cat loop.c | |
int main() | |
{ | |
long i; | |
for (i=0; i<(1L<<32); i++) { | |
} | |
return 0; | |
} | |
$ cat loop.go |
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
$ python wyvern.py | |
[+] secret length = 28 | |
[+] secret = dAAAAAAAAAAAAAAAAAAAAAAAAAAA | |
[+] secret = drAAAAAAAAAAAAAAAAAAAAAAAAAA | |
[+] secret = dr4AAAAAAAAAAAAAAAAAAAAAAAAA | |
[+] secret = dr4gAAAAAAAAAAAAAAAAAAAAAAAA | |
[+] secret = dr4g0AAAAAAAAAAAAAAAAAAAAAAA | |
[+] secret = dr4g0nAAAAAAAAAAAAAAAAAAAAAA | |
[+] secret = dr4g0n_AAAAAAAAAAAAAAAAAAAAA | |
[+] secret = dr4g0n_oAAAAAAAAAAAAAAAAAAAA |
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 <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
void ping(int s, char *message) | |
{ | |
char buf[8192]; |
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
$ python solve.py | |
ERROR | 2016-03-16 15:42:22,827 | simuvex.procedures.syscalls | no syscall 202 for arch AMD64 | |
ERROR | 2016-03-16 15:42:22,830 | simuvex.procedures.syscalls | no syscall 202 for arch AMD64 | |
ERROR | 2016-03-16 15:42:22,833 | simuvex.procedures.syscalls | no syscall 202 for arch AMD64 | |
WARNING | 2016-03-16 15:42:22,901 | simuvex.vex.irsb | <SimIRSB 0x107132b> hit an error while analyzing statement 19 | |
Traceback (most recent call last): | |
File "/home/user/tmp/angr-doc/ENV/local/lib/python2.7/site-packages/simuvex/vex/irsb.py", line 92, in _handle_irsb | |
self._handle_statements() | |
File "/home/user/tmp/angr-doc/ENV/local/lib/python2.7/site-packages/simuvex/vex/irsb.py", line 208, in _handle_statements | |
s_stmt = translate_stmt(self.irsb, stmt_idx, self.last_imark, self.state) |
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 subprocess | |
with open('top-1m.csv') as f: | |
for line in f: | |
idx, domain = line.rstrip().split(',') | |
try: | |
result = subprocess.check_output(["dig", domain, "A"]) | |
result_a = 0 if 'ANSWER: 0' in result else 1 | |
except subprocess.CalledProcessError: | |
result_a = 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
package application; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.Arrays; | |
import javafx.application.Application; |
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 application; | |
import javafx.beans.property.SimpleStringProperty; | |
public class FileInfo { | |
private final SimpleStringProperty path = new SimpleStringProperty(); | |
private final SimpleStringProperty sha1sum = new SimpleStringProperty(); | |
public FileInfo(String path, String sha1sum) { | |
setPath(path); |