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
proc create_file | |
; [bp+4] offset file_name | |
; [bp+6] offset file_handle | |
; [bp+8] offset error_message | |
; [bp+10] file attributes [value] | |
push bp | |
mov bp, sp | |
push ax | |
push bx |
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 | |
touch way1.txt | |
echo "This is the second way!" > way2.txt | |
> way3.txt | |
printf "This is the fourth way!\n" > way4.txt | |
>> way5.txt | |
# The sixth way is made if way 5 is too much like way 3, | |
# But you have to insert some data and then press CTRL+C to write to the file and save it. | |
cat > way6.txt |
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
@echo off | |
REM --> Check for permissions | |
IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" ( | |
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system" | |
) ELSE ( | |
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" | |
) | |
REM --> If error flag set, we do not have admin. |