Wednesday, December 15, 2021

Share folder from macOS to VirtualBox

Follow these steps to share a folder from your host macOS to guest Kali Linux running inside VirtualBox.

Step 1: From your macOS, Go to "System Preferences... >> Sharing"

Step 2: Enable the File Sharing option and add a folder to share

Step 3: Open VirtualBox >> Select Kali Linux (or any other image)

Step 4: Click on "Settings >> Share Folder"

Step 5: Click on Add new shared folder button and add the same folder you previously added in macOS from Step 2
Step 6: Log in to your Kali Linux image

Step 7: Open Terminal and type the command "sudo adduser $USER vboxsf"

Step 8: Reboot Kali Linux

Thursday, December 09, 2021

[Solved] error: ‘getrusage’ was not declared in this scope


Error:

vb_perf.cpp: In function ‘int main(int, const char**)’:
vb_perf.cpp:63:23: error: variable ‘main(int, const char**)::rusage rusage’ has initializer but incomplete type
   63 |         struct rusage rusage = { };
      |                       ^~~~~~
vb_perf.cpp:64:19: error: ‘RUSAGE_SELF’ was not declared in this scope
   64 |         getrusage(RUSAGE_SELF, &rusage);
      |                   ^~~~~~~~~~~
vb_perf.cpp:64:9: error: ‘getrusage’ was not declared in this scope; did you mean ‘rusage’?
   64 |         getrusage(RUSAGE_SELF, &rusage);
      |         ^~~~~~~~~
      |         rusage


Solution:

Include this header to your source code:

#include <sys/resource.h>

Thursday, November 25, 2021

[How To] Use Cryptopp in Kali Linux

 Crypto++ is a popular C++ library for cryptography. Instruction in this article can be used to install Cryptopp for all operating systems similar to Kali Linux. Check out this article if you want to use it with Xcode in macOS.

Step 1: Download Crypto++ using this link

Step 2: Extract Crypto++ and switch to that directory from the terminal or shell.

Step 3: $ make

Step 4: $ make test


Step 5: $ sudo make install

Step 6: Compile your program using

g++ -I/usr/local/include -L/usr/local/lib yourCode.cpp -lcryptopp

Friday, November 12, 2021

Automate onboarding in Google Workspace


This tutorial demonstrates the use of Google Workspace apps to automate the onboarding experience for new users by adding them to a google group and sending automated welcome emails after they are added.

Step 1: Log in to Google Drive using your Google Workspace account and create a new Google Sheet.

Step 2: Go to Insert > Form and create a new Google Form.

Step 3: Add the email address and google group fields.

Step 4: Go to Tools > Script editor.

Step 5: In Apps Script > Go to Project Settings > Check the box for "Show "appsscript.json" manifest file in editor" option.

Step 6: Go to Editor > appsscript.json and change it to the following:

Thursday, November 11, 2021

Automate User Creation in Google Workspace


This tutorial demonstrates how to automate the user creation process in Google workspace using Admin SDK.

Step 1: Log in to Google Drive using your Google Workspace account and create a new Google Sheet.

Step 2: Go to Insert > Form and create a new Google Form.

Step 3: Add the desired fields: First Name, Last Name, Recovery Email, Recovery Phone, Reporting Manager, Location, Title, Department, etc.

Step 4: Go to Tools > Script editor.

Step 5: In Apps Script > Go to Project Settings > Check the box for "Show "appsscript.json" manifest file in editor" option.

Step 6: Go to Editor > appsscript.json and change it to the following: