Jump to content

alien

Active Members
  • Posts

    331
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by alien

  1. Incearca asta in loc de fgets(s,i,fid); - o sa opreasca while-ul if (!fgets(s,i,fid)) break; se pare ca !feof(fid) ala nu prea opreste while-ul sau ceva mai clean schimbi while-ul in: while (getc(fid))!=EOF)
  2. Vezi sa ai EOF in fisierul care il citesti(apasa un enter la final) si sa fie windows format. Foloseste notepad++ sa satezi astea.
  3. pai zici ca-ti da hang undeva nu? pornesti in debug si cand vezi ca s-a hang-uit(face un ciclu infinit sau ceva) il opresti si vezi exact in ce functie/ciclu/linie/fisier e in executie. Este destul de important sa inveti sa faci debug. Eu unul nu m-as putea lipsi de el. Poti folosi visual studio pe windows, am crezut ca esti pe linux cand am vazut gcc(deaia am recomandat gdb)
  4. instaleaza gdb si fa debug
  5. Depinde si ce vrei sa faci pe linux. Eu de exemplu mi-am pierdut vreo 3 ore sa compilez ultima versiunea de gcc pt ca nu mi se compilau niste surse pe Ubuntu 10 LTS. Deci ar fi de preferat sa alegi o versiune care contine pachete destul de noi.
  6. Exista un site numit distrowatch.com, gasesti acolo toate distributiile de linux, un ranking al lor si ce pachete contine fiecare distributie. O parere personala: sa nu incepi cu ubuntu 11, e mult prea comercial si si-a pierdut din valorile unui adevarat linux.
  7. This tutorial will explain the basics of generating and verifying of HWID's. First things first, "What the hell is a HWID??" Most of you already know this so I will keep it short. Ever since Windows XP Product Activation came around, when the OS is installed an unique ID is generated for the basic hardware components in the system. This ensures that a software will be bound to those unique ID, so it can't be moved/run on other machines. Of course there are methods to bypass this, but this is not the scope of this tutorial. Also to make it more "secure" we will be using the triple DES algorithm to crypt the generated CPU and HDD Id's. A short overview: The class will be called Hwid and will contain 2 properties(CpuId,HddId plain text), Generate, Verify and EncryptString methods. The Verify method takes 2 parameters: password(used for DES) and path. The path can be also an URL to a website hosting the file with the HWID's. The void Main() contains a simple console application to see how Hwid class works. The code is commented and self explanatory I would say. Source code: hg clone https://bitbucket.org/rokill3r/hwid Hwid class class Hwid { private string _cpuId = string.Empty; private string _hddId = string.Empty; public Hwid() { _cpuId = GetCpuId(); _hddId = GetHddId("C"); } /// <summary> /// Gets first CPU unique ID /// </summary> /// <returns></returns> private string GetCpuId() { ManagementClass cpuManager = new ManagementClass("win32_processor"); ManagementObjectCollection cpuCollection = cpuManager.GetInstances(); foreach (ManagementObject cpu in cpuCollection) { // Return first CPU Id return cpu.Properties["processorID"].Value.ToString(); } return string.Empty; } /// <summary> /// Gets the drives unique ID /// </summary> /// <param name="drive">Drive name(eg: C,D..)</param> /// <returns></returns> private string GetHddId(string drive) { ManagementObject dsk = new ManagementObject(@"win32_logicaldisk.deviceid=""" + drive + @":"""); dsk.Get(); return dsk["VolumeSerialNumber"].ToString(); } /// <summary> /// Encrypts the HWID using tripple DES algorithm /// </summary> /// <param name="Message">String to crypt</param> /// <param name="Passphrase">Password to use when crypting</param> /// <returns></returns> private string EncryptString(string Message, string Passphrase) ... /// <summary> /// Generates an encrypted HWID /// </summary> /// <param name="password">Password for the DES crypt algorith</param> /// <returns>Encrypted HWID</returns> public string Generate(string password) { return EncryptString(_cpuId + _hddId, password); } public string Generate(string password, string path) { try { string cryptedHwid = EncryptString(_cpuId + _hddId, password); // Write the crypted Hwid to file System.IO.StreamWriter file = new System.IO.StreamWriter(path); file.WriteLine(cryptedHwid); file.Close(); return cryptedHwid; } catch (Exception ex) { return ex.Message; } } /// <summary> /// Generates an encrypted HWID using the tripple DES algorithm /// </summary> /// <param name="password">Password for the DES crypt algorithm</param> /// <param name="path">Path where the HWID will be saved</param> /// <returns>Encrypted HWID</returns> public string Verify(string password, string path) { try { string db = string.Empty; if (path.Contains("http")) { WebClient webClient = new WebClient(); db = webClient.DownloadString(path); webClient.Dispose(); } else { System.IO.StreamReader file = new System.IO.StreamReader(path); db = file.ReadToEnd(); file.Close(); } if (db.Contains(EncryptString(_cpuId + _hddId, password))) return "HWID OK"; else return "HWID NOT FOUND"; } catch (Exception ex) { return ex.Message; } } void Main() static void Main(string[] args) { Hwid hwid = new Hwid(); // Change this to your desired password; string password = "secret1234"; if (args.Length < 1) PrintHelp(); else switch (args[0]) { case "--display": { Console.WriteLine("CPU ID: " + hwid.CpuId); Console.WriteLine("HDD ID: " + hwid.HddId); Console.WriteLine(); break; } case "--generate": { if (args.Length < 2) { Console.WriteLine("Path not specified!"); break; } string path = args[1]; Console.WriteLine("Encrypted HWID: " + hwid.Generate(password, path)); // If we don't specify the path it will only return the encrypted string //Console.WriteLine("Encrypted HWID: " + hwid.Generate(password)); break; } case "--verify": { if (args.Length < 2) { Console.WriteLine("Path not specified!"); break; } string path = args[1]; Console.WriteLine(hwid.Verify(password, path)); break; } default: { PrintHelp(); break; } } Console.WriteLine("Press any key to continue . . ."); Console.ReadLine(); }
  8. de la Smurd a plecat, da striga jos base si guvernu acum. Sa speram ca se trezesc mai multi din hibernare si ies pe strazi. Eu vreau sa ies acum sa vad ce miscare e la mine in oras.
  9. Am observat si eu acum. Foarte util.
  10. Hint: functioneaza pe routerele de la romtelecom Clicknet SmartBox care au cam impanzit orasul.
  11. Salut macs, Arata destul de bine site-ul, mi-am facut si eu cont. GJ! Am totusi cateva nelamuriri cu privire la sistem, nu prea sunt familiar cu fiverr si alte site-uri de genul. Eu ca si seller pot sa resping anumite comenzi care consider ca nu se incadreaza in oferta mea? Exista o metoda de contorizare a procesului unei comenzi? De exemplu eu comand un design photoshop pentru un website. Fac plata in avans(dupa cum am inteles), omul se apuca de treaba si peste 7 zile vine cu un design care poate nu-mi place. Rezultatul: am pierdut bani si timp.
  12. Era de asteptat sa apara si workaround-uri. Nu cred ca o sa reauseasca sa "cenzureze" internetul cum vor ei. Oricum am inteles ca s-a amanat votarea legii pana la inceputul anului 2012, in ideea ca o sa-si mai piarda din interest mass media.
  13. Asta e in genul la scriptul lui g0tmi1k numai ca mai complex? O sa-l incerc maine la munca sa vedem ce rezultate da
  14. Posteaza IP-ul si iti scoatem noi ban-ul de pe HF
  15. Foarte fain. Scurt si la obiect. Mersi mult!
  16. Poti folosi aceeasi metoda doar ca trebuie sa scri Gparted pe un cd si sa bootezi de pe el. Inainte, sa te asiguri ca ai unallocated space pe hdd (fie stergi o partitie sau dai shrink).
  17. De curand m-am confruntat cu urmatoarea problema: Imagine VMware de Backtrack 5 + lipsa spatiu pe partitia virtuala. Recently I had the following problem: VMware image with Backtrack 5 + not enough space on the virtual partition. Solution: [highlight]Step 1:[/highlight] Go ahead and resize the HDD in the VMware image options. [highlight]Step 2:[/highlight] Okay, so if you try to resize the partition as you would do it usually, you run into the problem, that you have to unmount the partition first. In order to solve this problem, go ahead and download the gparted live stable release. Get the iso version. GParted - Browse /gparted-live-stable at SourceForge.net [highlight]Step 3:[/highlight] Mount the gparted iso to your guest OS as a CD and then go ahead and boot it up. Note that usually the boot sequence is out of order, so you got back to your normal guest OS. In this case, when you see the VMWare logo while booting, hit F2. (Keep in mind that your input needs to be hooked to the guest OS. If you do reboot from the guest OS, you should be fine.) Change the boot sequence in the boot tab so that the CD-ROM Drive is before the Hard Drive. Then Exit Saving Changes. If you still got your guest OS, then check if you connected your virtual CD-ROM drive to the guest. Start GParted Live. Usually choose “Don’t touch keymap” and English (33) will do just fine. Also start up your X Environment with option (0) when it comes to that question. (Btw, you can hit Enter three times for these default options) [highlight]Step 4:[/highlight] You should get GParted in the default view. Right click -> Resize/Move on your Extended file system (for me it was Cyan colored.) Set it so there is 0 Free space preceding AND 0 Free space following. Select your linux-swap and Resize/Move it. Notice that now you can make it slide. Go ahead and slide it all the way to the right. Resize/Move, then ignore the warning window. Then once again select you extended partition and Resize it, so there is no unallocated space remaining. (E.g.: Grab the size slider and bring it over all the way to the right.) By now, you should have your ext4, unallocated and extended partition in this order. Go ahead and resize your ext4 partition to allocate the unallocated space. Apply your work. (Don’t worry about if you finished with warnings, you will be just fine.) There is an exit button, go ahead and click it, reboot. Credits: How to resize a partition on a virtual image | Sn34ky T4nk
  18. mda... "merge", pentru astia care citesc de la dreapta la stanga
  19. Si eu recomand prestshop. E usor de folosit/instalat, integreaza majoritatea metodelor de plati online. Are diferite nivele de administrare(ex: poti seta conturi pentru marketing, contabilitate, support, curierat). Are o gama larga de plugin-uri preinstalate.
  20. #OpCashBack - remove all your money from the bank account
  21. Pentru a folosi proxy pentru aplicatiile de consola folositi proxychains #apt-get install proxychains Scriem in /etc/proxychains.conf socks4 127.0.0.1 9050 Pentru a testa ca merge #proxychains elinks cmyip.com
  22. Eu plec din Brasov pe la 16:00 - 16:30, cine e amator sa dea un semn.
  23. Ceva de invatat de la unul din cele mai bune jocuri ale anilor '90 - Quake 2. Quake 2 Source Code Review Gasiti acolo si link la source code.
  24. Daca esti interesat de un limbaj de programare orientat pe obiecte, nou, simplu si fara batai de cap, C# .Net este prentru tine. Nu mai trebuie sa te stresezi cu garbage collector, pointeri sau header files. Nu mai trebuie sa "reinventezi roata"; gasesti in librariile .Net tot ceea ce ai putea avea nevoie. In functie de timpul si numarul de membri voi incerca sa integrez si un sistem de dezvoltare agile(Scrum sau Kanban) Pentu grupuri contact: Nytro ( grupuri_rst ) Pentru intrebari contact: Alien (Scuze de reclama )
  25. Si totusi in Romanica esti un nimeni fara PILE!
×
×
  • Create New...