Posts: 19
Threads: 9
Joined: Aug 2013
Reputation:
0
gan.
saya mau tanya.
gimana cara membuat file batch, yg bisa mendeteksi tanggal sistem.
misal:
if tanggal sekarang == 17 && bulan sekarang == 08
then msg "MERDEKA !!!"
else exit
juga bisa mendeteksi nama file dirinya sendiri.
misal:
if nama file == merdeka.exe
then msg "nama file tidak berubah, kok. Tetep MERDEKA !!!"
else exit
mohon pencerahannya, agan sekalian.
Posts: 1,203
Threads: 26
Joined: Aug 2010
Reputation:
75
08-23-2013, 04:30 AM
(This post was last modified: 08-23-2013, 04:32 AM by sohai.)
wew ... ciusan batch files???
masih ada yah ternyata yang main inian gw kira dh jarang orang masih main kekginian ...
btw keknya ente mau buat virus apa cuma sekedar main logika ajah???
nih klo buatan ane
Code: echo off
rem sohai & tasya always together
title simple logic Bomb
cls
if exist sohai.bat (
msg * nama file tidak berubah, kok. Tetep MERDEKA !!!
) ELSE (
msg * nama file berubah, kok. aku GALAU :(
)
If %date% NEQ 17/08/2013 goto sohai
msg * MERDEKA !!!
:sohai
msg * Sekarang itu %date% tau !!!
save ke bentuk sohai.bat
itu simple sih logikanya semoga paham yah
Code: root@sohai:cat info.txt
~#To all script kiddies
~#changing the "made by" or "recoded by" "coded by"
~#wont make you the coder!
~#Respect the coder!
~#It's all opensource for Development not for plagiarism
~#I am pround to be Underground Coder
Posts: 19
Threads: 9
Joined: Aug 2013
Reputation:
0
(08-23-2013, 04:30 AM)sohai Wrote: wew ... ciusan batch files???
masih ada yah ternyata yang main inian gw kira dh jarang orang masih main kekginian ...
btw keknya ente mau buat virus apa cuma sekedar main logika ajah???
nih klo buatan ane
Code: echo off
rem sohai & tasya always together
title simple logic Bomb
cls
if exist sohai.bat (
msg * nama file tidak berubah, kok. Tetep MERDEKA !!!
) ELSE (
msg * nama file berubah, kok. aku GALAU :(
)
If %date% NEQ 17/08/2013 goto sohai
msg * MERDEKA !!!
:sohai
msg * Sekarang itu %date% tau !!!
save ke bentuk sohai.bat
itu simple sih logikanya semoga paham yah
trims dah bantu, gan.
untuk kasus pertama/deteksi tanggal:
hasil nya error gan.
ini output dari cmd.exe => 08/23/2013 was unexpected at this time.
itu maksudny, apaan ya gan?
untuk kasusu kedua/deteksi nama file:
waluapun nama filenya "sohai.bat" maupun bukan "sohai.bat", outputnya tetep sama, gan => msg * nama file berubah, kok. aku GALAU :(
aduh,.. diriku makin dilema nih, gann...
apa memang sudah takdir ku tidak boleh bergaul dengan batch???
Posts: 1,203
Threads: 26
Joined: Aug 2010
Reputation:
75
08-23-2013, 06:32 PM
(This post was last modified: 08-23-2013, 06:33 PM by sohai.)
Code: root@sohai:cat info.txt
~#To all script kiddies
~#changing the "made by" or "recoded by" "coded by"
~#wont make you the coder!
~#Respect the coder!
~#It's all opensource for Development not for plagiarism
~#I am pround to be Underground Coder
Posts: 19
Threads: 9
Joined: Aug 2013
Reputation:
0
Posts: 1,203
Threads: 26
Joined: Aug 2010
Reputation:
75
(08-23-2013, 02:44 PM)usxr101 Wrote: ia, gan. ternyata bisa.
sekarang aplikasi dah bisa mendeteksi nama dirinya sendiri.
tpi, tetap gan, untuk deteksi tanggal, error nya gini: 08/23/2013 was unexpected at this time.
apa mungkin, ada settingan khusus untuk format tanggal ya gan?
iya memang bisa, lebih baik lagi ente tulis ulang codingannya , jangan langsung kopas, soalnya klo langung kopas ente sama ajah ngk belajar,
lebih baik menulis ulang code karena ente bakal baca itu codingan dan nanti akan mencari tau fungsi-fungsi nya ...
belajarlah dari debugs, membaca error, jika perlu cari di google
sekian .
Code: root@sohai:cat info.txt
~#To all script kiddies
~#changing the "made by" or "recoded by" "coded by"
~#wont make you the coder!
~#Respect the coder!
~#It's all opensource for Development not for plagiarism
~#I am pround to be Underground Coder
Posts: 446
Threads: 19
Joined: Mar 2013
Reputation:
16
baru mau ikut threadnya udah selesai ternyata
gw demen bgt sama dunia batch :)
Posts: 19
Threads: 9
Joined: Aug 2013
Reputation:
0
Makasih ya, agan cemua cemua nya.
problem solved. dear agan momod, monggo ane tidak keberatan kalo treat ini di close.
sebagai tambahan: ini hasil kseimpulan ane, dari bantuan agan-agan sekalian.
Code: ::nama file: merdeka.exe
::nama source code: merdeka.bat
@echo off
::solusi untuk kasus deteksi tanggal dan deteksi nama diri sendiri
::kasus1 (kasus deteksi tanggal)
set datetimef=%DATE:~4,2%_%DATE:~7,2%
if %datetimef% == 08_17 (
goto yes1
) else (
goto no1
)
:yes1
msg * "MERDEKA"
goto kasus2
:no1
echo exit
goto kasus2
:kasus2
::kasus2 (kasus deteksi deteksi nama diri sendiri)
if exist merdeka.exe (
goto yes2
) else (
goto no2
)
:yes2
msg * "nama file tidak berubah, kok. Tetep MERDEKA !!!"
goto pause
:no2
echo exit
goto pause
:pause
pause
mungkin, masih amburadul, dan kurang efisin. maklum msih blajar, ya kakk. trim all Indonesian Underground Forum.
Posts: 1,203
Threads: 26
Joined: Aug 2010
Reputation:
75
memang algoritma seseorang itu berbeda-beda , namun yang penting hasil dan tujuan itu sama . . .
namun lebih baik lagi jika kita menulis suatu code dari yang rumit menjadi lebih simple ini bertujuan untuk
efisensi dalam pengcoding an ... :ganteng
Code: root@sohai:cat info.txt
~#To all script kiddies
~#changing the "made by" or "recoded by" "coded by"
~#wont make you the coder!
~#Respect the coder!
~#It's all opensource for Development not for plagiarism
~#I am pround to be Underground Coder
|