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
# Update and install necessary packages | |
apt-get update | |
apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') | |
# Download some extra packages, that do the trick for "wl module not found" | |
wget http://http.kali.org/kali/pool/main/l/linux-tools/linux-kbuild-4.3_4.3.1-2kali1_amd64.deb | |
wget http://http.kali.org/kali/pool/main/l/linux/linux-headers-4.3.0-kali1-common_4.3.3-5kali4_amd64.deb | |
wget http://http.kali.org/kali/pool/main/l/linux/linux-headers-4.3.0-kali1-amd64_4.3.3-5kali4_amd64.deb | |
# Install with correct order |
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
{:ok, binary} = File.read("original.bin") | |
{f1, f2} = binary | |
|> :binary.bin_to_list() | |
|> Enum.reduce({"", ""}, fn hex, {f1, f2} -> | |
if byte_size(f1) != byte_size(f2) do | |
{f1, f2 <> <<hex>>} | |
else | |
{f1 <> <<hex>>, f2} | |
end |
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
- hosts: www_servers | |
user: ubuntu | |
sudo: yes | |
vars: | |
folder: /usr/share/nginx/html | |
backdoor_keywords: | |
- "FilesMan" # OK | |
- "<?php \\${" # OK | |
- 'mail(stripslashes(' # OK | |
- "<?php \\$array = array(" # OK |
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
/** | |
* Facebook Image Crawler | |
*/ | |
const puppeteer = require("puppeteer"); | |
var https = require("https"); | |
/** | |
* Get the biggest image possivel from FBID. | |
* @param {string} fbid |
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
# | |
# | |
# WORDPRESS BASH SCRIPT TO CLEAN BACKDOOR FILES | |
# | |
# | |
DOMAIN=$1 | |
FOLDER=$2 | |
AWS_KEYFILE=~/aws.pem |
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
val env = StreamExecutionEnvironment.getExecutionEnvironment | |
val source = new FlinkKafkaConsumer(settings.kafkaTopic(), new AugmentedMessageDeserializer, kafkaProperties) | |
val writer = Writer(settings.s3Path(), GenericRecordSchema.schema.toString()).build() | |
env | |
.enableCheckpointing(checkpointInterval) | |
.addSource(source) | |
.addSink(writer) |
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
class AugmentedMessageDeserializer extends MessageKafkaDeserializer[GenericRecord] with LazyLogging { | |
override def deserialize(record: ConsumerRecord[Array[Byte], Array[Byte]]): GenericRecord = { | |
val genericRecord: Try[GenericRecord] = retrieveGenericRecord(record) | |
genericRecord match { | |
case Success(value) => value | |
case Failure(exception) => | |
val key = new String(record.key(), UTF_8) | |
val value = new String(record.value(), UTF_8) |
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
val env = StreamExecutionEnvironment.getExecutionEnvironment | |
env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime) | |
... | |
val source = new FlinkKafkaConsumer(settings.kafkaTopic(), new AugmentedMessageDeserializer, kafkaProperties) | |
.assignTimestampsAndWatermarks(new AscendingTimestampExtractor[GenericRecord] { | |
def extractAscendingTimestamp(element: GenericRecord): Long = | |
Instant | |
.parse(element.get("timestamp").asInstanceOf[String]) |
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
case class Writer(pathString: String, schema: String) { | |
def build(): StreamingFileSink[GenericRecord] = { | |
val path = new Path(pathString) | |
val encoder = new ParquetEncoder(); | |
StreamingFileSink | |
.forRowFormat(path, encoder) | |
.withRollingPolicy(new MyRollingPolicy(60000)) | |
.withBucketAssigner(new MessageBucketAssigner) |
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
#!/usr/bin/env python3 | |
from http.server import HTTPServer, SimpleHTTPRequestHandler, test | |
import sys | |
class CORSRequestHandler (SimpleHTTPRequestHandler): | |
def end_headers (self): | |
self.send_header('Access-Control-Allow-Origin', '*') | |
SimpleHTTPRequestHandler.end_headers(self) | |
if __name__ == '__main__': |
NewerOlder