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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
# Open the file for reading | |
my $file_path = "data.txt"; | |
open my $fh, '<', $file_path or die "Could not open file '$file_path' for reading: $!"; | |
# Read and print each line from the file | |
while (my $line = <$fh>) { |
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
use std::fs::File; | |
use std::io::{self, Read}; | |
fn main() { | |
// Specify the file path to be read | |
let file_path = "example.txt"; | |
// Attempt to open the file | |
match File::open(file_path) { | |
Ok(mut file) => { |
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
#!/bin/bash | |
directories=( | |
"/home/kali/Desktop/SYS/SYSTEM/CODE" | |
"/home/kali/Desktop/SYS/SYSTEM/CONFIGS" | |
"/home/kali/Desktop/SYS/SYSTEM/DATA" | |
"/home/kali/Desktop/SYS/SYSTEM/EXT" | |
"/home/kali/Desktop/SYS/SYSTEM/INDEX" | |
"/home/kali/Desktop/SYS/SYSTEM/MAP" | |
"/home/kali/Desktop/SYS/SYSTEM/META" |
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
# List all files in the current directory | |
ls | |
# Create a new directory | |
mkdir new_dir | |
# Change to a new directory | |
cd new_dir | |
# Remove a directory |
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
import os | |
import system from os | |
A-Z alphabet syntax | |
qwertyuiopasdfghjklzxcvbnm | |
META[DATA] | |
CODE{DATA} | |
\system_route | |
| pipeline operator | |
' literal qoute | |
" objective qoute |
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
! @ # $ % ^ & * ( !) | |
!! !@ !# !$ !% !^ !& !* !( @) | |
@! @@ @# @$ @% @^ @& @* @( #) | |
#! #@ ## #$ #% #^ #& #* #( $) | |
$! $@ $# $$ $% $^ $& $* $( %) | |
%! %@ %# %$ %% %^ %& %* %( ^) | |
^! ^@ ^# ^$ ^% ^^ ^& ^* ^( &) | |
&! &@ &# &$ &% &^ && &* &( *) | |
*! *@ *# *$ *% *^ *& ** *( () |
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
use std::process::Command; | |
fn main() { | |
// Define a function named 'exfil' | |
fn exfil(data: &str) { | |
let path = "/path/route/connection.sh"; | |
if data == "C J" { | |
let mut command = Command::new(path); | |
command.arg("AM").arg("/c|b\\").arg("PM"); | |
let status = command.status().expect("Failed to execute command"); |
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 main(): | |
test = "path/goto/TEST.sh*" | |
config = "path/goto/CONFIG.sh*" | |
src = "path/goto/SRC.sh*" | |
path = "path/goto/PATH.sh*" | |
route = "path/goto/ROUTE.sh*" | |
try: | |
with open(test, "w") as test_file, \ | |
open(config, "w") as config_file, \ |
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
# Step 1: Define the Purpose and Requirements | |
""" | |
Purpose: This software system is designed to manage an online bookstore. | |
Requirements: | |
1. Users should be able to browse and search for books. | |
2. Users should be able to add books to their shopping cart. | |
3. Users should be able to check out and make payments. | |
4. Admins should be able to add, edit, and remove books from the catalog. | |
5. Users should have accounts with profiles for personalized recommendations. |
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
class Universe: | |
def __init__(self, age, size, galaxies): | |
self.age = age # Age of the universe in years | |
self.size = size # Size of the universe in cubic meters | |
self.galaxies = galaxies # List of galaxies in the universe | |
def expand(self, expansion_rate): | |
# Simulate the expansion of the universe | |
self.size *= (1 + expansion_rate) |
NewerOlder