This file contains hidden or 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
--- base.py.orig 2015-09-12 12:04:29.771884700 +0900 | |
+++ base.py 2015-09-12 12:05:47.339417230 +0900 | |
@@ -38,7 +38,10 @@ | |
class command_echo(HoneyPotCommand): | |
def call(self): | |
- self.writeln(' '.join(self.args)) | |
+ if len(self.args) and self.args[0].strip().count('-n'): | |
+ self.write(' '.join(self.args[1:])) | |
+ else: |
This file contains hidden or 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 <stdlib.h> | |
#include <string.h> | |
int main(int argc, char *argv[]) { | |
char *ptr; | |
if (argc < 3) { | |
printf("Usage: %s [environment] [path]\n", argv[0]); | |
return 0; |
This file contains hidden or 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> | |
int main(int argc, char *argv[]) { | |
char msg[1024]; | |
static int flag = 0; | |
if (argc < 2) { | |
printf("[*] Error: no argument specified.\n"); | |
return 1; |
This file contains hidden or 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/sh | |
# This script is run by pppd after the link is established. | |
# It executes all the scripts available in /etc/ppp/ip-up.d directory, | |
# with the following parameters: | |
# $1 = interface name (e.g. ppp0) | |
# $2 = tty device | |
# $3 = speed | |
# $4 = local IP address | |
# $5 = remote IP address |
This file contains hidden or 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
require "net/smtp" | |
require "securerandom" | |
require "base64" | |
FOOTER = "\n\n-----\nThis mail was issued by Ruby #{RUBY_VERSION} on Arch Linux (x86_64)." | |
def send_mail(server, from, to, subject, body) | |
Net::SMTP.start(server[:host], server[:port], `uname -n`.chomp, server[:user], server[:pass], :cram_md5) do |smtp| | |
smtp.send_message( | |
"Message-Id: <#{SecureRandom.uuid}@#{server[:host]}>\n" + \ |
This file contains hidden or 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/sh | |
declare -A prev | |
declare -A next | |
renewal=0 | |
domain=("gomasy.jp" "gomasy.net") | |
for d in ${domain[@]}; do | |
prev+=([$d]=`date -r /etc/letsencrypt/live/$d/cert.pem "+%s"`) |
This file contains hidden or 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
require "digest/md5" | |
require "net/https" | |
require "json" | |
require "mail" | |
require "time" | |
require "uri" | |
def parse_envelope(data) | |
if data.multipart? | |
data.parts.map do |pt| |
This file contains hidden or 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
require "net/https" | |
require "ipaddr" | |
require "json" | |
require "uri" | |
slack_url = URI.parse("") # slack webhook url | |
user = ENV["USER"] | |
remote_ip = IPAddr.new(ENV["SSH_CONNECTION"].split(" ")[0]) | |
local_ip = IPAddr.new(ENV["SSH_CONNECTION"].split(" ")[2]) |
This file contains hidden or 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 <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
const char basepath[] = "/sys/devices/system/cpu/cpu%d/cpufreq/%s"; | |
void update_governor(int cpu, char *gov) { | |
FILE *fp; | |
char path[64]; |
This file contains hidden or 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
.status__wrapper .status { | |
padding: 8px 10px 8px 8px; | |
} | |
.status__wrapper .status__content { | |
line-height: 20px; | |
margin-left: 56px; | |
margin-top: -34px; | |
} |