Advertisement
BaSs_HaXoR

PS3Lib.PwN.dll - SOURCE CODE [GrabData.cs]

Feb 19th, 2015
733
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 14.21 KB | None | 0 0
  1. /*
  2. @Project: Dumps any address with corresponding bytes in a program that is compatible with the library "PS3Lib.dll" version 4.3 by iMCSx.
  3. @Author: BaSs_HaXoR
  4. @Date: 02/19/15
  5. @Credits: BaSs_HaXoR, iMCSx, Eddie Mac
  6. */
  7. //[REVISED] V2
  8. //#####################################################################################################################################################################################################################
  9. using System;
  10. using System.Collections.Generic;
  11. using System.Linq;
  12. using System.Text;
  13. using System.Threading.Tasks;
  14. using System.IO;
  15. using System.Windows.Forms;
  16. namespace PS3Lib
  17. {
  18.     class GrabData
  19.     {
  20.         int num = 0;
  21.         public string getCurrentDir()
  22.         {
  23.             string Dir;
  24.             Dir = Directory.GetCurrentDirectory();
  25.             return Dir;
  26.         }
  27.  
  28.         public void test()
  29.         {
  30.             Clipboard.SetText(getCurrentDir());
  31.         }
  32.  
  33.         public string retStrHex(uint decValue)
  34.         {
  35.             string hexValue = decValue.ToString("X");
  36.             return hexValue;
  37.         }
  38.  
  39.         public string retStrHex(ulong decValue)
  40.         {
  41.             string hexValue = decValue.ToString("X");
  42.             return hexValue;
  43.         }
  44.  
  45.         public void grabData(uint yourAddress, byte[] yourBytes)
  46.         {
  47.             string stringbytes;
  48.             stringbytes = BitConverter.ToString(yourBytes);
  49.             stringbytes = stringbytes.Replace("-", " 0x");
  50.             stringbytes = stringbytes.Replace(" ", ", ");
  51.             stringbytes = "0x" + stringbytes;
  52.             try
  53.             {
  54.                 string outx = System.IO.File.ReadAllText(getCurrentDir() + "/BaSsWazHere.txt");
  55.                 System.IO.File.WriteAllText(getCurrentDir() + "/BaSsWazHere.txt", outx + Environment.NewLine + "PS3.SetMemory(0x" + retStrHex(yourAddress) + ", new byte[] " + "{ " + stringbytes + " }; /* PwN3D By: BaSs_HaXoR */" + Environment.NewLine);
  56.                 num = num + 1;
  57.             }
  58.             catch
  59.             {
  60.                 num = 0;
  61.                 System.IO.File.WriteAllText(getCurrentDir() + "/BaSsWazHere.txt", @"########################################################################################
  62.    Yb        dP 8           w      .d88b.                       w  w          dP'Yb
  63.     Yb  db  dP  8d8b. .d88 w8ww    YPwww. .d88b .d8b 8   8 8d8b w w8ww Yb  dP '  d8
  64.      YbdPYbdP   8P Y8 8  8  8          d8 8.dP' 8    8b d8 8P   8  8    YbdP    dP  
  65.       YP  YP    8   8 `Y88  Y8P    `Y88P' `Y88P `Y8P `Y8P8 8    8  Y8P   dP     w  
  66.                                                                         dP      x
  67. ########################################################################################
  68.                                 Pwn3D By: BaSs_HaXoR
  69.                             Special Thanks To Eddie Mac
  70.                                Date PwN3D: " + DateTime.Now.ToString("M/d/yyyy") + @"
  71. ########################################################################################
  72.                     ____    __      __  __  __     __    ____      
  73.                    /\  _`\ /\ \  __/\ \/\ \/\ \  /'__`\ /\  _`\    
  74.                    \ \ \L\ \ \ \/\ \ \ \ \ `\\ \/\_\L\ \\ \ \/\ \  
  75.                     \ \ ,__/\ \ \ \ \ \ \ \ , ` \/_/_\_<_\ \ \ \ \
  76.                      \ \ \/  \ \ \_/ \_\ \ \ \`\ \/\ \L\ \\ \ \_\ \
  77.                       \ \_\   \ `\___x___/\ \_\ \_\ \____/ \ \____/
  78.                        \/_/    '\/__//__/  \/_/\/_/\/___/   \/___/
  79. ########################################################################################
  80. Your PwNaGe will start here: " + Environment.NewLine + Environment.NewLine + "PS3.SetMemory(0x" + retStrHex(yourAddress) + ", new byte[] " + "{ " + stringbytes + " }; /* PwN3D By: BaSs_HaXoR */ " + Environment.NewLine);
  81.                 num = num + 1;
  82.                 //File Doesn't exist yet....
  83.             }
  84.         }
  85.  
  86.         public void grabData(ulong yourAddress, byte[] yourBytes)
  87.         {
  88.             int num = 0;
  89.             string stringbytes;
  90.             stringbytes = BitConverter.ToString(yourBytes);
  91.             stringbytes = stringbytes.Replace("-", " 0x");
  92.             stringbytes = stringbytes.Replace(" ", ", ");
  93.             stringbytes = "0x" + stringbytes;
  94.             try
  95.             {
  96.                 string outx = System.IO.File.ReadAllText(getCurrentDir() + "/BaSsWazHere.txt");
  97.                 System.IO.File.WriteAllText(getCurrentDir() + "/BaSsWazHere.txt", outx + Environment.NewLine + "PS3.SetMemory(0x" + retStrHex(yourAddress) + ", new byte[] " + "{ " + stringbytes + " }; /* PwN3D By: BaSs_HaXoR */" + Environment.NewLine);
  98.                 num = num++;
  99.             }
  100.             catch
  101.             {
  102.                 System.IO.File.WriteAllText(getCurrentDir() + "/BaSsWazHere.txt", @"########################################################################################
  103.    Yb        dP 8           w      .d88b.                       w  w          dP'Yb
  104.     Yb  db  dP  8d8b. .d88 w8ww    YPwww. .d88b .d8b 8   8 8d8b w w8ww Yb  dP '  d8
  105.      YbdPYbdP   8P Y8 8  8  8          d8 8.dP' 8    8b d8 8P   8  8    YbdP    dP  
  106.       YP  YP    8   8 `Y88  Y8P    `Y88P' `Y88P `Y8P `Y8P8 8    8  Y8P   dP     w  
  107.                                                                         dP      x
  108. ########################################################################################
  109.                                 Pwn3D By: BaSs_HaXoR
  110.                             Special Thanks To Eddie Mac
  111.                                Date PwN3D: " + DateTime.Now.ToString("M/d/yyyy") + @"
  112. ########################################################################################
  113.                     ____    __      __  __  __     __    ____      
  114.                    /\  _`\ /\ \  __/\ \/\ \/\ \  /'__`\ /\  _`\    
  115.                    \ \ \L\ \ \ \/\ \ \ \ \ `\\ \/\_\L\ \\ \ \/\ \  
  116.                     \ \ ,__/\ \ \ \ \ \ \ \ , ` \/_/_\_<_\ \ \ \ \
  117.                      \ \ \/  \ \ \_/ \_\ \ \ \`\ \/\ \L\ \\ \ \_\ \
  118.                       \ \_\   \ `\___x___/\ \_\ \_\ \____/ \ \____/
  119.                        \/_/    '\/__//__/  \/_/\/_/\/___/   \/___/
  120. ########################################################################################
  121. Your PwNaGe will start here: " + Environment.NewLine + Environment.NewLine + "PS3.SetMemory(0x" + retStrHex(yourAddress) + ", new byte[] " + "{ " + stringbytes + " }; /* PwN3D By: BaSs_HaXoR */" + Environment.NewLine);
  122.                 num = num++;
  123.             }
  124.         }
  125.         public void grabData(uint yourAddress, ulong yourulong)
  126.         {
  127.             int num = 0;
  128.             string strulong = Convert.ToString(yourulong);
  129.             try
  130.             {
  131.                 string outx = System.IO.File.ReadAllText(getCurrentDir() + "/BaSsWazHere.txt");
  132.                 System.IO.File.WriteAllText(getCurrentDir() + "/BaSsWazHere.txt", outx + Environment.NewLine + "PS3.SetMemory(0x" + retStrHex(yourAddress) + ", new byte[] " + "{ " + yourulong + " }; /* PwN3D By: BaSs_HaXoR */" + Environment.NewLine);
  133.                 num = num++;
  134.             }
  135.             catch
  136.             {
  137.                 System.IO.File.WriteAllText(getCurrentDir() + "/BaSsWazHere.txt", @"########################################################################################
  138.    Yb        dP 8           w      .d88b.                       w  w          dP'Yb
  139.     Yb  db  dP  8d8b. .d88 w8ww    YPwww. .d88b .d8b 8   8 8d8b w w8ww Yb  dP '  d8
  140.      YbdPYbdP   8P Y8 8  8  8          d8 8.dP' 8    8b d8 8P   8  8    YbdP    dP  
  141.       YP  YP    8   8 `Y88  Y8P    `Y88P' `Y88P `Y8P `Y8P8 8    8  Y8P   dP     w  
  142.                                                                         dP      x
  143. ########################################################################################
  144.                                 Pwn3D By: BaSs_HaXoR
  145.                             Special Thanks To Eddie Mac
  146.                                Date PwN3D: " + DateTime.Now.ToString("M/d/yyyy") + @"
  147. ########################################################################################
  148.                     ____    __      __  __  __     __    ____      
  149.                    /\  _`\ /\ \  __/\ \/\ \/\ \  /'__`\ /\  _`\    
  150.                    \ \ \L\ \ \ \/\ \ \ \ \ `\\ \/\_\L\ \\ \ \/\ \  
  151.                     \ \ ,__/\ \ \ \ \ \ \ \ , ` \/_/_\_<_\ \ \ \ \
  152.                      \ \ \/  \ \ \_/ \_\ \ \ \`\ \/\ \L\ \\ \ \_\ \
  153.                       \ \_\   \ `\___x___/\ \_\ \_\ \____/ \ \____/
  154.                        \/_/    '\/__//__/  \/_/\/_/\/___/   \/___/
  155. ########################################################################################
  156. Your PwNaGe will start here: " + Environment.NewLine + Environment.NewLine + "PS3.SetMemory(0x" + retStrHex(yourAddress) + ", new byte[] " + "{ " + yourulong + " }; /* PwN3D By: BaSs_HaXoR */" + Environment.NewLine);
  157.                 num = num++;
  158.             }
  159.         }
  160.  
  161.         public void grabData(uint yourAddress, string hex, EndianType Type)
  162.         {
  163.             char quotation = '"';
  164.             int num = 0;
  165.             try
  166.             {
  167.                 string outx = System.IO.File.ReadAllText(getCurrentDir() + "/BaSsWazHere.txt"); //"PS3.SetMemory(0x" + retStrHex(yourAddress) + ", new byte[] " + "{ " + yourulong + "};" + Environment.NewLine);
  168.                 System.IO.File.WriteAllText(getCurrentDir() + "/BaSsWazHere.txt", outx + Environment.NewLine + "PS3.WriteString(0x" + retStrHex(yourAddress) + ", (" + quotation + hex + quotation + " );" + " //EndianType: " + Type + "  /* PwN3D By: BaSs_HaXoR */" + Environment.NewLine);
  169.                 num = num++;
  170.             }
  171.             catch
  172.             {
  173.                 System.IO.File.WriteAllText(getCurrentDir() + "/BaSsWazHere.txt", @"########################################################################################
  174.    Yb        dP 8           w      .d88b.                       w  w          dP'Yb
  175.     Yb  db  dP  8d8b. .d88 w8ww    YPwww. .d88b .d8b 8   8 8d8b w w8ww Yb  dP '  d8
  176.      YbdPYbdP   8P Y8 8  8  8          d8 8.dP' 8    8b d8 8P   8  8    YbdP    dP  
  177.       YP  YP    8   8 `Y88  Y8P    `Y88P' `Y88P `Y8P `Y8P8 8    8  Y8P   dP     w  
  178.                                                                         dP      x
  179. ########################################################################################
  180.                                 Pwn3D By: BaSs_HaXoR
  181.                             Special Thanks To Eddie Mac
  182.                                Date PwN3D: " + DateTime.Now.ToString("M/d/yyyy") + @"
  183. ########################################################################################
  184.                     ____    __      __  __  __     __    ____      
  185.                    /\  _`\ /\ \  __/\ \/\ \/\ \  /'__`\ /\  _`\    
  186.                    \ \ \L\ \ \ \/\ \ \ \ \ `\\ \/\_\L\ \\ \ \/\ \  
  187.                     \ \ ,__/\ \ \ \ \ \ \ \ , ` \/_/_\_<_\ \ \ \ \
  188.                      \ \ \/  \ \ \_/ \_\ \ \ \`\ \/\ \L\ \\ \ \_\ \
  189.                       \ \_\   \ `\___x___/\ \_\ \_\ \____/ \ \____/
  190.                        \/_/    '\/__//__/  \/_/\/_/\/___/   \/___/
  191. ########################################################################################
  192. Your PwNaGe will start here: " + Environment.NewLine + Environment.NewLine + "PS3.SetMemory(0x" + retStrHex(yourAddress) + ", (" + quotation + hex + quotation + " );" + " //EndianType: " + Type + "  /* PwN3D By: BaSs_HaXoR */" + Environment.NewLine);
  193.                 num = num++;
  194.             }
  195.         }
  196.  
  197.         public void grabData(ulong yourAddress, string hex, EndianType Type)
  198.         {
  199.             char quotation = '"';
  200.             int num = 0;
  201.             try
  202.             {
  203.                 string outx = System.IO.File.ReadAllText(getCurrentDir() + "/BaSsWazHere.txt");
  204.                 System.IO.File.WriteAllText(getCurrentDir() + "/BaSsWazHere.txt", outx + Environment.NewLine + "PS3.WriteString(0x" + retStrHex(yourAddress) + ", (" + quotation + hex + quotation + " );" + " //EndianType: " + Type + "  /* PwN3D By: BaSs_HaXoR */" + Environment.NewLine);
  205.                 num = num++;
  206.             }
  207.             catch
  208.             {
  209.                 System.IO.File.WriteAllText(getCurrentDir() + "/BaSsWazHere.txt", @"########################################################################################
  210.    Yb        dP 8           w      .d88b.                       w  w          dP'Yb
  211.     Yb  db  dP  8d8b. .d88 w8ww    YPwww. .d88b .d8b 8   8 8d8b w w8ww Yb  dP '  d8
  212.      YbdPYbdP   8P Y8 8  8  8          d8 8.dP' 8    8b d8 8P   8  8    YbdP    dP  
  213.       YP  YP    8   8 `Y88  Y8P    `Y88P' `Y88P `Y8P `Y8P8 8    8  Y8P   dP     w  
  214.                                                                         dP      x
  215. ########################################################################################
  216.                                 Pwn3D By: BaSs_HaXoR
  217.                             Special Thanks To Eddie Mac
  218.                                Date PwN3D: " + DateTime.Now.ToString("M/d/yyyy") + @"
  219. ########################################################################################
  220.                     ____    __      __  __  __     __    ____      
  221.                    /\  _`\ /\ \  __/\ \/\ \/\ \  /'__`\ /\  _`\    
  222.                    \ \ \L\ \ \ \/\ \ \ \ \ `\\ \/\_\L\ \\ \ \/\ \  
  223.                     \ \ ,__/\ \ \ \ \ \ \ \ , ` \/_/_\_<_\ \ \ \ \
  224.                      \ \ \/  \ \ \_/ \_\ \ \ \`\ \/\ \L\ \\ \ \_\ \
  225.                       \ \_\   \ `\___x___/\ \_\ \_\ \____/ \ \____/
  226.                        \/_/    '\/__//__/  \/_/\/_/\/___/   \/___/
  227. ########################################################################################
  228. Your PwNaGe will start here: " + Environment.NewLine + Environment.NewLine + "PS3.SetMemory(0x" + "PS3.WriteString(0x" + retStrHex(yourAddress) + ", (" + quotation + hex + quotation + " );" + " //EndianType: " + Type + "  /* PwN3D By: BaSs_HaXoR */" + Environment.NewLine);
  229.                 num = num++;
  230.             }
  231.         }
  232.     }
  233. }
  234. //#####################################################################################################################################################################################################################
  235. //BaSs_HaXoR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement