Advertisement
Guest User

Untitled

a guest
May 11th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.13 KB | None | 0 0
  1. @echo off
  2.  
  3.  
  4.  
  5. setlocal enabledelayedexpansion
  6. if /i "%1"=="SecondWindow" goto SecondWindow
  7. goto Start
  8.  
  9. :Process_Options
  10. for /f "tokens=1* delims=~" %%I in ("!data!") do (
  11. echo %%I | find /i "ConversationDirectory" >nul
  12. if /i !errorlevel!==0 set Convdir=%%J& exit /b
  13. )
  14.  
  15. for /f "tokens=1* delims=~" %%I in ("!data!") do (
  16. echo %%I | find /i "SavePath" >nul
  17. if /i !errorlevel!==0 set SavePath=%%J& exit /b
  18. )
  19.  
  20. for /f "tokens=1* delims=~" %%I in ("!data!") do (
  21. echo %%I | find /i "DoubleWindow" >nul
  22. if /i !errorlevel!==0 set DoubleWindow=%%J& exit /b
  23. )
  24.  
  25.  
  26. :start
  27. for /f "delims=" %%I in ("%0") do set ProgFilePath=%%~sI
  28. if not exist chatencode.ini set DoubleWindow=1& goto Fileusername
  29.  
  30. set counterE=0
  31. for /f "skip=1 delims=" %%I in (Chatencode.ini) do (set data=%%I& call :Process_Options)
  32.  
  33. :Fileusername
  34.  
  35. title ChatEncode
  36.  
  37. set Fileusername=
  38. echo Enter your username.
  39. set /p Fileusername=
  40. if not defined Fileusername cls& goto Fileusername
  41. if /i "%Fileusername%"==" " goto Fileusername
  42.  
  43.  
  44. :choice
  45.  
  46. msg * This Program is Copyrighted by ScrewTheLotOfYou and Cryzo
  47. msg * For the sake of some dignity please dont change this code and claim it yours
  48.  
  49.  
  50. title ChatEncode
  51. echo.
  52. echo Enter the number of your choice.
  53. echo.
  54. echo 1. Start Conversation
  55. echo 2. Join Conversation
  56. echo 3. Options
  57. echo 4. Single Encode
  58. echo 5. Single Decode
  59. echo 6. Delete Conversations
  60. echo 7. Credits
  61. set choice=
  62. set /p choice=
  63. if not defined choice cls& goto choice
  64. if /i "%choice%"==" " cls& goto choice
  65. set choice=%choice:~0,1%
  66. if /i not %choice% geq 1 cls& goto choice
  67. if /i not %choice% leq 7 cls& goto choice
  68.  
  69. goto choice%choice%
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85. :choice1
  86. Title Start a conversation
  87. echo.
  88. echo.
  89. echo.
  90. echo Choose type of session (in !convdir!).
  91. echo.
  92. echo 1. Public conversation (Anyone can join or read)
  93. echo 2. Encrypted conversation (Can only be read or joined with correct password)
  94. echo.
  95. echo Or change the directory.
  96. echo 3. Change the conversation directory. (Current is !convdir!)
  97. set choice=
  98. set /p choice=
  99. echo.
  100. if not defined choice cls& goto choice1
  101. if /i "%choice%"==" " cls& goto choice1
  102. set choice=%choice:~0,1%
  103. if /i not %choice% geq 1 cls& goto choice1
  104. if /i not %choice% leq 3 cls& goto choice1
  105. goto choice1-%choice%
  106.  
  107.  
  108. :choice1-1
  109.  
  110. :Conversationsetup
  111. set /a counter1=counter1
  112. set timestart=%time:~0,-3%
  113. set timestart=%timestart::=.%
  114. if /i "%time:~0,1%"==" " set timestart=0%timestart:~1%
  115. if exist !convdir!\ChatEncode%counter1%* (
  116. set /a counter1= !counter1! + 1
  117. goto conversationsetup
  118. )
  119.  
  120. set conversationpath=!convdir!\ChatEncode!counter1!_%date:/=-%_%timestart%.log
  121.  
  122. set message=Members: %Fileusername%
  123. if defined encryptedconvo (
  124. set encodedmessage=
  125. call :startencode
  126. set message=!encodedmessage!
  127. set encodedmessage=
  128. )
  129.  
  130. >!conversationpath! echo %message%
  131. title !Conversationpath!
  132. echo.
  133. echo.
  134. echo Conversation set up: !conversationpath!
  135. echo.
  136. echo.
  137. echo Waiting for other participants...
  138.  
  139. set message=Members: %Fileusername%,
  140.  
  141. if defined encryptedconvo (
  142. set encodedmessage=
  143. call :startencode
  144. set message=!encodedmessage!
  145. set encodedmessage=
  146. )
  147.  
  148. :nonewmembersyet
  149. type "!conversationpath!" | find /i "%message%" >nul
  150. if %errorlevel% neq 0 goto nonewmembersyet
  151. set tokenoffset=3
  152. set usernumber=2
  153. for /f "delims=" %%I in (!conversationpath!) do set message=%%I
  154. if defined encryptedconvo (
  155. set decodedmessage=
  156. set encodedmessage=!message!
  157. call :startdecode
  158. set message=!decodedmessage!
  159. )
  160. echo.
  161. echo.
  162. echo.
  163. echo %message%
  164.  
  165. if defined DoubleWindow (
  166. start cmd /k !ProgFilePath! Secondwindow !Conversationpath! %encryptedconvo%
  167. goto FirstWindow
  168. )
  169. goto Unencrypted_Conversation
  170.  
  171.  
  172.  
  173.  
  174.  
  175. :Choice1-2
  176. call :setupencoding
  177. set EncryptedConvo=1
  178. goto conversationsetup
  179.  
  180.  
  181. :choice1-3
  182. call :Set_Temp_Path
  183. goto choice1
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190. :choice2
  191. title Join a conversation
  192. echo.
  193. echo.
  194. echo Select conversation location.
  195. echo.
  196. echo 1. !convdir!
  197. echo 2. Other
  198. set choice=
  199. set /p choice=
  200. echo.
  201. if not defined choice cls& goto choice2
  202. if /i "%choice%"==" " cls& goto choice2
  203. set choice=%choice:~0,1%
  204. if /i not %choice% geq 1 cls& goto choice2
  205. if /i not %choice% leq 2 cls& goto choice2
  206. goto choice2-%choice%
  207.  
  208.  
  209. :choice2-1
  210. echo.
  211. echo.
  212. echo Choose type of existing session.
  213. echo.
  214. echo 1. Public conversation
  215. echo 2. Encrypted conversation
  216. echo.
  217. set choice=
  218. set /p choice=
  219. echo.
  220. if not defined choice cls& goto choice2-1
  221. if /i "%choice%"==" " cls& goto choice2-1
  222. set choice=%choice:~0,1%
  223. if /i not %choice% geq 1 cls& goto choice2-1
  224. if /i not %choice% leq 2 cls& goto choice2-1
  225. goto choice2-1-%choice%
  226.  
  227. :choice2-2
  228. call :Set_Temp_Path
  229. goto choice2-1
  230.  
  231. :choice2-1-2
  232. call :setupencoding
  233. set EncryptedConvo=1
  234. goto join_conversation
  235.  
  236.  
  237. :choice2-1-1
  238. set encryptedconvo=
  239.  
  240.  
  241. :Join_Conversation
  242. setlocal enabledelayedexpansion
  243. set counterQ=0
  244. set count=0
  245. for %%I in (!convdir!\ChatEncode*) do set /a count= !count! + 1
  246.  
  247. title Currently open conversations
  248.  
  249. echo If the members in a conversation aren't shown, your encoding settings are wrong for that conversation.
  250. echo.
  251.  
  252. if /i %count%==0 (echo No conversations here.& pause>nul& cls& goto choice2)
  253. if /i %count%==1 (
  254. echo There is 1 open conversation:
  255. echo.
  256. ) else (
  257. echo There are %count% open conversations:
  258. echo.
  259. )
  260.  
  261.  
  262. set MemberMessage=Members:
  263. if defined encryptedconvo (
  264. set message=Members:
  265. set encodedmessage=
  266. call :startencode
  267. set MemberMessage=!encodedmessage!
  268. set encodedmessage=
  269. )
  270. for %%I in (!convdir!\ChatEncode*) do set /a counterQ= !CounterQ! + 1& echo Conversation Number !counterQ!. %%~nI& set openconvpath=%%~sI& call :JoinUnencryptedMembers
  271. echo.
  272. echo.
  273. echo Enter number of desired conversation or press enter to refresh.
  274. echo.
  275. set choice=
  276. set /p choice=
  277. echo.
  278.  
  279. if not defined choice cls& goto choice2-1-1
  280. if /i "%choice%"==" " cls& goto choice2-1-1
  281. set choice=%choice:~0,1%
  282. if /i not %choice% geq 1 cls& goto choice2-1
  283. if /i not %choice% leq %counterQ% cls& goto choice2-1-1
  284. set conversationpath=!openconv%choice%!
  285.  
  286. set skipthisone=1
  287. type "!conversationpath!" | find /v /i "%Membermessage%" >!conversationpath!.temp
  288.  
  289. set counterB=0
  290. for /f "delims=" %%I in ('type "!openconvpath!"') do set /a counterB= !counterB! + 1& set ConvoData!counterB!=%%I& set memberline=%convodata1%
  291.  
  292. set message=, %Fileusername%
  293.  
  294. if defined encryptedconvo (
  295. set encodedmessage=
  296. call :startencode
  297. set message=!encodedmessage!
  298. set encodedmessage=
  299. )
  300.  
  301. >!conversationpath!.temp2 echo %memberline%%message%
  302.  
  303. set memberline=
  304. set message=
  305.  
  306. >!conversationpath! type "!conversationpath!.temp2"
  307. >>!conversationpath! type "!conversationpath!.temp"
  308.  
  309. del !conversationpath!.temp2
  310. del !conversationpath!.temp
  311. set message=~~~User %Fileusername% Joined Conversation [%time:~0,-3%]
  312.  
  313. if defined encryptedconvo (
  314. set encodedmessage=
  315. call :startencode
  316. set message=!encodedmessage!
  317. set encodedmessage=
  318. )
  319. >>!conversationpath! echo !message!
  320.  
  321. if defined DoubleWindow (
  322. start cmd /c !ProgFilePath! Secondwindow !Conversationpath! %encryptedconvo%
  323. goto FirstWindow
  324. )
  325.  
  326. goto Unencrypted_Conversation
  327.  
  328.  
  329. :JoinUnencryptedMembers
  330. if defined encryptedconvo (
  331. set decodedmessage=
  332. set encodedmessage=
  333. )
  334.  
  335. set CounterL=0
  336.  
  337. for /f "delims=" %%I in ('type "!openconvpath!"') do set /a counterL= !counterL! + 1& set ConvoData!counterL!=%%I
  338. for /f "delims=" %%I in ("!convodata1!") do set ConvoData=%%I
  339.  
  340. if defined encryptedconvo (
  341. set encodedmessage=!Convodata!
  342. set decodedmessage=
  343. call :startdecode
  344. echo !decodedmessage! | find /i "members"
  345. set decodedmessage=
  346. ) ELSE (
  347. echo !Convodata! | Find /i "members"
  348. )
  349.  
  350.  
  351. echo.
  352. set openconv%counterQ%=!openconvpath!
  353. exit /b
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375. :makedirectory
  376. echo Directory not found, create directory?
  377. set /p yesno=
  378. echo.
  379. if not defined yesno goto makedirectory
  380. if /i NOT "%yesno:~0,1%"=="Y" (goto choice3%numbertwo%) ELSE for /f "delims=" %%I in ("!%workpath%!") do mkdir %%I
  381. exit /b
  382.  
  383.  
  384. :Choice3
  385. title Options
  386. echo.
  387. echo.
  388. echo Use the DoubleWindow feature? [Y/N] (Type HELP for help)
  389. set yesno=
  390. set /p yesno=
  391. if not defined yesno goto :choice3
  392. if /i "!yesno!"=="HELP" (
  393. echo.
  394. echo The DoubleWindow feature is on by default. This option makes the session
  395. echo appear in two windows, one window for the conversation and one window
  396. echo for you to enter your messages in. Without this feautre enabled, there
  397. echo is only be one window, but you must refresh to recieve messages
  398. echo [by pressing return]
  399. echo Having DoubleWindow disabled means you can't recieve messages in real time,
  400. echo they will only show when you press enter.
  401. goto choice3
  402. )
  403.  
  404.  
  405. if /i "%yesno:~0,1%"=="Y" (set DoubleWindow=1) else (set Errors=1)
  406. if /i "%yesno:~0,1%"=="N" (set DoubleWindow=) else (set /a errors= %errors% + 1)
  407. if /i "%errors%"=="2" goto choice3
  408.  
  409.  
  410. :DW_YesNo
  411. echo Save this settings for next time? (Y/N)
  412. set /p yesno=
  413. echo.
  414.  
  415. if not defined yesno goto DW_YesNo
  416. if /i "%yesno:~0,1%" neq "Y" goto DW_No
  417.  
  418. if not exist ChatEncode.ini (
  419. >Chatencode.ini echo ***ChatEncode Options***
  420. )
  421. attrib "Chatencode.ini" -s -h -r
  422.  
  423. type Chatencode.ini | find /i /v "DoubleWindow~" >Chatencode.ini.temp
  424. type Chatencode.ini.temp >Chatencode.ini
  425. del Chatencode.ini.temp
  426.  
  427. >>Chatencode.ini echo.
  428. >>Chatencode.ini echo DoubleWindow~%doublewindow%
  429. attrib "Chatencode.ini" +s +h +r
  430. echo Options Saved.
  431.  
  432.  
  433.  
  434.  
  435. :Dw_No
  436.  
  437.  
  438.  
  439. call :Set_Temp_Path
  440.  
  441. echo.
  442.  
  443. call :Set_Save_Path
  444.  
  445. for /l %%I in (1,1,10) do echo.
  446.  
  447. goto choice
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464. :Set_Temp_Path
  465. echo.
  466. echo.
  467. echo Enter conversation temp path (Must be a path that all participants can access)
  468. echo.
  469. set choice=
  470. set /p choice=
  471. echo.
  472. for /f "delims=" %%I in ("%choice%") do set choice=%%~I
  473. if not defined choice cls& goto choice3
  474. if /i "%choice%"==" " cls& goto choice3
  475. for /f "delims=" %%I in ('echo "%choice%"') do set choice=%%I
  476. for /f "delims=" %%I in ("%choice:"=%") do set convdir=%%~sI
  477. for /f "delims=" %%I in ("%convdir%") do set convdir=%%~sI
  478. set workpath=Convdir
  479. set numbertwo=
  480. if not exist !convdir! (call :makedirectory)
  481. echo Directory Assigned.
  482.  
  483. :STP_YesNo
  484.  
  485. echo Save these settings for next time? (Y/N)
  486. set /p yesno=
  487. echo.
  488. if not defined yesno goto STP_YesNo
  489. if /i not "%yesno:~0,1%"=="Y" (exit /b)
  490.  
  491. if not exist ChatEncode.ini (
  492. >Chatencode.ini echo ***ChatEncode Options***
  493. )
  494. attrib "Chatencode.ini" -s -h -r
  495.  
  496. type Chatencode.ini | find /i /v "conversationDirectory~" >Chatencode.ini.temp
  497. type Chatencode.ini.temp >Chatencode.ini
  498. del Chatencode.ini.temp
  499.  
  500. >>Chatencode.ini echo.
  501. >>Chatencode.ini echo ConversationDirectory~!Convdir!
  502. attrib "Chatencode.ini" +s +h +r
  503. echo Options Saved.
  504.  
  505.  
  506. exit /b
  507.  
  508.  
  509. :Set_Save_Path
  510. echo Enter conversation save path (For when you want a personal copy saved to your computer)
  511. echo.
  512. set choice=
  513. set /p choice=
  514. echo.
  515. for /f "delims=" %%I in ("%choice%") do set choice=%%~I
  516. if not defined choice cls& goto choice3-2
  517. if /i "%choice%"==" " cls& goto choice3-2
  518. for /f "delims=" %%I in ('echo "%choice%"') do set choice=%%I
  519. for /f "delims=" %%I in ("%choice:"=%") do set savepath=%%~sI
  520. for /f "delims=" %%I in ("%savepath%") do set savepath=%%~sI
  521. set workpath=Savepath
  522. set numbertwo=-2
  523. if not exist !savepath! (call :makedirectory)
  524. echo Directory Assigned.
  525.  
  526.  
  527. :SSP_YesNo
  528.  
  529. echo Save these settings for next time? (Y/N)
  530. set /p yesno=
  531. echo.
  532. if not defined yesno goto SSP_YesNo
  533. if /i not "%yesno:~0,1%"=="Y" (exit /b)
  534.  
  535. if not exist ChatEncode.ini (
  536. >Chatencode.ini echo ***ChatEncode Options***
  537. )
  538. attrib "Chatencode.ini" -s -h -r
  539.  
  540. type Chatencode.ini | find /i /v "SavePath~" >Chatencode.ini.temp
  541. type Chatencode.ini.temp >Chatencode.ini
  542. del Chatencode.ini.temp
  543.  
  544. >>Chatencode.ini echo.
  545. >>Chatencode.ini echo SavePath~!SavePath!
  546. attrib "Chatencode.ini" +s +h +r
  547. echo Options Saved.
  548.  
  549.  
  550.  
  551. exit /b
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566. :choice5
  567. title Decode Message
  568. call :setupencoding
  569. set countera=-1
  570. set counterc=-1
  571.  
  572. :choice5-Decode
  573. echo Enter Message To Decode:
  574. set encodedmessage=
  575. set /p encodedmessage=
  576. echo.
  577. echo Decoded message:
  578. echo.
  579. set decodedmessage=
  580. call :Startdecode
  581. echo "%decodedmessage%"
  582. echo.
  583. echo.
  584. echo.
  585. echo.
  586. echo.
  587. echo.
  588. :DM_YesNo
  589. echo Encode another message with these encoding setting? (Y/N)
  590. set yesno=
  591. set /p yesno=
  592. echo.
  593. if not defined yesno goto DM_YesNo
  594. if /i not "%yesno:~0,1%"=="Y" (
  595. call :clearup_encoding
  596. )
  597. goto Choice5-Decode
  598.  
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614. :choice4
  615. Title Encode Message
  616. set countera=-1
  617. set counterc=-1
  618. call :setupencoding
  619. echo Encoding Ready!
  620.  
  621. :choice4-Encode
  622. echo.
  623. echo.
  624. echo Enter Message To Encode:
  625. set message=
  626. set /p message=
  627. echo.
  628. echo.
  629. echo.
  630. set encodedmessage=
  631. call :startencode
  632. echo Your message encoded is:
  633. echo.
  634. echo %encodedmessage%
  635. echo.
  636. echo.
  637. echo.
  638. echo.
  639. echo.
  640. echo.
  641. echo.
  642. echo.
  643. pause
  644. echo.
  645. echo.
  646. echo.
  647. echo Your decoded message will look like this:
  648. echo.
  649. set decodedmessage=
  650. call :Startdecode
  651. echo "%decodedmessage%"
  652. echo.
  653. echo.
  654. echo.
  655. echo.
  656. echo.
  657. echo.
  658. :EM_YesNo
  659. echo Encode another message with these encoding setting? (Y/N)
  660. set /p yesno=
  661. echo.
  662. if not defined yesno goto EM_YesNo
  663. if /i not "%yesno:~0,1%"=="Y" (
  664. call :clearup_encoding
  665. )
  666. goto Choice4-Encode
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673. :Choice6
  674. Title Delete conversations
  675. echo. Delete all conversations where?
  676. echo.
  677. echo 1. !Convdir!
  678. echo 2. Other
  679. echo.
  680. echo 3. Return to menu
  681. set choice=
  682. set /p choice=
  683. echo.
  684. if not defined choice cls& goto choice6
  685. if /i "!choice!"==" " cls& goto choice6
  686. set choice=!choice:~0,1!
  687. if /i not !choice! geq 1 cls& goto choice6
  688. if /i not !choice! leq 3 cls& goto choice6
  689.  
  690. if /i !choice! equ 3 goto Choice
  691.  
  692. goto choice6-%choice%
  693.  
  694. :choice6-1
  695. for %%I in (!Convdir!\ChatEncode*) do echo Deleting %%I& del %%I
  696. goto choice
  697.  
  698.  
  699. :choice6-2
  700. echo.
  701. echo Enter the directory of the conversations you wish to delete or type /Back to cancel
  702. set /p choice=
  703. echo.
  704. if /i "!choice!"=="/Back" goto choice
  705.  
  706. for /f "delims=" %%I in ("%choice%") do set choice=%%~I
  707. if not defined choice cls& goto choice6-2
  708. if /i "%choice%"==" " cls& goto choice6-2
  709. for /f "delims=" %%I in ('echo "%choice%"') do set choice=%%I
  710. for /f "delims=" %%I in ("%choice:"=%") do set tempdel=%%~sI
  711. for /f "delims=" %%I in ("!tempdel!") do set tempdel=%%~sI
  712.  
  713. if NOT exist !tempdel! echo Directory does not exist.& goto choice6
  714. )
  715. set CounterV=0
  716. for %%I in (!TempDel!\ChatEncode*.log) do set /a CounterV= !counterv! + 1
  717. if /i %counterv%==1 (echo 1 Conversation found.& goto choice) else (Echo %counterv% conversations found.)
  718. for %%I in (!TempDel!\ChatEncode*.log) do echo Deleting %%I& del %%I
  719.  
  720. goto choice
  721.  
  722.  
  723.  
  724. :choice7
  725. echo Written, developed, tested, debugged by ScrewTheLotOfYou and Cryzo.
  726. echo Any comments, questions or suggestions would be appreciated
  727. echo Contact us at
  728. echo youtube.com/ScrewTheLotOfYou
  729. echo youtube.com/CryzoDotCom
  730. pause
  731. goto Choice
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738. :Unencrypted_Conversation
  739. title !Conversationpath!
  740. set lineoffset=2
  741. echo Enter your message or press enter to refresh.
  742. echo Enter /Exit to quit.
  743. if defined skipthisone (
  744. echo Press enter to join this conversation.
  745. set skipthisone=
  746. )
  747. for /L %%I in (1,1,21) do echo.
  748.  
  749.  
  750. :Unencrypted_StartSpeaking
  751.  
  752. set gotnewmsg=
  753. set newmessagecount=0
  754. set testmessagecount=0
  755. set usermessage=
  756.  
  757. set /p usermessage=
  758.  
  759. if defined usermessage echo.
  760.  
  761. if not exist !conversationpath! cls& echo Conversation Deleted...& pause& goto choice
  762. if /i "%usermessage%"=="/exit" goto Unencrypted_Exit
  763. for /f "skip=%lineoffset% delims=" %%I in (!conversationpath!) do (
  764. set /a newmessagecount= !newmessagecount! + 1
  765. set newmessage!newmessagecount!=%%I
  766. call :foundmessages
  767. )
  768.  
  769. if messagefailed==1 (
  770. set messagefailed=
  771. goto unencrypted_NoNewMessages
  772. )
  773. goto Unencrypted_MoreNewMessages
  774.  
  775. :foundmessages
  776. if defined encryptedconvo call :decryptfoundmessages
  777. echo "!newmessage%newmessagecount%!" | find /i "~" >nul
  778. if /i %errorlevel% neq 0 set messagefailed=1
  779. exit /b
  780.  
  781. :decryptfoundmessages
  782. set encodedmessage=
  783. set encodedmessage=!newmessage%newmessagecount%!
  784. set decodedmessage=
  785. call :startdecode
  786. for /f "delims=" %%I in ("%decodedmessage%") do set newmessage!newmessagecount!=%%I
  787. exit /b
  788.  
  789.  
  790.  
  791.  
  792. :Unencrypted_MoreNewMessages
  793. if /i %testmessagecount% equ %newmessagecount% goto Unencrypted_NoNewMessages
  794. set /a testmessagecount= !testmessagecount! + 1
  795.  
  796. echo "!newmessage%testmessagecount%!" | find /i "~~~User " >nul
  797.  
  798. if /i !errorlevel! equ 0 (
  799. echo !newmessage%testmessagecount%!
  800. set /a lineoffset= !lineoffset! + 1
  801. goto Unencrypted_MoreNewMessages
  802. )
  803.  
  804. for /f "tokens=1,* delims=~" %%I in ("!newmessage%testmessagecount%!") do set nameofspeaker=%%I& set sortedmessage=%%J
  805. set newmessage%testmessagecount%=
  806. echo !nameofspeaker! says:
  807. echo !sortedmessage:~1!
  808. echo.
  809. set /a lineoffset=!lineoffset! + 2
  810. if /i not %testmessagecount% equ %newmessagecount% goto Unencrypted_MoreNewMessages
  811.  
  812. :Unencrypted_NoNewMessages
  813.  
  814. if not defined usermessage goto Unencrypted_StartSpeaking
  815.  
  816. set message=%Fileusername% [%time:~0,-3%]~ !usermessage!
  817. if defined encryptedconvo (
  818. set encodedmessage=
  819. call :startencode
  820. set message=!encodedmessage!
  821. set encodedmessage=
  822. )
  823. >>!conversationpath! echo.
  824. >>!conversationpath! echo %message%
  825. set /a lineoffset= lineoffset + 2
  826.  
  827. goto Unencrypted_Startspeaking
  828.  
  829.  
  830. :Unencrypted_exit
  831. Echo Choose Option:
  832. echo 1. Exit and delete conversation
  833. echo 2. Exit and save conversation
  834. echo 3. Resume
  835. set choice=
  836. set /p choice=
  837. if not defined choice echo.& goto Unencrytped_exit
  838. if /i "%choice%"==" " echo.& goto Unencrytped_exit
  839. set choice=%choice:~0,1%
  840. if /i not %choice% geq 1 echo.& goto Unencrytped_exit
  841. if /i not %choice% leq 3 echo.& goto Unencrytped_exit
  842.  
  843. if %choice%==1 del "!conversationpath!"& cls& goto Choice
  844. if %choice%==2 copy "!conversationpath!" !Savepath!\%FileUsername%-%User1%-ChatEncode.log& cls& goto FileUsername
  845. if %choice%==3 goto unencrypted_startspeaking
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864. :Clearup_encoding
  865. set seconddecode=
  866. set encodedmessage=
  867. set decodedmessage=
  868. set counterI=
  869. set countery=
  870. set counterz=
  871. set counterx=
  872. set second_encode=
  873. for /L %%I in (0,1,257) do for /f %%K in ("!L%%I!") do set %%K=
  874. cls
  875. goto choice
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. :setupencoding
  899. echo How many layers of encryption to use? (Default=2) (Type HELP for help)
  900. echo.
  901. set choice=
  902. set /p choice=
  903. echo.
  904. if not defined choice set choice=2
  905. if /i "%choice%"==" " set choice=2
  906. if /i "%choice%"=="help" (
  907. echo.
  908. echo.
  909. echo More layers of encryption means data is much more secure and much
  910. echo harder to crack. However, each new layer doubles the size of the
  911. echo encoded message and makes encoding and decoding slower.
  912. echo A single character with 1 layer of encryption would be encrypted
  913. echo to two characters, With two layers it would come out as four, with
  914. echo three layers as eight etc.
  915. echo More layers means much more secure data, but larger files and
  916. echo slower encoding and decoding.
  917. echo The default number of layers is two, this is used if you enter nothing,
  918. echo The maximum is ten, which produces one kilobyte of code for each
  919. echo character.
  920. echo.
  921. echo.
  922. goto setupencoding
  923. )
  924. set choice=%choice:~0,2%
  925. if /i not %choice% geq 1 set choice=2
  926. if /i not %choice% leq 10 set choice=2
  927. set encodinglayers=%choice%
  928.  
  929. :askforpass
  930. echo Enter password to encode with (lowercase only)
  931. set password=
  932. set /p password=""
  933. echo.
  934. if not defined password cls& goto askforpass
  935. cls
  936.  
  937.  
  938.  
  939. set choice=
  940. echo Setting up encoding...
  941. echo.
  942. echo.
  943. echo.
  944.  
  945.  
  946. set countery=0
  947. :PEnumerator
  948. set Pchar%counterY%=!password:~%counterY%,1!
  949. if "!Pchar%counterY%!"=="" set /a counterY= %counterY% - 1& goto Usernumerator
  950. set /a counterY= !counterY! + 1
  951. goto Penumerator
  952.  
  953. :Usernumerator
  954. set /a counterz= counterz
  955. set Uchar%counterz%=!Fileusername:~%counterz%,1!
  956. if "!Uchar%counterz%!"=="" set /a counterz= %counterz% - 1& goto Enumdone
  957. set /a counterz= !counterz! + 1
  958. goto Usernumerator
  959.  
  960.  
  961. :enumdone
  962. for /f %%I in ("(") do set L0=%%I
  963. for /f %%I in (")") do set L1=%%I
  964. for /f %%I in ("*") do set L2=%%I
  965. for /f %%I in ("+") do set L3=%%I
  966. for /f %%I in (",") do set L4=%%I
  967. for /f %%I in ("-") do set L5=%%I
  968. for /f %%I in (".") do set L6=%%I
  969. for /f %%I in ("/") do set L7=%%I
  970. for /f %%I in ("0") do set L8=%%I
  971. for /f %%I in ("1") do set L9=%%I
  972. for /f %%I in ("2") do set L10=%%I
  973. for /f %%I in ("3") do set L11=%%I
  974. for /f %%I in ("4") do set L12=%%I
  975. for /f %%I in ("5") do set L13=%%I
  976. for /f %%I in ("6") do set L14=%%I
  977. for /f %%I in ("7") do set L15=%%I
  978. for /f %%I in ("8") do set L16=%%I
  979. for /f %%I in ("9") do set L17=%%I
  980. for /f %%I in (":") do set L18=%%I
  981. set L19=;
  982. for /f %%I in ("<") do set L20=%%I
  983. for /f %%I in ("equals") do set L21=%%I
  984. for /f %%I in (">") do set L22=%%I
  985. for /f %%I in ("?") do set L23=%%I
  986. for /f %%I in ("@") do set L24=%%I
  987. for /f %%I in ("a") do set L25=%%I
  988. for /f %%I in ("b") do set L26=%%I
  989. for /f %%I in ("c") do set L27=%%I
  990. for /f %%I in ("d") do set L28=%%I
  991. for /f %%I in ("e") do set L29=%%I
  992. for /f %%I in ("f") do set L30=%%I
  993. for /f %%I in ("g") do set L31=%%I
  994. for /f %%I in ("h") do set L32=%%I
  995. for /f %%I in ("i") do set L33=%%I
  996. for /f %%I in ("j") do set L34=%%I
  997. for /f %%I in ("k") do set L35=%%I
  998. for /f %%I in ("l") do set L36=%%I
  999. for /f %%I in ("m") do set L37=%%I
  1000. for /f %%I in ("n") do set L38=%%I
  1001. for /f %%I in ("o") do set L39=%%I
  1002. for /f %%I in ("p") do set L40=%%I
  1003. for /f %%I in ("q") do set L41=%%I
  1004. for /f %%I in ("r") do set L42=%%I
  1005. for /f %%I in ("s") do set L43=%%I
  1006. for /f %%I in ("t") do set L44=%%I
  1007. for /f %%I in ("u") do set L45=%%I
  1008. for /f %%I in ("v") do set L46=%%I
  1009. for /f %%I in ("w") do set L47=%%I
  1010. for /f %%I in ("x") do set L48=%%I
  1011. for /f %%I in ("y") do set L49=%%I
  1012. for /f %%I in ("z") do set L50=%%I
  1013. for /f %%I in ("[") do set L51=%%I
  1014. for /f %%I in ("\") do set L52=%%I
  1015. for /f %%I in ("]") do set L53=%%I
  1016. for /f %%I in ("_") do set L54=%%I
  1017. for /f %%I in ("`") do set L55=%%I
  1018. for /f %%I in ("POINTUP") do set L56=%%I
  1019. for /f %%I in ("b") do set L57=%%I
  1020. for /f %%I in ("c") do set L58=%%I
  1021. for /f %%I in ("d") do set L59=%%I
  1022. for /f %%I in ("e") do set L60=%%I
  1023. for /f %%I in ("f") do set L61=%%I
  1024. for /f %%I in ("g") do set L62=%%I
  1025. for /f %%I in ("h") do set L63=%%I
  1026. for /f %%I in ("i") do set L64=%%I
  1027. for /f %%I in ("j") do set L65=%%I
  1028. for /f %%I in ("k") do set L66=%%I
  1029. for /f %%I in ("l") do set L67=%%I
  1030. for /f %%I in ("m") do set L68=%%I
  1031. for /f %%I in ("n") do set L69=%%I
  1032. for /f %%I in ("o") do set L70=%%I
  1033. for /f %%I in ("p") do set L71=%%I
  1034. for /f %%I in ("q") do set L72=%%I
  1035. for /f %%I in ("r") do set L73=%%I
  1036. for /f %%I in ("s") do set L74=%%I
  1037. for /f %%I in ("t") do set L75=%%I
  1038. for /f %%I in ("u") do set L76=%%I
  1039. for /f %%I in ("v") do set L77=%%I
  1040. for /f %%I in ("w") do set L78=%%I
  1041. for /f %%I in ("x") do set L79=%%I
  1042. for /f %%I in ("y") do set L80=%%I
  1043. for /f %%I in ("z") do set L81=%%I
  1044. for /f %%I in ("{") do set L82=%%I
  1045. for /f %%I in ("|") do set L83=%%I
  1046. for /f %%I in ("}") do set L84=%%I
  1047. for /f %%I in ("~") do set L85=%%I
  1048. for /f %%I in ("") do set L86=%%I
  1049. for /f %%I in ("€") do set L87=%%I
  1050. for /f %%I in ("") do set L88=%%I
  1051. for /f %%I in ("‚") do set L89=%%I
  1052. for /f %%I in ("ƒ") do set L90=%%I
  1053. for /f %%I in ("„") do set L91=%%I
  1054. for /f %%I in ("…") do set L92=%%I
  1055. for /f %%I in ("†") do set L93=%%I
  1056. for /f %%I in ("‡") do set L94=%%I
  1057. for /f %%I in ("ˆ") do set L95=%%I
  1058. for /f %%I in ("‰") do set L96=%%I
  1059. for /f %%I in ("Š") do set L97=%%I
  1060. for /f %%I in ("‹") do set L98=%%I
  1061. for /f %%I in ("Œ") do set L99=%%I
  1062. for /f %%I in ("") do set L100=%%I
  1063. for /f %%I in ("Ž") do set L101=%%I
  1064. for /f %%I in ("") do set L102=%%I
  1065. for /f %%I in ("") do set L103=%%I
  1066. for /f %%I in ("‘") do set L104=%%I
  1067. for /f %%I in ("’") do set L105=%%I
  1068. for /f %%I in ("“") do set L106=%%I
  1069. for /f %%I in ("”") do set L107=%%I
  1070. for /f %%I in ("•") do set L108=%%I
  1071. for /f %%I in ("–") do set L109=%%I
  1072. for /f %%I in ("—") do set L110=%%I
  1073. for /f %%I in ("˜") do set L111=%%I
  1074. for /f %%I in ("™") do set L112=%%I
  1075. for /f %%I in ("š") do set L113=%%I
  1076. for /f %%I in ("›") do set L114=%%I
  1077. for /f %%I in ("œ") do set L115=%%I
  1078. for /f %%I in ("") do set L116=%%I
  1079. for /f %%I in ("ž") do set L117=%%I
  1080. for /f %%I in ("Ÿ") do set L118=%%I
  1081. for /f %%I in ("¡") do set L119=%%I
  1082. for /f %%I in ("¢") do set L120=%%I
  1083. for /f %%I in ("£") do set L121=%%I
  1084. for /f %%I in ("¤") do set L122=%%I
  1085. for /f %%I in ("¥") do set L123=%%I
  1086. for /f %%I in ("¦") do set L124=%%I
  1087. for /f %%I in ("§") do set L125=%%I
  1088. for /f %%I in ("¨") do set L126=%%I
  1089. for /f %%I in ("©") do set L127=%%I
  1090. for /f %%I in ("ª") do set L128=%%I
  1091. for /f %%I in ("«") do set L129=%%I
  1092. for /f %%I in ("¬") do set L130=%%I
  1093. for /f %%I in ("­") do set L131=%%I
  1094. for /f %%I in ("®") do set L132=%%I
  1095. for /f %%I in ("¯") do set L133=%%I
  1096. for /f %%I in ("°") do set L134=%%I
  1097. for /f %%I in ("±") do set L135=%%I
  1098. for /f %%I in ("²") do set L136=%%I
  1099. for /f %%I in ("³") do set L137=%%I
  1100. for /f %%I in ("´") do set L138=%%I
  1101. for /f %%I in ("µ") do set L139=%%I
  1102. for /f %%I in ("¶") do set L140=%%I
  1103. for /f %%I in ("·") do set L141=%%I
  1104. for /f %%I in ("¸") do set L142=%%I
  1105. for /f %%I in ("¹") do set L143=%%I
  1106. for /f %%I in ("º") do set L144=%%I
  1107. for /f %%I in ("»") do set L145=%%I
  1108. for /f %%I in ("¼") do set L146=%%I
  1109. for /f %%I in ("½") do set L147=%%I
  1110. for /f %%I in ("¾") do set L148=%%I
  1111. for /f %%I in ("¿") do set L149=%%I
  1112. for /f %%I in ("À") do set L150=%%I
  1113. for /f %%I in ("Á") do set L151=%%I
  1114. for /f %%I in ("Â") do set L152=%%I
  1115. for /f %%I in ("Ã") do set L153=%%I
  1116. for /f %%I in ("Ä") do set L154=%%I
  1117. for /f %%I in ("Å") do set L155=%%I
  1118. for /f %%I in ("Æ") do set L156=%%I
  1119. for /f %%I in ("Ç") do set L157=%%I
  1120. for /f %%I in ("È") do set L158=%%I
  1121. for /f %%I in ("É") do set L159=%%I
  1122. for /f %%I in ("Ê") do set L160=%%I
  1123. for /f %%I in ("Ë") do set L161=%%I
  1124. for /f %%I in ("Ì") do set L162=%%I
  1125. for /f %%I in ("Í") do set L163=%%I
  1126. for /f %%I in ("Î") do set L164=%%I
  1127. for /f %%I in ("Ï") do set L165=%%I
  1128. for /f %%I in ("Ð") do set L166=%%I
  1129. for /f %%I in ("Ñ") do set L167=%%I
  1130. for /f %%I in ("Ò") do set L168=%%I
  1131. for /f %%I in ("Ó") do set L169=%%I
  1132. for /f %%I in ("Ô") do set L170=%%I
  1133. for /f %%I in ("Õ") do set L171=%%I
  1134. for /f %%I in ("Ö") do set L172=%%I
  1135. for /f %%I in ("×") do set L173=%%I
  1136. for /f %%I in ("Ø") do set L174=%%I
  1137. for /f %%I in ("Ù") do set L175=%%I
  1138. for /f %%I in ("Ú") do set L176=%%I
  1139. for /f %%I in ("Û") do set L177=%%I
  1140. for /f %%I in ("Ü") do set L178=%%I
  1141. for /f %%I in ("Ý") do set L179=%%I
  1142. for /f %%I in ("Þ") do set L180=%%I
  1143. for /f %%I in ("ß") do set L181=%%I
  1144. for /f %%I in ("à") do set L182=%%I
  1145. for /f %%I in ("á") do set L183=%%I
  1146. for /f %%I in ("â") do set L184=%%I
  1147. for /f %%I in ("ã") do set L185=%%I
  1148. for /f %%I in ("ä") do set L186=%%I
  1149. for /f %%I in ("å") do set L187=%%I
  1150. for /f %%I in ("æ") do set L188=%%I
  1151. for /f %%I in ("ç") do set L189=%%I
  1152. for /f %%I in ("è") do set L190=%%I
  1153. for /f %%I in ("é") do set L191=%%I
  1154. for /f %%I in ("ê") do set L192=%%I
  1155. for /f %%I in ("ë") do set L193=%%I
  1156. for /f %%I in ("ì") do set L194=%%I
  1157. for /f %%I in ("í") do set L195=%%I
  1158. for /f %%I in ("î") do set L196=%%I
  1159. for /f %%I in ("ï") do set L197=%%I
  1160. for /f %%I in ("ð") do set L198=%%I
  1161. for /f %%I in ("ñ") do set L199=%%I
  1162. for /f %%I in ("ò") do set L200=%%I
  1163. for /f %%I in ("ó") do set L201=%%I
  1164. for /f %%I in ("ô") do set L202=%%I
  1165. for /f %%I in ("õ") do set L203=%%I
  1166. for /f %%I in ("ö") do set L204=%%I
  1167. for /f %%I in ("÷") do set L205=%%I
  1168. for /f %%I in ("ø") do set L206=%%I
  1169. for /f %%I in ("ù") do set L207=%%I
  1170. for /f %%I in ("ú") do set L208=%%I
  1171. for /f %%I in ("û") do set L209=%%I
  1172. for /f %%I in ("ü") do set L210=%%I
  1173. for /f %%I in ("ý") do set L211=%%I
  1174. for /f %%I in ("þ") do set L212=%%I
  1175. for /f %%I in ("ÿ") do set L213=%%I
  1176. for /f %%I in ("'") do set L214=%%I
  1177. for /f %%I in ("And") do set L215=%%I
  1178. for /f %%I in ("%%") do set L216=%%I
  1179. for /f %%I in ("$") do set L217=%%I
  1180. for /f %%I in ("#") do set L218=%%I
  1181. set L219=Quote
  1182. for /f %%I in ("!") do set L220=%%I
  1183. for /f %%I in ("§") do set L221=%%I
  1184. for /f %%I in ("¶") do set L222=%%I
  1185. for /f %%I in ("¤") do set L223=%%I
  1186. for /f %%I in ("£") do set L224=%%I
  1187. for /f %%I in ("Ø") do set L225=%%I
  1188. for /f %%I in ("×") do set L226=%%I
  1189. for /f %%I in ("ƒ") do set L227=%%I
  1190. for /f %%I in ("á") do set L228=%%I
  1191. for /f %%I in ("í") do set L229=%%I
  1192. for /f %%I in ("ó") do set L230=%%I
  1193. for /f %%I in ("ú") do set L231=%%I
  1194. for /f %%I in ("ñ") do set L232=%%I
  1195. for /f %%I in ("Ñ") do set L233=%%I
  1196. for /f %%I in ("ª") do set L234=%%I
  1197. for /f %%I in ("º") do set L235=%%I
  1198. for /f %%I in ("¿") do set L236=%%I
  1199. for /f %%I in ("®") do set L237=%%I
  1200. for /f %%I in ("¬") do set L238=%%I
  1201. for /f %%I in ("½") do set L239=%%I
  1202. for /f %%I in ("¼") do set L240=%%I
  1203. for /f %%I in ("¡") do set L241=%%I
  1204. for /f %%I in ("«") do set L242=%%I
  1205. for /f %%I in ("»") do set L243=%%I
  1206. for /f %%I in ("Á") do set L244=%%I
  1207. for /f %%I in ("Â") do set L245=%%I
  1208. for /f %%I in ("À") do set L246=%%I
  1209. for /f %%I in ("©") do set L247=%%I
  1210. for /f %%I in ("¢") do set L248=%%I
  1211. for /f %%I in ("¥") do set L249=%%I
  1212. for /f %%I in ("ã") do set L250=%%I
  1213. for /f %%I in ("Ã") do set L251=%%I
  1214. for /f %%I in ("¤") do set L252=%%I
  1215. for /f %%I in ("ð") do set L253=%%I
  1216. for /f %%I in ("Ð") do set L254=%%I
  1217. for /f %%I in ("Ê") do set L255=%%I
  1218. for /f %%I in ("Ë") do set L256=%%I
  1219. set L257=Space
  1220.  
  1221. set J0=qw
  1222. set J1=we
  1223. set J2=er
  1224. set J3=rt
  1225. set J4=ty
  1226. set J5=yu
  1227. set J6=io
  1228. set J7=op
  1229. set J8=as
  1230. set J9=sd
  1231. set J10=df
  1232. set J11=fg
  1233. set J12=gh
  1234. set J13=hj
  1235. set J14=jk
  1236. set J15=kl
  1237. set J16=zx
  1238. set J17=xc
  1239. set J18=cv
  1240. set J19=vb
  1241. set J20=bn
  1242. set J21=nm
  1243. set J22=qa
  1244. set J23=ws
  1245. set J24=ed
  1246. set J25=rf
  1247. set J26=tg
  1248. set J27=yh
  1249. set J28=uj
  1250. set J29=ik
  1251. set J30=ol
  1252. set J31=az
  1253. set J32=sx
  1254. set J33=dc
  1255. set J34=fv
  1256. set J35=gb
  1257. set J36=hn
  1258. set J37=jm
  1259. set J38=wa
  1260. set J39=es
  1261. set J40=rd
  1262. set J41=tf
  1263. set J42=yg
  1264. set J43=uh
  1265. set J44=ij
  1266. set J45=ok
  1267. set J46=pl
  1268. set J47=sz
  1269. set J48=dx
  1270. set J49=fc
  1271. set J50=gv
  1272. set J51=hb
  1273. set J52=jn
  1274. set J53=km
  1275. set J54=po
  1276. set J55=oi
  1277. set J56=iu
  1278. set J57=uy
  1279. set J58=yt
  1280. set J59=tr
  1281. set J60=re
  1282. set J61=ew
  1283. set J62=wq
  1284. set J63=lk
  1285. set J64=kj
  1286. set J65=jh
  1287. set J66=hg
  1288. set J67=gf
  1289. set J68=fd
  1290. set J69=ds
  1291. set J70=sa
  1292. set J71=mn
  1293. set J72=nb
  1294. set J73=bv
  1295. set J74=vc
  1296. set J75=cx
  1297. set J76=xz
  1298. set J77=aq
  1299. set J78=sw
  1300. set J79=de
  1301. set J80=fr
  1302. set J81=gt
  1303. set J82=hy
  1304. set J83=ju
  1305. set J84=ki
  1306. set J85=lo
  1307. set J86=za
  1308. set J87=xs
  1309. set J88=cd
  1310. set J89=vf
  1311. set J90=bg
  1312. set J91=nh
  1313. set J92=mj
  1314. set J93=aw
  1315. set J94=se
  1316. set J95=dr
  1317. set J96=ft
  1318. set J97=gy
  1319. set J98=hu
  1320.  
  1321. set J99=ji
  1322. set J100=ko
  1323. set J101=lp
  1324. set J102=zs
  1325. set J103=xd
  1326. set J104=cf
  1327. set J105=vg
  1328. set J106=bh
  1329. set J107=nj
  1330. set J108=mk
  1331. set J109=qz
  1332. set J110=wx
  1333. set J111=ec
  1334. set J112=rv
  1335. set J113=tb
  1336. set J114=yn
  1337. set J115=um
  1338. set J116=om
  1339. set J117=in
  1340. set J118=ub
  1341. set J119=yv
  1342. set J120=tc
  1343. set J121=rx
  1344. set J122=ez
  1345. set J123=zq
  1346. set J124=xw
  1347. set J125=ce
  1348. set J126=vr
  1349. set J127=bt
  1350. set J128=ny
  1351. set J129=mu
  1352. set J130=mo
  1353. set J131=ni
  1354. set J132=bu
  1355. set J133=vy
  1356. set J134=ct
  1357. set J135=xr
  1358. set J136=ze
  1359. set J137=qe
  1360. set J138=wr
  1361. set J139=et
  1362. set J140=ry
  1363. set J141=tu
  1364. set J142=yi
  1365. set J143=uo
  1366. set J144=ip
  1367. set J145=ad
  1368. set J146=sf
  1369. set J147=dg
  1370. set J148=fh
  1371. set J149=gj
  1372. set J150=hk
  1373. set J151=jl
  1374. set J152=zc
  1375. set J153=xv
  1376. set J154=cb
  1377. set J155=vn
  1378. set J156=bm
  1379. set J157=eq
  1380. set J158=rw
  1381. set J159=te
  1382. set J160=yr
  1383. set J161=ut
  1384. set J162=iy
  1385. set J163=ou
  1386. set J164=pi
  1387. set J165=da
  1388. set J166=fs
  1389. set J167=gd
  1390. set J168=hf
  1391. set J169=jg
  1392. set J170=kh
  1393. set J171=lj
  1394. set J172=cz
  1395. set J173=vx
  1396. set J174=bc
  1397. set J175=nv
  1398. set J176=mb
  1399. set J177=rq
  1400. set J178=tw
  1401. set J179=ye
  1402. set J180=ur
  1403. set J181=it
  1404. set J182=oy
  1405. set J183=pu
  1406. set J184=fa
  1407. set J185=gs
  1408. set J186=hd
  1409. set J187=jf
  1410. set J188=kg
  1411. set J189=lh
  1412. set J190=vz
  1413. set J191=bx
  1414. set J192=nc
  1415. set J193=mv
  1416. set J194=qr
  1417. set J195=wt
  1418. set J196=ey
  1419. set J197=ru
  1420. set J198=ti
  1421. set J199=yo
  1422. set J200=up
  1423. set J201=af
  1424. set J202=sg
  1425. set J203=dh
  1426. set J204=fj
  1427. set J205=gk
  1428. set J206=hl
  1429. set J207=zv
  1430. set J208=xb
  1431. set J209=cn
  1432. set J210=vm
  1433. set J211=qt
  1434. set J212=wy
  1435. set J213=eu
  1436. set J214=ri
  1437. set J215=to
  1438. set J216=yp
  1439. set J217=ag
  1440. set J218=sh
  1441. set J219=dj
  1442. set J220=fk
  1443. set J221=gl
  1444. set J222=zb
  1445. set J223=xn
  1446. set J224=cm
  1447. set J225=tq
  1448. set J226=yw
  1449. set J227=ue
  1450. set J228=ir
  1451. set J229=ot
  1452. set J230=py
  1453. set J231=ga
  1454. set J232=hs
  1455. set J233=jd
  1456. set J234=kf
  1457. set J235=lg
  1458. set J236=bz
  1459. set J237=nx
  1460. set J238=mc
  1461. set J239=qy
  1462. set J240=wu
  1463. set J241=ei
  1464. set J242=ro
  1465. set J243=tp
  1466. set J244=ah
  1467. set J245=sj
  1468. set J246=dk
  1469. set J247=fl
  1470. set J248=zn
  1471. set J249=xm
  1472. set J250=mx
  1473. set J251=nz
  1474. set J252=lf
  1475. set J253=kd
  1476. set J254=js
  1477. set J255=ha
  1478. set J256=pt
  1479. set j257=zp
  1480.  
  1481. set countera=-1
  1482. set counterb=-1
  1483. set counterc=-1
  1484.  
  1485.  
  1486. :pcharloop
  1487. set /a countera= %countera% + 1
  1488. set /a counterc= %counterc% + 1
  1489. set templ=!pchar%countera%!
  1490. set pchar%countera%=
  1491. if not defined templ goto allcharloop
  1492. if defined %templ% goto pcharloop
  1493. for /f %%I in ("%templ%") do set %%I=!J%counterc%!
  1494. for /f %%I in ("!J%counterc%!") do set %%I=%templ%
  1495. if not defined %templ% goto backupset
  1496. goto pcharloop
  1497.  
  1498.  
  1499. :allcharloop
  1500. set /a counterb= %counterb% + 1
  1501. set /a counterc= %counterc% + 1
  1502. if /i %counterB% geq 258 exit /b
  1503. if /i %counterB% equ 20 goto backupset
  1504.  
  1505. set templ=!L%counterb%!
  1506. set tempj=!J%counterc%!
  1507.  
  1508. for /f %%I in ("%templ%") do if defined %%I set /a counterc=%counterc% - 1& goto allcharloop
  1509. for /f "delims=" %%I in ("%templ%") do (
  1510. set %%I=%tempj%
  1511. set %tempj%=%%I
  1512. )
  1513. goto allcharloop
  1514.  
  1515. :backupset
  1516. set !templ!=!J%counterc%!
  1517. set !J%counterc%!=!templ!
  1518. goto allcharloop
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525. :startencode
  1526.  
  1527. set layersdone=1
  1528. set counterx=0
  1529. set counterI=0
  1530.  
  1531. :MEnumerator
  1532. set Mchar%counterx%=!message:~%counterX%,1!
  1533. if "!Mchar%counterx%!"=="" goto encodemessage
  1534. set /a counterx= !counterx! + 1
  1535. goto Menumerator
  1536.  
  1537. :encodemessage
  1538. if /i %counterI% equ %counterX% goto FirstEncodeDone
  1539. set temp=!Mchar%counterI%!
  1540. set Mchar%counterI%=
  1541. if "%temp:"=Quote%"=="Quote" set temp=Quote
  1542. if /i "%temp%"==" " set temp=Space
  1543. if "%temp%"=="=" set temp=Equals
  1544. if "%temp%"=="&" set temp=And
  1545. if "%temp%"=="^" set temp=POINTUP
  1546. set encodedmessage=!encodedmessage!!%temp%!
  1547. set /a counterI= %counterI% + 1
  1548. goto encodemessage
  1549.  
  1550. :FirstEncodeDone
  1551. if /i %layersdone% equ %encodinglayers% (
  1552. set layersdone=
  1553. exit /b
  1554. )
  1555. set counterx=0
  1556. set counterI=0
  1557. set second_encode=1
  1558. set message=!encodedmessage!
  1559. set encodedmessage=
  1560. set /a layersdone= %layersdone% + 1
  1561. goto MEnumerator
  1562.  
  1563.  
  1564.  
  1565.  
  1566. :startdecode
  1567. set layersdone=1
  1568. set counterx=0
  1569. set countery=0
  1570. set counterI=0
  1571.  
  1572.  
  1573. :DEnumerator
  1574. set Dchar%counterY%=!encodedmessage:~%counterX%,2!
  1575. if "!Dchar%counterY%!"=="" set /a counterx=(counterx/2)& goto Decodemessage
  1576. set /a counterx= !counterx! + 2
  1577. set /a counterY= !counterY! + 1
  1578. goto Denumerator
  1579.  
  1580. :Decodemessage
  1581. if /i %counterI% equ %counterX% goto Dmessagefinished
  1582. set temp=!Dchar%counterI%!
  1583. set Dchar%counterI%=
  1584. if /i "!%temp%!"=="Quote" set %temp%="
  1585. if /i "!%temp%!"=="Space" set %temp%=
  1586. if /i "!%temp%!"=="Equals" set %temp%==
  1587. if /i "!%temp%!"=="POINTUP" for /f %%I in ("^") do set %temp%=%%I
  1588. SET decodedmessage=!decodedmessage!!%temp%!
  1589. set /a counterI= %counterI% + 1
  1590. goto Decodemessage
  1591.  
  1592.  
  1593. :Dmessagefinished
  1594. if /i NOT %layersdone% equ %encodinglayers% (
  1595. set /a layersdone= !layersdone! + 1
  1596. set encodedmessage=!decodedmessage!
  1597. set counterI=0
  1598. set countery=0
  1599. set counterx=0
  1600. set decodedmessage=
  1601. goto DEnumerator
  1602. )
  1603. ::for /f %%I in ("&") do set and=%%I
  1604. ::for /f %%I in ("%decodedmessage:&=!and!%") set decodedmessage=%%I
  1605. ::echo !decodedmessage!&pause
  1606. set layersdone=
  1607. exit /b
  1608.  
  1609.  
  1610. ::##########################################################################################
  1611.  
  1612.  
  1613.  
  1614.  
  1615. ::##########################################################################################
  1616.  
  1617.  
  1618.  
  1619.  
  1620. ::##########################################################################################
  1621.  
  1622.  
  1623.  
  1624. :SecondWindow
  1625. title !ConversationPath!
  1626. set lineoffset=2
  1627. for /f "delims=" %%I in ("%2") do set ConversationPath=%%I
  1628. if /i "%3" equ 1 do set encryptedconvo=1
  1629.  
  1630.  
  1631.  
  1632. :DoubleWindow_StartSpeaking
  1633.  
  1634. set gotnewmsg=
  1635. set newmessagecount=0
  1636. set testmessagecount=0
  1637.  
  1638.  
  1639.  
  1640. if not exist !conversationpath! echo Conversation Deleted...& pause& exit /b
  1641.  
  1642. for /f "skip=%lineoffset% delims=" %%I in (!conversationpath!) do (
  1643. set /a newmessagecount= !newmessagecount! + 1
  1644. set newmessage!newmessagecount!=%%I
  1645. call :foundmessages
  1646. )
  1647.  
  1648. if messagefailed==1 (
  1649. set messagefailed=
  1650. goto DoubleWindow_NoNewMessages
  1651. )
  1652. goto DoubleWindow_MoreNewMessages
  1653.  
  1654.  
  1655.  
  1656. :DoubleWindow_MoreNewMessages
  1657. if /i %testmessagecount% equ %newmessagecount% goto DoubleWindow_NoNewMessages
  1658. set /a testmessagecount= !testmessagecount! + 1
  1659.  
  1660. echo "!newmessage%testmessagecount%!" | find /i "~~~User " >nul
  1661.  
  1662. if /i !errorlevel! equ 0 (
  1663. echo !newmessage%testmessagecount%!
  1664. set /a lineoffset= !lineoffset! + 1
  1665. goto DoubleWindow_MoreNewMessages
  1666. )
  1667.  
  1668. for /f "tokens=1,* delims=~" %%I in ("!newmessage%testmessagecount%!") do set nameofspeaker=%%I& set sortedmessage=%%J
  1669. set newmessage%testmessagecount%=
  1670. echo !nameofspeaker! says:
  1671. echo !sortedmessage:~1!
  1672. echo.
  1673. set /a lineoffset=!lineoffset! + 2
  1674. if /i not %testmessagecount% equ %newmessagecount% goto DoubleWindow_MoreNewMessages
  1675.  
  1676. :DoubleWindow_NoNewMessages
  1677.  
  1678. if not defined usermessage goto DoubleWindow_StartSpeaking
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705. :FirstWindow
  1706. title Enter your messages here. !Conversationpath!
  1707. echo Enter your message.
  1708. echo Enter /Exit to quit.
  1709. for /L %%I in (1,1,21) do echo.
  1710.  
  1711.  
  1712. :DoubleWindow_EnterMessage
  1713. set usermessage=
  1714. set /p usermessage=
  1715. if not defined usermessage goto DoubleWindow_EnterMessage
  1716.  
  1717. echo.
  1718.  
  1719. if not exist !conversationpath! cls& echo Conversation Deleted...& pause& goto choice
  1720. if /i "%usermessage%"=="/exit" goto DoubleWindow_Exit
  1721.  
  1722.  
  1723. set message=%Fileusername% [%time:~0,-3%]~ !usermessage!
  1724. if defined encryptedconvo (
  1725. set encodedmessage=
  1726. call :startencode
  1727. set message=!encodedmessage!
  1728. set encodedmessage=
  1729. )
  1730. >>!conversationpath! echo.
  1731. >>!conversationpath! echo %message%
  1732.  
  1733. goto DoubleWindow_Entermessage
  1734.  
  1735. :Doublewindow_exit
  1736. Echo Choose Option:
  1737. echo 1. Exit and delete conversation
  1738. echo 2. Exit and save conversation
  1739. echo 3. Resume
  1740. set choice=
  1741. set /p choice=
  1742. if not defined choice echo.& goto Doublewindow_exit
  1743. if /i "%choice%"==" " echo.& goto Doublewindow_exit
  1744. set choice=%choice:~0,1%
  1745. if /i not %choice% geq 1 echo.& goto Doublewindow_exit
  1746. if /i not %choice% leq 3 echo.& goto Doublewindow_exit
  1747.  
  1748. if %choice%==1 del "!conversationpath!"& cls& goto Choice
  1749. if %choice%==2 copy "!conversationpath!" !Savepath!\%FileUsername%-%User1%-ChatEncode.log& cls& goto FileUsername
  1750. if %choice%==3 goto DoubleWindow_Entermessage
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement