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
| .text | |
| .global _start | |
| _start: | |
| # setresuid() syscall | |
| # Narnia FIX: Bash drop the setuid bit if EUID != RUID | |
| # I need to call setresuid() to set a different RUID | |
| xor %eax, %eax # Cleaning syscall number |
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
| from datetime import datetime | |
| from time import sleep | |
| from dnslib import DNSLabel, QTYPE, RD, RR | |
| from dnslib import A, AAAA, CNAME, MX, NS, SOA, TXT | |
| from dnslib.server import DNSServer | |
| EPOCH = datetime(1970, 1, 1) | |
| SERIAL = int((datetime.utcnow() - EPOCH).total_seconds()) |
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
| # Copyright © 2010-2011 Tech-Angels. All Rights Reserved. | |
| # CollectorTransaction will be created each time the Collector needs | |
| # to trace an activity. | |
| # | |
| # Attributes: | |
| # * id [integer, primary, not null] - primary key | |
| # * before_tr [binary] - associated model serialized before transaction | |
| # * created_at [datetime] - creation time | |
| # * model_id [integer] - belongs_to Model (polymorphic) |
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
| # download, from_repo, and commit_state methods swiped from | |
| # http://github.com/Sutto/rails-template/blob/07b044072f3fb0b40aea27b713ca61515250f5ec/rails_template.rb | |
| require 'open-uri' | |
| def download(from, to = from.split("/").last) | |
| #run "curl -s -L #{from} > #{to}" | |
| file to, open(from).read | |
| rescue | |
| puts "Can't get #{from} - Internet down?" |