zabbix
Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: Syntax****** - Batch Script

  1. #1
    Join Date
    Jan 2005
    Posts
    623

    Syntax****** - Batch Script

    This is for everyone who keeps requesting the little batch script i wrote:

    HOW TO USE
    *. RUN NETVIEW.BAT - Scans For Shares
    2. RUN SEARCH.BAT - Puts Results to a single text file
    *. OPEN C:/HACKME.TXT FOR RESULTS



    NETVIEW.BAT
    Code:
    echo off
    prompt ~
    IF NOT EXIST c:\a\ mkdir c:\a\
    IF EXIST c:\a\ del /q c:\a\*
    cls
    echo.
    echo.
    echo.
    echo     TYPE THE IP ADRESS IN THE FORM (w.x.y.z)
    echo.
    echo.
    echo w=
    set /p w=
    echo x=
    set /p x=
    echo y=
    set /p y=
    echo z=
    set /p z=
    set count=0
    
    :*0
    
    set ipadd=%w%.%x%.%y%.%z%
    cls
    echo %ipadd%
    
    REM --------- CHECKING IP TO SEE IF ONLINE
    
    ping -n * -l *0 -f -w * %w%.%x%.%y%.%z% >> c:\ping5.txt
    findstr "Reply" c:\ping5.txt
    If %errorlevel% EQU 0 GOTO :NETVIEW
    del c:\ping5.txt
    
    
    :IPCOUNTER
    set /a count=%count%+*
    
    If %w% EQU 255 If %x% EQU 255 If %y% EQU 255 If %z% EQU 255 (cls && echo The number of combinations is %count%)
    
    If %x% EQU 255 If %y% EQU 255 If %z% EQU 255 (Set /a w=%w%+* && Set x=0 && Set y=0 && Set z=0 && goto :*0)
    If %y% EQU 255 If %z% EQU 255 (Set /a x=%x%+* && Set y=0 && Set z=0 && goto :*0)
    If %z% EQU 255 (Set /a y=%y%+* && Set z=0 && goto :*0)
    set /a z=%z%+*
    
    GOTO :*0
    
    :NETVIEW
    del c:\ping5.txt
    echo ^e^cho off >> c:\a\view%w%.%x%.%y%.%z%.bat
    echo net view \\%w%.%x%.%y%.%z% ^>^> c:\a\view%w%.%x%.%y%.%z%.txt >> c:\a\view%w%.%x%.%y%.%z%.bat
    echo exit >> c:\a\view%w%.%x%.%y%.%z%.bat
    start c:\a\view%w%.%x%.%y%.%z%.bat
    
    GOTO :IPCOUNTER

    SEARCH.BAT
    Code:
    echo off
    prompt ~
    cls
    echo.
    echo.
    echo.
    echo     TYPE THE STARTING IP ADRESS IN THE FORM (w.x.y.z)
    echo.
    echo.
    echo w=
    set /p w=
    echo x=
    set /p x=
    echo y=
    set /p y=
    echo z=
    set /p z=
    set count=0
    
    :*0
    echo c:\a\view%w%.%x%.%y%.%z%.txt 
    IF EXIST c:\a\view%w%.%x%.%y%.%z%.txt GOTO :FIND
    
    :BACK
    
    set /a count=%count%+*
    
    If %w% EQU 255 If %x% EQU 255 If %y% EQU 255 If %z% EQU 255 (cls && echo The number of combinations is %count%)
    
    If %x% EQU 255 If %y% EQU 255 If %z% EQU 255 (Set /a w=%w%+* && Set x=0 && Set y=0 && Set z=0 && goto :*0)
    If %y% EQU 255 If %z% EQU 255 (Set /a x=%x%+* && Set y=0 && Set z=0 && goto :*0)
    If %z% EQU 255 (Set /a y=%y%+* && Set z=0 && goto :*0)
    set /a z=%z%+*
    cls
    GOTO :*0
    
    :FIND
    FINDSTR Share c:\a\view%w%.%x%.%y%.%z%.txt
    If %errorlevel% EQU 0 echo %w%.%x%.%y%.%z% >> c:\SHAREIP.txt
    IF %ERRORLEVEL% EQU 0 type c:\a\view%w%.%x%.%y%.%z%.txt >> c:\hackme.txt
    GOTO :BACK
    NOW OPEN C:\hackme.txt
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  2. #2
    Join Date
    Apr 2005
    Posts
    81
    whats this for again?

  3. #3
    Join Date
    Jan 2005
    Posts
    623
    [url]http://www.all-nettools.com/forum/showthread.php?t=*2*2[/url]

    It will scan a range of IP addresses for shares. It can be used for many different purposes. I've made a few phone calls to companies (i wont say any names GOODYEAR!) b.c they dont even have a firewall protecting their databases, computers, etc...

    I also used it to scan a network (@ the college) of over 200+ computers for filesharing programs, viruses, instant messenger progs, etc...
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  4. #4
    Unregistered Guest

    ...

    Or you can use legion

  5. #5
    LaDouche Guest
    This is a really good idea, but it seems that i'm having problems with it. When ever I run Net View, it brings up new CMD windows with just ~echo in it while the ip changes in the new window, is this neccessery? Then, after I get tired *0 minuets later I run SEARCH and it just is searching thousands of IPS. Do I have to wait for this to finish before I get the HACKME.txt? I see it made a directory with lots of files at C:\A. I don't want it to search a range of IP's just my friends, so I can mess with them. I'm sorry i'm unregistered, this forum is neat I will probobly register.

  6. #6
    Join Date
    Jan 2005
    Posts
    623
    Yes, unfortunately the power of the COMMAND PROMPT has limits. Each window that pops up is actually preforming a "net view" on an IP that got a ping reply.

    The search.bat will scan the same range of IP's for shares that netview found and create a hackme.txt if it has found any.
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  7. #7
    Join Date
    Apr 2005
    Posts
    7

    Question How?

    hey i dont get it what do u do?? u get the IP's then what??
    don't tell me im wasting my time here doing it for nothing!

  8. #8
    Unregistered Guest

    Talking

    u should add
    title Syntax_******
    so ull get props if people spred it


    anywho

    site still in progress [url]www.ultimateawesome.blogspot.com[/url]

  9. #9
    Join Date
    Jan 2005
    Posts
    623
    Did any of you guys find the scripts useful? If so ill post the upgraded scripts i wrote.
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  10. #10
    Join Date
    Aug 2005
    Posts
    1
    I personally find them quite useful; particularly because they are highly portable such that I can run them from just about any machines without having to disable the anti-virus engine first.

  11. #11
    Join Date
    Jan 2005
    Posts
    623
    Ok, Well im glad someONE found them useful

    I rewrote the program so the search.bat runs alongside the netview.bat giving you runtime results. Its alot easier to use than the first one i wrote. I will finish it by 08/20/05 so check back soon!
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  12. #12
    Join Date
    Jan 2005
    Posts
    623

    Update *A

    Directions for the New Files: (Email Feedback Please)

    *. Save search.txt to c:\
    2. Run Netview.bat

    Search.txt
    Code:
    echo off
    
    set ip=%ip%.
    set /a ipcount=0
    
    :IP
    set /a ipcount=%ipcount%+*
    
    IF %ipcount% EQU 5 GOTO :IPFINISH
    
    If %ip:~*,*% EQU . set value=%ip:~0,*%&& set ip=%ip:~2% && goto :IPCHOP
    If %ip:~2,*% EQU . set value=%ip:~0,2%&& set ip=%ip:~*% && goto :IPCHOP
    If %ip:~*,*% EQU . set value=%ip:~0,*%&& set ip=%ip:~4% && goto :IPCHOP
    
    :IPCHOP 
    
    IF %ipcount% EQU * set one=%value%&& goto :IP
    IF %ipcount% EQU 2 set two=%value%&& goto :IP   
    IF %ipcount% EQU * set three=%value%&& goto :IP
    IF %ipcount% EQU 4 set four=%value%&& goto :IP    
    
    
    :IPFINISH
    
    set w=%one%
    set x=%two%
    set y=%three%
    set z=%four%
    
    
    :*0
    cls
    echo c:\a\view%w%.%x%.%y%.%z%.txt 
    IF EXIST c:\a\view%w%.%x%.%y%.%z%.txt GOTO :FIND
    IF NOT EXIST c:\a\view%w%.%x%.%y%.%z%.txt GOTO :*0
    
    :BACK
    
    set /a count=%count%+*
    
    If %w% EQU 255 If %x% EQU 255 If %y% EQU 255 If %z% EQU 255 (set w=0&& set x=0&& set y=0&& set z=0&& goto :*0)
    If %x% EQU 255 If %y% EQU 255 If %z% EQU 255 (Set /a w=%w%+*&& Set x=0&& Set y=0&& Set z=0&& goto :*0)
    If %y% EQU 255 If %z% EQU 255 (Set /a x=%x%+*&& Set y=0&& Set z=0 &&goto :*0)
    If %z% EQU 255 (Set /a y=%y%+*&& Set z=0&& goto :*0)
    set /a z=%z%+* && cls && GOTO :*0
    
    :FIND
    FINDSTR Share c:\a\view%w%.%x%.%y%.%z%.txt
    If %errorlevel% EQU 0 echo %w%.%x%.%y%.%z% >> "%userprofile%\desktop\SHARED_IPS.txt"
    IF %ERRORLEVEL% EQU 0 type c:\a\view%w%.%x%.%y%.%z%.txt >> "%userprofile%\desktop\SHARES.txt"
    IF %ERRORLEVEL% EQU 0 echo ******************************************************* >> "%userprofile%\desktop\SHARES.txt"
    IF %ERRORLEVEL% EQU 0 echo ******************************************************* >> "%userprofile%\desktop\SHARES.txt"
    IF %ERRORLEVEL% EQU 0 echo ******************************************************* >> "%userprofile%\desktop\SHARES.txt"
    GOTO :BACK
    Netview.bat
    Code:
    REM *********************************TABLE****************************************************
    set aa=z&& 	set bz=a&& 	set ca=z&& 	set dz=g&& 	set ea=n
    set ab=y&& 	set by=b&& 	set cb=y&& 	set dy=h&&	set eb=o
    set ac=x&& 	set bx=c&& 	set **=x&& 	set dx=i&& 	set ec=p
    set ad=w&&	set bw=d&& 	set cd=w&& 	set dw=j&& 	set ed=q
    set ae=v&&	set bv=e&& 	set ce=v&& 	set dv=k&& 	set ee=r
    set af=u&& 	set bu=f&& 	set cf=u&& 	set du=l&& 	set ef=s
    set ag=t&& 	set bt=g&& 	set cg=t&& 	set dt=m&&	set eg=t
    set ah=s&&	set bs=h&&	set ch=s&&	set ds=n&&	set eh=u
    set ai=r&& 	set br=i&& 	set ci=r&& 	set dr=o&& 	set ei=v
    set aj=q&& 	set bq=j&&	set cj=q&&	set dq=p&&	set ej=w
    set ak=p&&	set bp=k&&	set ck=p&& 	set dp=q&&	set ek=x
    set al=o&& 	set bo=l&& 	set cl=o&& 	set do=r&& 	set el=y
    set am=n&&	set bn=m&& 	set cm=n&& 	set dn=s&&	set em=z
    set an=m&& 	set bm=n&& 	set cn=m&& 	set dm=t&&	set en=a
    set ao=l&& 	set bl=o&& 	set co=l&& 	set dl=u&& 	set eo=b
    set ap=k&& 	set bk=p&& 	set cp=k&& 	set dk=v&& 	set ep=c
    set aq=j&& 	set bj=q&& 	set cq=j&& 	set dj=w&& 	set eq=d
    set ar=i&& 	set bi=r&& 	set cr=i&& 	set di=x&& 	set er=e
    set as=h&& 	set bh=s&&	set cs=h&& 	set dh=y&&	set es=f
    set at=g&& 	set bg=t&& 	set ct=g&& 	set dg=z&&	set et=g
    set au=f&& 	set bf=u&& 	set cu=f&& 	set df=a&& 	set eu=h
    set av=e&& 	set be=v&& 	set cv=e&& 	set de=b&&	set ev=i
    set aw=d&& 	set bd=w&&	set cw=d&&	set dd=c&&	set ew=j
    set ax=c&& 	set bc=x&& 	set cx=c&&	set dc=d&&	set ex=k
    set ay=b&& 	set bb=y&& 	set cy=b&&	set db=e&&	set ey=l
    set az=a&& 	set ba=z&& 	set cz=a&& 	set da=f&& 	set ez=m
    REM ********************************************************************************************
    
    
    
    
    
    
    
    %av%%ax%%as%%al% %al%%bu%%es%
    %dq%%ci%%al%%ez%%ec%%dm% ~
    %ar%%es% NOT %bv%%bc%%ar%%ef%%dm% c:\a\ mkdir c:\a\
    %br%%da% %av%%**%%dx%%ah%%ag% c:\a\ del /q c:\a\*
    %cr%%cu% %cv%%ek%%br%%bh%%eg% c:\search.%ay%%bz%%cg% del c:\search.%by%%cz%%dm%
    %dx%%bu% %bv%%bc%%ar%%ef%%dm% c:\%ck%%dx%%ea%%at%5.%eg%%di%%cg% del c:\%ck%%dx%%ea%%at%5.%dm%%**%%bg%
    cls
    %av%%ax%%as%%al%.
    %cv%%dd%%eu%%eb%.
    %bv%%bx%%bs%%cl%.
    %er%%ep%%as%%dr%     TYPE IN THE STARTING %cr%%bk% ADDRESS - EX: *27.0.0.*
    %av%%ax%%as%%al%.
    %er%%ep%%as%%dr%.
    
    %ah%%er%%ag% /p %ar%%ck%=
    %bh%%db%%bg% %ev%%dq%=%ip%.
    
    %ch%%cv%%cg% /a ipcount=0
    
    :IP
    %dn%%bv%%dm% /a ipcount=%ipcount%+*
    
    %ar%%es% %ipcount% %av%%ed%%bf% 5 GOTO :IPFINISH
    
    %ev%%au% %ip:~*,*% %bv%%dp%%cf% . %ah%%er%%ag% value=%ip:~0,*%&& %ef%%av%%eg% ip=%ip:~2% && goto :IPCHOP
    %br%%da% %ip:~2,*% %cv%%cj%%dl% . %bh%%db%%bg% value=%ip:~0,2%&& %ch%%cv%%cg% ip=%ip:~*% && goto :IPCHOP
    %ar%%es% %ip:~*,*% %db%%bj%%eh% . %ah%%er%%ag% value=%ip:~0,*%&& %dn%%bv%%dm% ip=%ip:~4% && goto :IPCHOP
    
    :IPCHOP 
    
    %cr%%cu% %ipcount% %er%%aj%%af% * %ef%%av%%eg% one=%value%&& goto :%ar%%ck%
    %dx%%bu% %ipcount% %av%%ed%%bf% 2 %bh%%db%%bg% two=%value%&& goto :%ev%%dq%   
    %ev%%au% %ipcount% %bv%%dp%%cf% * %ah%%er%%ag% three=%value%&& goto :%dx%%ak%
    %ar%%es% %ipcount% %cv%%cj%%dl% 4 %ch%%cv%%cg% four=%value%&& goto :%cr%%bk%    
    
    
    :IPFINISH
    
    %dn%%bv%%dm% w=%one%
    %ef%%av%%eg% x=%two%
    %ah%%er%%ag% y=%three%
    %bh%%db%%bg% z=%four%
    
    %av%%ax%%as%%al% %ch%%cv%%cg% %cr%%bk%=%one%.%two%.%three%.%four%>> c:\search.%cy%%df%%eg%
    
    type c:\search.%cg%%bc%%ag% >> c:\search.%de%%en%%ag%
    start c:\search.%eo%%az%%bg%
    
    
    :*0
    
    %dn%%bv%%dm% %ev%%ak%%bz%%cw%%dc%=%w%.%x%.%y%.%z%
    cls
    %cv%%dd%%eu%%eb% %ipadd%
    
    %ck%%dx%%ea%%at% -n * -l *0 -f -w * %w%.%x%.%y%.%z% >> c:\%ck%%dx%%ea%%at%5.%bg%%ac%%eg%
    %es%%ar%%bm%%cw%%dn%%eg%%ee% "Reply" c:\%ck%%dx%%ea%%at%5.%ag%%ek%%eg%
    %br%%da% %errorlevel% %db%%bj%%eh% 0 GOTO :NETVIEW
    
    %bv%%bx%%bs%%cl% BLANK >> c:\a\%dk%%ev%%av%%bd%%w%.%x%.%y%.%z%.%eg%%di%%cg%
    del c:\%ck%%dx%%ea%%at%5.%dm%%**%%bg%
    
    
    :IPCOUNTER
    %ah%%er%%ag% /a count=%count%+*
    
    %cr%%cu% %w% %er%%aj%%af% 255 %dx%%bu% %x% %av%%ed%%bf% 255 %ar%%es% %y% %bv%%dp%%cf% 255 %ev%%au% %z% %cv%%cj%%dl% 255 (%ef%%av%%eg% w=0&& %bh%%db%%bg% x=0&& %ch%%cv%%cg% y=0&& %ah%%er%%ag% z=0&& goto :*0)
    %br%%da% %x% %db%%bj%%eh% 255 %cr%%cu% %y% %er%%aj%%af% 255 %ar%%es% %z% %av%%ed%%bf% 255 (%dn%%bv%%dm% /a w=%w%+*&& %ef%%av%%eg% x=0&& %bh%%db%%bg% y=0&& %ch%%cv%%cg% z=0&& goto :*0)
    %dx%%bu% %y% %bv%%dp%%cf% 255 %ev%%au% %z% %cv%%cj%%dl% 255 (%dn%%bv%%dm% /a x=%x%+*&& %ah%%er%%ag% y=0&& %ef%%av%%eg% z=0&& goto :*0)
    %br%%da% %z% %db%%bj%%eh% 255 (%bh%%db%%bg% /a y=%y%+*&& %ch%%cv%%cg% z=0&& goto :*0)
    %dn%%bv%%dm% /a z=%z%+*&& GOTO :*0
    
    
    :NETVIEW
    del c:\%ck%%dx%%ea%%at%5.%cg%%bc%%ag%
    %er%%ep%%as%%dr% ^e^cho %al%%bu%%es% >> c:\a\%dk%%ev%%av%%bd%%w%.%x%.%y%.%z%.%ay%%bz%%cg%
    %av%%ax%%as%%al% %ds%%er%%ag% %dk%%ev%%av%%bd% \\%w%.%x%.%y%.%z% ^>^> c:\a\%dk%%ev%%av%%bd%%w%.%x%.%y%.%z%*.%bg%%ac%%eg% >> c:\a\%dk%%ev%%av%%bd%%w%.%x%.%y%.%z%.%by%%cz%%dm%
    %cv%%dd%%eu%%eb% type c:\a\%dk%%ev%%av%%bd%%w%.%x%.%y%.%z%*.%ag%%ek%%eg% ^>^> c:\a\%dk%%ev%%av%%bd%%w%.%x%.%y%.%z%.%eg%%di%%cg% >> c:\a\%dk%%ev%%av%%bd%%w%.%x%.%y%.%z%.%cy%%df%%eg%
    %er%%ep%%as%%dr% exit >> c:\a\%dk%%ev%%av%%bd%%w%.%x%.%y%.%z%.%de%%en%%ag%
    start c:\a\%dk%%ev%%av%%bd%%w%.%x%.%y%.%z%.%eo%%az%%bg%
    
    GOTO :IPCOUNTER
    A file Hackme.txt will be created on your desktop with the runtime results.
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  13. #13
    carlo Guest

    How?

    How do you get it to scan for viruses?

    Thanks

    Carlo

  14. #14
    Join Date
    Jan 2005
    Posts
    623
    I wrote the program to scan for only the Major Viruses. Beagle, Sasser, Netsky, etc.

    I was the admin of the entire network of win2k computers. Keeping in mind that each worm drops specific files on your computer, each IP would get checked for \\w.x.y.z\c$\winnt\system*2\VIRUS.exe (or whatever the path of the virus file(s) might be.) I had about 50 virus files being checked for.

    If it found a virus it would write it to a text file: Virus & IP address

    It scanned the entire network of about 400 computers in 5 minutes max. Knowing the users would probably not scan their computers i wrote the script. I later added on Yahoo Messenger, AIM, Kazza, etc...

    Its a great script if you like to monitor your network for unwanted programs or files. You can use it for so many different helpful reasons ~ updates, computer count, OS checks, viruses, spyware.
    Last edited by SyntaXmasteR; 09-02-2005 at 02:13 PM.
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

  15. #15
    Join Date
    Sep 2005
    Posts
    5

    batch scripts

    Hi, great site.

    Any chance you could explain in a little more detail for us noobs out here, EXACTLY, what to do with these scripts.

    Where to paste, save etc

    Many thanks

    Wayne

Closed Thread

Similar Threads

  1. Syntax******
    By Whitecrow in forum Internet Privacy
    Replies: 1
    Last Post: 11-16-2005, 04:38 PM
  2. Syntax******
    By Whitecrow in forum Internet Privacy
    Replies: 7
    Last Post: 04-06-2005, 04:17 PM
  3. Port 445 - Batch Script
    By Unregistered in forum Internet Privacy
    Replies: 2
    Last Post: 01-12-2005, 04:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts