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
element = page.find("div.example") | |
p element.native.attribute('outerHTML') |
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
# Install new curl version from homebrew | |
$ brew install curl | |
# Convert cert to p12 format | |
$ openssl pkcs12 -export -out certificate.pfx -inkey private.key -in cert.crt -certfile ca_cert.pem | |
# Execute curl | |
$ /usr/local/opt/curl/bin/curl --cert certificate.pfx:PASSWORD -k https://url/ |
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
bufferEqual = require('buffer-equal') | |
authenticityTokenLength = 32 | |
unmaskCSRFToken= (maskedToken) -> | |
if maskedToken.length == authenticityTokenLength | |
return maskedToken | |
else if maskedToken.length == authenticityTokenLength * 2 | |
oneTimePad = maskedToken.slice(0, authenticityTokenLength) | |
encryptedToken = maskedToken.slice(authenticityTokenLength) |