Defcon Ace Badge




This script needs to go into your WHMCS hooks folder (root/includes/hooks/):
<?php
function send_invitation_email($vars) {
$command = "sendemail";
$adminuser = "admin"; // Your admin username
$values["messagename"] = "Google Groups Invitation"; // exact name of e-mail template
$values["id"] = $vars['userid'];
$results = localAPI($command,$values,$adminuser);
}
add_hook("ClientAdd",1,"send_invitation_email");
?>
http://minikomi.github.io/Bootstrap-Form-Builder/
This looks great for non-technical users who want a form built. It’s a great response to “Hey, make me a checklist!”…
“You make the checklist the way you want it using this site, then I’ll put it on the web.”
The error in the title will occur on pre-0.12.0 versions of python’s Requests library. It seems to be fixed on later versions and maybe even earlier.
Here’s an example of how you save a zip file from behind a corporate proxy with python’s Requests library:
That’s it! Just use the write function with the content of the returned request.
This requests error means Python couldn’t verify the server’s SSL certificate against its trusted CA bundle. I originally “fixed” it with verify=False. Don’t do that: it turns off certificate verification entirely and leaves the request open to a man-in-the-middle. The error almost always has a real, fixable cause.
If the certificate is signed by an internal or self-signed CA (common for corporate and intranet services), point requests at that CA instead of turning verification off:
r = s.post(url, data=payload, headers=headers, verify="/path/to/internal-ca.pem")
A corporate SSL-inspection proxy re-signs traffic with its own root, and the fix is the same: pass that root CA to verify. If the CA bundle is just out of date, requests verifies against certifi, so pip install --upgrade certifi (or updating your OS CA certs) often clears it. If the server is missing its intermediate certificate, that’s a server-side misconfiguration you can confirm with SSL Labs and fix in the chain.
If you genuinely need to skip verification for a throwaway local test, scope it and silence the warning knowingly, never against anything real:
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
r = s.post(url, ..., verify=False) # local debugging only
Updated 2026-08-08: explained why the header is missing and updated the package names for Python 3.
The following helped to resolve this issue: sudo apt-get install python-dev
On a current machine that package is python3-dev:
sudo apt-get install python3-dev
The confusing part is that Python is obviously installed already, or pip wouldn’t have gotten far enough to run a compiler. pycurl is a C extension wrapping libcurl, so pip builds it from source, and building any CPython extension means compiling against Python.h. That header ships in a separate development package rather than with the interpreter, which is why a working python3 gives you no headers at all. Red Hat and Fedora call it python3-devel.
Being inside a virtualenv doesn’t change this. The venv copies the interpreter but not the headers, so the system package is still what the compile needs.
The next error after this one is usually curl/curl.h: No such file or directory, which is the same problem one library over. libcurl’s headers come from libcurl4-openssl-dev on Debian and Ubuntu, or libcurl-devel on Red Hat. pycurl’s install docs list the rest of the build requirements.
The trap after that one doesn’t show up until import, so it’s easy to think the build succeeded:
pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend
pycurl has to be built against the same TLS library its libcurl uses, and it guesses wrong on a machine carrying more than one. The first line of curl -V names the library to match:
PYCURL_SSL_LIBRARY=openssl pip install --no-cache-dir pycurl
--no-cache-dir matters, because pip will otherwise hand back the same wrongly-built wheel it cached on the previous attempt.
I was getting a lot of errors when I was trying to download a file with the python requests library. The errors looked like the following:
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 2-6: ordinal not in range(128)
This code ended up fixing it:
Use json.dumps in the data parameter.
for example:
r = s.post(url, data=json.dumps(payload), allow_redirects=False, cookies=cookieRequest.cookies)
I wanted to see the order Google Maps fires its events in. Google’s official Map Events example wires up listeners for the map’s events, so it’s a good starting point for seeing how they behave as you pan, zoom, and click.
Use the following command in Cygwin (using your IP and Username, of course):
ssh yourUsername@198.168.xxx.xxx -D 2280 -i your/certificate
Set the following settings in Firefox (connect settings, under the advanced tab):
