Wednesday, January 31, 2018

Ban IP Address by IP Table

Ban IP Address by IP Table:

view Ban IP address:
iptables -L INPUT -v -n

Check Ban IP by IP address
iptables -L INPUT -v -n | grep "1.2.3.4"

Ban IP address:
iptables -A INPUT -s 97.74.24.174 -j DROP

Delete Ban by IP address
iptables -D INPUT -s 1.2.3.4 -j DROP

Monday, January 29, 2018

Purge, Flush or Delete Postfix Queue

Show Postfix mail Queue
postqueue -p or mailq

Delete mail msg by msg-id in Mail Queue
postsuper -d msg-id

Delete All mail msg in Mail Queue 
postsuper -d ALL

Finding Files By Content in File

find . -name "configuration.php" |xargs grep --color '$user\|$password\|$db'

find . -name "*.php" |xargs grep 'base64_decode' | grep 'create_function'

find . -name "*.php" |xargs awk '/base64_decode/ && /create_function/'

Saturday, January 27, 2018

Disable Directory list by .htaccess

Add Option in Apache2.conf

<Directory /var/www/html>
   Options -Indexes +FollowSymLinks
   AllowOverride None
   Require all granted
</Directory>

Create file .htaccess in /var/www/html
add Option :
Options -Indexes

Wednesday, January 17, 2018

Check Application Run

:Check Schedule Run
SCHTASKS /Query /FO LIST /V >"%USERPROFILE%\Desktop\MyScheduledTasks.txt"

:Check Console Run export by Regedit
reg export "HKEY_CURRENT_USER\Console" "%USERPROFILE%\Desktop\MyConsoleSettings.txt" /y

:Check Local Machine Run export by Regedit
reg export "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "%USERPROFILE%\Desktop\MyLocalRunSettings.txt" /y

:Check Cuurent User Run export by Regedit
reg export "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" "%USERPROFILE%\Desktop\MyUserRunSettings.txt" /y

:Check Config on StartUP
MSCONFIG

Friday, January 12, 2018

Windows 10 Access FileShare On Windows 7

Windows 10  Access FileShare On Windows 7

1: gpedit

Computer configuration\administrative templates\network\Lanman Workstation
"Enable insecure guest logons"

2: regdit

Default Registry Value:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"AllowInsecureGuestAuth"=dword:0
Configured Registry Value:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"AllowInsecureGuestAuth"=dword:1

ALCATEL 6900

write memory copy running certified reload from working no rollback-timeout