Skip to content

Instantly share code, notes, and snippets.

View thisislola's full-sized avatar

Lola thisislola

View GitHub Profile
@thisislola
thisislola / MonitorDisk.bat
Created October 18, 2018 14:33
Monitoring disks on Windows 10 with a batch script. Could be handy for when leaving PC unattended (but why would you ever do that?) From DFIR.science (https://www.youtube.com/watch?v=Z0Y-630s_Tg)
@ECHO OFF
:updateDisks
wmic diskdrive list brief > C:\yourDirectory\ofChoice\disksOld.txt
:getDisks
wmic diskdrive list brief > C:\yourDirectory\ofChoice\disksNew.txt
:loop
fc C:\yourDirectory\ofChoice\disksOld.txt C:\yourDirectory\ofChoice\disksNew.txt > NUL

Keybase proof

I hereby claim:

  • I am thisislola on github.
  • I am lolafiks (https://keybase.io/lolafiks) on keybase.
  • I have a public key ASAATT66ScevFmoj104rDZogsE296JtijiJ28Zfee5kRtgo

To claim this, I am signing this object:

@thisislola
thisislola / useful_CMD.txt
Created October 18, 2018 09:03
Useful CMD commands. Work in progress. # is the explanation
# change the title of the CMD window
title this is fun
# turn of the echo on batch files (add it to the first line of the file)
@echo off
# clear the screen (ctrl+L on linux)
cls
# write comments on a batch script with
COMMAND DESCRIPTION
addusers Used to add and list users in a CSV file
admodcmd Used for bulk modifying contents in an active directory
arp Address Resolution Protocol is used to map IP address to the hardware address
assoc Used to change associations for file extensions
associat One step file association
at Run a command at a specific time
atmadm Display connection info of the ATM adapter
attrib Used to change file attributes
@thisislola
thisislola / wifi_passwords_saved_on_system.txt
Created October 18, 2018 08:36
Reveal the wifi passwords saved from connected networks in the system.
On CMD, type:
netsh wlan show profile
Output:
Profiles on interface Wi-Fi:
Group policy profiles (read only)
---------------------------------
@thisislola
thisislola / guide_excel_batch.txt
Last active October 18, 2018 08:06
Rename Files on Batch (Guide + .bat File)
Copy and paste the directory address on a browser address field (doesn't work on Edge)
Copy the entire list (make sure you are only copying text and not empty space or won't work)
Now on Excel, paste the list. Should have the same format (columns and rows, linked files)
Delete everything but the file column (they are links - in blue)
Copy and paste the files without the link on a new column next to it (right click, copy without formattint/copy as text)
Make a new column in before column A and fill it with the word REN or RENAME (case insensitive)
Should look like this:
-------------------------------------------------
A B C D E

Batch Cheat Sheet

For more information on a specific command, type HELP command-name

Command Description
ASSOC Displays or modifies file extension associations.
ATTRIB Displays or changes file attributes.
BREAK Sets or clears extended CTRL+C checking.
BCDEDIT Sets properties in boot database to control boot loading.