Advertisement
Guest User

why doesnt this code work?

a guest
Jun 8th, 2016
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.92 KB | None | 0 0
  1. @echo off
  2. color f3
  3. echo Welcome to the PTP CLI Setup
  4. :schoolsetup
  5. echo.
  6. echo School Proxy setup
  7. set /p sproxyu=School Username:
  8. set /p sproxyp=School Password:
  9. echo Username: %sproxyu% Password: %sproxyp%
  10. choice /m "Is this correct?"
  11. if errorlevel 1 (
  12.     goto ptpsetup
  13. ) else (
  14.     goto schoolsetup
  15. )
  16.  
  17. :ptpsetup
  18. echo.
  19. echo PTP Setup
  20. set /p pproxyi=PTP IP:
  21. set /p pproxyu=PTP Username:
  22. set /p pproxyp=PTP Password:
  23. echo IP: %pproxyi% PTP Username: %pproxyu% PTP Password: %pproxyp%
  24. choice /m "Is this correct?"
  25. if errorlevel 1 (
  26.     goto profileset
  27. ) else (
  28.     goto ptpsetup
  29. )
  30.  
  31. :profileset
  32. cls
  33. echo Automatically setting up proxy...
  34. (
  35. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  36. <ProxifierProfile version="101" platform="Windows" product_id="1" product_minver="310">
  37.   <Options>
  38.     <Resolve>
  39.       <AutoModeDetection enabled="true" />
  40.       <ViaProxy enabled="false">
  41.         <TryLocalDnsFirst enabled="false" />
  42.       </ViaProxy>
  43.       <ExclusionList>^%ComputerName^%; localhost; *.local</ExclusionList>
  44.     </Resolve>
  45.     <ProxificationPortableEngine subsystem="32">
  46.       <Location>Winsock</Location>
  47.       <Type hotpatch="true">Prologue</Type>
  48.     </ProxificationPortableEngine>
  49.     <ProxificationPortableEngine subsystem="64">
  50.       <Location>Winsock</Location>
  51.       <Type hotpatch="false">Modcopy</Type>
  52.     </ProxificationPortableEngine>
  53.     <Encryption mode="basic" />
  54.     <HttpProxiesSupport enabled="false" />
  55.     <HandleDirectConnections enabled="false" />
  56.     <ConnectionLoopDetection enabled="true" />
  57.     <ProcessServices enabled="false" />
  58.     <ProcessOtherUsers enabled="false" />
  59.   </Options>
  60.   <ProxyList>
  61.     <Proxy id="100" type="HTTPS">
  62.       <Address>proxy2.eq.edu.au</Address>
  63.       <Port>80</Port>
  64.       <Options>50</Options>
  65.       <Authentication enabled="true">
  66.         <Username>%sproxyu%</Username>
  67.         <Password>%sproxyp%</Password>
  68.       </Authentication>
  69.     </Proxy>
  70.     <Proxy id="101" type="HTTPS">
  71.       <Address>%pproxyi%</Address>
  72.       <Port>443</Port>
  73.       <Options>50</Options>
  74.       <Authentication enabled="true">
  75.         <Username>%pproxyu%</Username>
  76.         <Password>%pproxyp%</Password>
  77.       </Authentication>
  78.     </Proxy>
  79.   </ProxyList>
  80.   <ChainList>
  81.     <Chain id="102" type="simple">
  82.       <Name>New</Name>
  83.       <Proxy enabled="true">100</Proxy>
  84.       <Proxy enabled="true">101</Proxy>
  85.     </Chain>
  86.   </ChainList>
  87.   <RuleList>
  88.     <Rule enabled="true">
  89.       <Name>Localhost</Name>
  90.       <Targets>localhost; 127.0.0.1; ^%ComputerName^%</Targets>
  91.       <Action type="Direct" />
  92.     </Rule>
  93.     <Rule enabled="true">
  94.       <Name>od</Name>
  95.       <Applications>OneDrive.exe; explorer.exe</Applications>
  96.       <Action type="Direct" />
  97.     </Rule>
  98.     <Rule enabled="true">
  99.       <Name>Default</Name>
  100.       <Action type="Chain">102</Action>
  101.     </Rule>
  102.   </RuleList>
  103. </ProxifierProfile>
  104. ) > tmp.txt
  105.  
  106.  
  107. echo Done
  108. pause
  109. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement