Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[ask] batch: cara mendeteksi tanggal sistem + nama file dirinya sendiri
#1
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.
Reply
#2
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 yahCulas
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
Reply
#3
(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 yahCulas

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???
Reply
#4
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
Reply
#5
Reply
#6
(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 .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
Reply
#7
baru mau ikut threadnya udah selesai ternyata
gw demen bgt sama dunia batch :)
Quote:Camfroger Indonesia
Server : J.A.M.5 (general room) & QPS (18+ room)
NickName : Vocer, felixkeren28, felix_lovers, EropeanAdminServer, sihomo, sisurem

http://www.speedtest.net/my-result/3081452659
Reply
#8
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.
Reply
#9
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [aks] cara membuat file batch yang menghapus diri sendiri? Red-coder 5 77 03-20-2014, 05:12 PM
Last Post: sky_oot
  [[Batch Programming]] help Red-coder 3 46 01-07-2014, 08:10 AM
Last Post: AntSoldier
Computer_16 cara mengedit program gmn ya ?? tamtamNS 4 79 10-04-2013, 12:29 PM
Last Post: Arthana
  (Tutor) Membuat Translate Bahasa Sendiri Hab1b 12 223 09-18-2013, 09:52 AM
Last Post: eth0
  ASK CARA UPLOAD DI 000webhost,com vicky123 5 87 04-01-2012, 02:49 AM
Last Post: g4rt
  [ASK] Cara coding script shell / backdoor bagaimana ? Punish3rZ 1 106 03-30-2012, 02:18 AM
Last Post: arDhi^_
  Membuat Forum Sendiri (Gratis) tigerblade 5 192 12-05-2011, 11:30 PM
Last Post: nesta
  Membuat Compraser [batch version] Blacker_onliners 0 41 07-06-2011, 08:07 PM
Last Post: Blacker_onliners
  [share] File: Visual Basic .rar green.day 3 73 01-17-2011, 06:16 PM
Last Post: green.day
Smoke-bomb_16 Mengenal batch programing h3cT0r 4 89 01-03-2011, 07:27 PM
Last Post: Sidom

Forum Jump:


Users browsing this thread: