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
# create ca.key and ca.crt | |
openssl genrsa -out ./ca/ca.key 2048 | |
openssl req -new -x509 -days 1825 -key ./ca/ca.key -out ./ca/ca.crt --config ca.cnf | |
#openssl x509 -in ca.crt -text -noout | |
# creates domain.key and domain.csr | |
openssl req -new -out ./certs/domain.csr -config domain.cnf | |
#openssl req -in ./certs/domain.csr -text -noout |
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
[ req ] | |
# This specifies the default key size in bits. If not specified then 512 is | |
# used. It is used if the -new option is used. It can be overridden by using | |
# the -newkey option. | |
default_bits = 2048 | |
# This is the default filename to write a private key to. If not specified the | |
# key is written to standard output. This can be overridden by the -keyout | |
# option. | |
default_keyfile = ./certs/domain.key |
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
# Creating a Private Certificate Authority | |
# https://www.feistyduck.com/library/openssl-cookbook/online/ch-openssl.html | |
# Template https://github.com/ivanr/bulletproof-tls/blob/master/private-ca/root-ca.conf | |
# The first part of the configuration file contains some basic CA information, such as the name and the base URL, and the components of the CA’s distinguished name. Because the syntax is flexible, information needs to be provided only once: | |
[default] | |
name = ca | |
default_ca = ca_default | |
name_opt = utf8,esc_ctrl,multiline,lname,align |
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
#FUNCTION DEFINITION | |
def saveInvoice(templateName, saveWithName, valuesDictionary): | |
word = win32.gencache.EnsureDispatch('Word.Application') | |
word.Visible = False | |
myTemplate = word.Documents.Open(templateName) | |
for key in valuesDictionary: | |
find = word.Selection.Find | |
find.Text = key | |
find.Replacement.Text = valuesDictionary[key] |
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
/* | |
* Copyright (C) 2016 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
#Rels | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> | |
<Relationship Id="rId7" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/> | |
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/> | |
<Relationship Id="rId6" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/> | |
<Relationship Id="rId5" Type="http://schemas.microsoft.com/office/2006/relationships/ui/extensibility" Target="customUI/customUI.xml"/> | |
</Relationships> |
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
'Using Microsoft XML, v6.0 | |
Sub postrequest() | |
Dim conn As New XMLHTTP60 | |
conn.Open "post", "https://duckduckgo.com/?q=hello", False | |
conn.send |
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
def found(tbf,lt): | |
found=False | |
for i in range(0,len(lt)+1-len(tbf)): | |
if lt[i:i+len(tbf)] == tbf: | |
found = True | |
return found | |
inlist = [3,5,6,7,2,1,3,4,1,7,7,7,8,9] | |
tbf = [1,3,4] |