Hi Shaggy, yeah, that's right, but that's only the "description" of things, and not any actual source code.
---------
Ahhh, I mis-read your last post. Well, I tried GitLab, and they had a 1GB limit. I didn't try GitHub.
Printable View
Hi Shaggy, yeah, that's right, but that's only the "description" of things, and not any actual source code.
---------
Ahhh, I mis-read your last post. Well, I tried GitLab, and they had a 1GB limit. I didn't try GitHub.
I'm gonna work on a routine to see how many EXEs, DLLs, & OCXs we're actually talking about.
Hmmm, it's not too bad. I might go through and just delete them.
Shaggy, if you're looking in, anything besides EXEs, DLLs, & OCXs I need to be thinking about?
Here's what I found:
---------------------Code:AntiVirus2004(3-0)\Secure\Kopie von codered.exe Antivirus_1711292202004.zip
Frac2_Final\MYTERR2.EXE A_3D_fract18203911202004.zip
btms.dll Banks_Tran1792759122004.zip
mvbMath.dll Blank_Engi2067755272007.zip
Tools\BE Script\BEScript.exe Blank_Engi2067755272007.zip
Tools\BPF Maker\BPFmaker.exe Blank_Engi2067755272007.zip
Tools\ResPacker\ResMaker.exe Blank_Engi2067755272007.zip
cEdit\grx\icons\cEdit1.exe cEdit189552612005.zip
programmeren\Projecten\Proef\treeview\Treeview.exe CODE_UPLOAD104521052000.zip
Gif89.dll CODE_UPLOAD41483222000.zip
radcfg.exe CODE_UPLOAD5413522000.zip
PORT.DLL COMplotter1627268102003.zip
clinica\clinica.exe consultori198466422006.zip
clinica\CONSULTORIO.exe consultori198466422006.zip
clinica\pplus_us.exe consultori198466422006.zip
setupformdesigner.exe Formdesign168943122004.zip
process memory usage\RAM_usage.exe Get_proces198451412006.zip
Client\Tools\Rar.exe Handle-X_T187133432005.zip
Client\Tools\UnRAR.exe Handle-X_T187133432005.zip
Vnspeech.dll Lite_PAd178855912004.zip
Petrol+Mgt+Sys\res\pd01.dll Petrol_and1845971312005.zip
Petrol+Mgt+Sys\res\pd02.dll Petrol_and1845971312005.zip
Petrol+Mgt+Sys\res\pd03.dll Petrol_and1845971312005.zip
Petrol+Mgt+Sys\res\shiftDe01.dllPetrol_and1845971312005.zip
Petrol+Mgt+Sys\res\shiftDe02.dllPetrol_and1845971312005.zip
Petrol+Mgt+Sys\res\shiftDe03.dllPetrol_and1845971312005.zip
wizard\about.exeProduct_Ac1785808252004.zip
Transport Automation System 1.0\configtas.dll Transport_18194311182004.zip
Transport Automation System 1.0\tasconfig.dll Transport_18194311182004.zip
XP Title.ocx xp_style113406812002.zip
Professional Address Book\Professional Address Book\Niro Address Book.exe [_Address_1857562252005.zip
EDIT: I saw an OCA file, so I added those to the list too.
Ok, I've purged all these file types from the ZIP files:
EXE
DLL
OCX
OCA
OBJ
EX_
OC_
DL_
From staring at quite a few of the ZIP files, they all pretty much seem like source code now. I'm uploading the new Zip-of-the-Zip files now to Google Drive.
Shaggy, do you think it'd be ok to edit my post #110 and put the link back in? I won't do that until I get your approval.
Also, once you approve it, it makes sense to me to put a thread in the codebank about this as well.
Best Regards,
Elroy
Maybe .vbw files? Technically, not having these can prevent malicious UCs from activating as soon as the project loads. How? Let's say some UC does stuff at startup. It can't activate if it's not displayed and the vbw file may be telling VB to display the form that that UC exists on. Just a thought. Above said, doesn't stop someone from displaying the form manually after VB loads the project. But whether paranoid or not, it's commonsense to scan code pages before playing with other people's code. For example, maybe they are writing to the registry and you don't want that.
Argh, I saw quite a few of those ... and wasn't worrying about them. I'll take a look though.
EDIT: Argh again ... there are 7,615 of the things. I was more-or-less manually deleting the other things, as they were a manageable number. However, I'm not going through and manually deleting 7,615 vbw files. I'll work on how to automate it.
That many? When I was a member of PSC, those used to be stripped out for the specific reason of helping prevent malicious code at project load. Looks like their policy or stripping routines stopped doing that. I'm not sure how many projects were uploaded to PSC over the years, but I'd imagine significantly more than 7.6k
Well, from what I've got, I've got 13,852 separate projects. So, about half of them still have their VBW files in them.
If there are more PSC projects, I've got no idea how to get them.
Ok, I took a look and I'm probably going to draw the line at these VBW files. Short of unzipping each file, deleting the VBW file(s), and then re-zipping, I don't have any code to directly delete files from ZIP files. I took a look at Wqweto's interface to the 7Zip library, and even that doesn't show an API call for deleting a specific file within a ZIP file.
LaVolpe, if you know of any clean code to do this, I'll take a look at it though. Short of that, I think I'm done, having deleted everything that's a clear binary (see list in post #124).
Also, just as an argument to be allowed to post this here, many of the ZIPs attached around here have VBW files. Not saying it's good ... just saying it.
Nope, not familiar with any such code to do what you are asking. And regarding the vbw files... the only reason I am even aware of the potential for malicious code being activated just because that file exists, was from PSC. They explained why those were being stripped. As for those existing in tons of zips; no doubt, Even in stuff I zip up at times as I don't remember to exclude it all times. If it could be done easily, it's just a plus. Hopefully most people actually do scan sample projects before blindly hitting Ctrl+F5. As a matter of habit, I always exclude .vbw files when unzipping downloads.
But... the *.vbw can't execute any code, they just set what code windows are opened, but the code windows don't execute code. It is the forms and UserControls designer windows that can execute code, but not the code windows.
Just want to double check (because I haven't read through the whole thread) you've removed all the compiled elements, right? If so, yeah, go ahead and add your link back in. Our rules are really all about avoiding compiled code so it sound's like you've covered that.Quote:
do you think it'd be ok to edit my post #110 and put the link back in?
The only thing I'd add, now that you've removed all the exes etc, is it small enough to upload direct to VBF? If so it's a bit better if you do so but if it's still too large then go ahead and link it.
Another thing you might want to consider is whether this is suitable to go in the Utilities section. We do allow compiled code in there (as long as it's got the associated source along side it) but specify that users download it at their own risk.
Finally, I just want to say hats off to you for going to such lengths to honour both the word and the spirit of our rules at the same time as going out of your way to make available something that others want. I'm genuinely quite taken aback by that.
Why not creating a special folder on VBForums called PSC, where to upload all code with their desriptions?
True. The vbw file tells VB which forms and code pages to display when the project starts up. When a form loads in the IDE with a usercontrol on it, the usercontrol executes code. So in a sense, the vbw file is activating the usercontrol in that scenario. And without the vbw, that form would not be displayed when the project loaded.
I think you're basically describing the Utilities section. It's not limited to PlanetSourceCode but it is a place where users can upload useful utilities they want to offer up to the community and we do allow compiled elements in there, (though we do ask that the source is also made available).Quote:
Why not creating a special folder on VBForums called PSC, where to upload all code with their desriptions?
If I've missed the point of your suggestion then I'd suggest starting up a thread in the forum feedback section.
Now, I can't tell you what combination of actions within the IDE sets the values in the vbw file the way it does. VB options has an effect? Service Pack has an effect? Don't know.
If you want to have a form show up in design when you load a project, try this for proof of concept.
- With NotePad open any VBW for any unloaded project with forms
- inside the vbw file, you should see one or more forms listed
- pick one or two and remove the "C" at the end of the line, but leave the trailing comma
- save the vbw fileCode:frmRenumber = 234, 234, 682, 871, C, 156, 156, 604, 793, C
-- after change
frmRenumber = 234, 234, 682, 871, C, 156, 156, 604, 793,
- now reopen the project; the form should be in design-view
Again, I don't know how VB writes that file. But I think any character other than C shows the form. C = CodePage? A long time ago, I scanned lots of vbw files out of curiosity. The most common characters I saw at the end of those lines were C, Z, and nothing/space.
Yes, you are right, removing the last C it loads the form.
Maybe VB saw this a security issue and some service pack defaulted to C? I would have to scan all my vbw files to find one that doesn't have a trailing C, but I know I've seen them. But even if it was fixed in a service pack, then why does the SP6 allow it to be displayed when no C? In any case, this is how someone with malicious intent can cause damage, especially if we ran our IDE elevated, thus giving the UC code full admin privileges.Quote:
Yes, you are right, removing the last C it loads the form.
Yes, they could execute anything by doing that. It is a dangerous thing.
Here is a test.
Simple solution, after downloading projects, extract everything but the vbw file. If you extracted it, then delete it afterwards. And of course, visually scan code and never run unknown source projects elevated until you have scanned it.
Paranoia? Not really, I personally dislike code writing to the registry, especially via APIs (until I understand why). So, I tend to look for that stuff. At least most on this site would never intentionally upload malicious code; it's the unintentional oops-code that maybe people should worry about.
Edited: For you VB add-in authors, maybe this is something you may want to consider -- prevent anything but code pages being displayed when projects are opened within the IDE? I know I'd use it.
Ok, I'm assembling a CodeBank entry with a link to the further cleaned PSC files.
This is the link, but I'm still getting it together.
Also, LaVolpe, I'll put a note in the CodeBank post about the VBW files, and also visually scanning the code. Actually, that goes for any code we download.
Almost wish you can delete 80% of that stuff -- I was such a novice for the first few years, trying to tackle all sorts of things at once. Only later on when I settled down to focus on tackling one topic at a time, did I become a better writer. In other words, lots of that code would probably make me embarrassed to see it potentially used/referenced today.
In PSC's prime, VB6 not on the chopping block, so many members, few rules for what was posted, tons of feedback, great place to cut one's teeth. But also lots of junk code, half-thought out stuff, few gems. But there were coders there that were very experienced and shared without hesitation. I learned so much from many of them.
True!
My first submission was Hyperlink Sample (one API function used:-). The unintended twist was that the sample link opened the default browser and voted 5 for the very submission with no user intervention. Needless to say this easily won the monthly contest and forced PSC to change voting page to POST requests. . .
Those glory days! :-))
cheers,
</wqw>
Well, I managed to get a-hold of that Decode PSC File.exe utility and just started by decoding a couple of them. The first thing I noticed was that the PCS files were the same size as the ZIP files. So, I pulled them up in a hex editor and set them side-by-side. The beginning of the hex files were the same. However, once you scrolled down, it was completely different. I thought about staring at it long enough to figure out what was going on, but then decided to just write a program to "automate" that little Decode PSC File.exe program, and that's what I did.
Just lots of FindWindow, LockSetForegroundWindow, SetForegroundWindow, SendInput, etc, etc. But I already had that stuff, and I've done it several times before.
It tied up my computer for about 6 hours. But, once I got it all stable, I just let it run overnight.
-------
I used your cls_Gen_Unzip (I may have renamed it) class to unzip the files. The class with the Init, Count, Unzip, FileName, etc. Friend methods. Once they were converted to ZIP files, your class worked perfectly.
EDIT: I needed to unzip them to get the title and description out of the @PSC_???.txt internal file. Also, I used your class to search (and delete) all those EXE etc files. I actually had to do the deletions manually (using a combination of 7Zip and Windows Explorer).
PSC files encryption is a bit nasty as some files are not fully encrypted but only some sections of the ZIP (local file header, central directory file header, end central directory record) could be encrypted. Repairing these partly encrypted archives will result in lost files. Same happens if just ignore the errors during extracting.
I've made a tool (VB.NET) to analyze and decrypt sections but there is a problem when the starting for the file sections are not encrypted but the next sections are (encrypted). The result ZIP file cannot be fully extracted due to some errors (depends on the archiver what message is returned). If all ZIP sections are encrypted the result archive is extracted successfully.
Probably it is few bad bytes but I will check it next days. After that I will publish the source of the tool.
BTW my idea is to have project that will transfer all PSC ISOs projects (contributions) to repositories in centralized Git organization like GitHub, GitLab, Gitea, Gogs and others. Currently I am planning to use Gitea API to create repos as Gitea is very easy to self-host for testing the process.
Edit: Forgot to mention that only one file is not extracted from the partially encrypted archives. So it is really few bad bytes error.
http://free.bgbiz.com/pscode/AllThePscZipFiles/
I'll keep the submissions ZIP files online until I figure out how to upload each source code as separate repo to github with proper README with original image and every other info from the mdb file. Biggest problem will be how to recreate votes on PSC as stars on github, next to probably hundreds of fake accounts :-))
cheers,
</wqw>
Yes.
There is an org on github already: https://github.com/Planet-Source-Code
Let me know if you need access.
I'll be using Elroy's effort to extract each submission into a repo under PSC org on github w/ proper README in markdown w/ images and more info.
Coming up with repo names is the first problem. Have to strip junk from project title/description and come up with 2-4 meaningful words while preventing duplicate names.
cheers,
</wqw>
These are some of the steps my project is planned to have. Here is my list:
- Decrypt and extract projects from each CD to own directory
- Copy in properly named directory each project
- Remove unnecessary or dangerous files (exe, ocx, etc. - configurable in configuration file)
- For each project create README.md from existing readme file and all other required files like .gitignore
- Create copy of each project in separate directory where Git repositories will be initialized
- Connect to Gitea via API and for each project create new repository, initialize local git repo and perform initial commit
Just as a further FYI, there were about 10 of those PCS/ZIP files that didn't have a @PCS_ReadMe_????.txt file within them. For consistency, I created one that basically said...
...and threw that into the PCS/ZIP files where it was missing. It was truly only a small handful though.Quote:
Title: unknown
Description: unknown
Yes, proper .gitignore and .gitattributes must be created for any VB repo.
Existing @PSC_ReadMe_Xxxx.txt file is not very useful/complete but the PscEnc.mdb database contains the full description as last edited by the original author.
You don't need gogs/gitea API at all. Just register a remote then push local repo to it using git.exe. You can later "expose" the remote under gogs/gitea frontend for browsing.
cheers,
</wqw>
True. I'll need to use github API too: https://developer.github.com/v3/repo...ion-repository
For a locally hosted remote it should be easier to directly ssh and git init --bare on the remote machine (no API calls).
cheers,
</wqw>
Does the project info in the mdb have the project number (or ID) that was used in the URL of the project at the PSC site?
I'm asking because there are lot of links to PSC on the web, and also on this forum, that point to addresses like:
And it would be nice if we could have a way to locate that project in the new repo.Code:http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=74734&lngWId=1
From the readme file name: @PSC_Readme_NNNN_1.txt, the NNNN part is the Submission.id field in the MDB.
Here, I put the unprotected PscEnc.mdb file out in my Google Drive as well. There aren't any macros in it, so it's pretty much just database data.
The auto-generated @PSC_ReadMe_Xxx.txt files contain something like this
These will probably be included verbatim in the README.mdCode:Title: [3D maze & frustum ]
Description: 3D "maze" doesn't really have an ending.. but it serves another purpose. This is a cell&portals maze. It uses exact visibility ( recursion ) and clipping to create a view of the maze. I originally had to do this in C++.net using openGL. This USES PURE VB. only a few api calls. I'm looking for someone who has a good idea for a maze building algorithm so i can do some file I/O. right now i just build the maze in the program which takes up A LOT of lines, and could be done much easier by reading a file. anyway, leave your comments, learn, enjoy.
This file came from Planet-Source-Code.com...the home millions of lines of source code
You can view comments on this code/and or vote on it at: http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=57868&lngWId=1
The author may have retained certain copyrights to this code...please observe their request and the law by reviewing all copyright conditions at the above URL.
For the name of the repo I was thinking about author_name_some_part_of_title so that LaVolpe's submissions would order alphabetically :-)) Could include the submission ID at the end as a number though.
cheers,
</wqw>
Found the "secret" and "magic" offset where the bad encryption happens. Even the section is not encrypted (header + some of the data) it could be partially encrypted and that's why my algo failed. Still having 291 files with errors during extraction using SharpZipLib - most are "Cannot find central directory".
The total process to decrypt and extract the data from ZIPs (without writing to temp files - all in memory processing) takes about 15 minutes on my PC using hard drive as storage for ISOs and unpacked data:
Probably using SSDs and parallelize the processing into multiple threads it may work much faster but it is not important at the moment.Code:Decrypt and extract projects from CDs
-------------------------------------
Processing CD1 from path e:\
CD2 extraction time taken: 251.371s
Processing CD2 from path f:\
CD3 extraction time taken: 159.1s
Processing CD3 from path g:\
CD4 extraction time taken: 113.134s
Processing CD4 from path h:\
CD5 extraction time taken: 128.607s
Processing CD5 from path i:\
CD6 extraction time taken: 99.211s
Processing CD6 from path j:\
CD7 extraction time taken: 63.033s
Processing CD7 from path k:\
CD8 extraction time taken: 75.378s
Total time taken: 889.839s
Press Enter to exit...
Next step is to process @PSC_Readme* files to get better project names and generate README.md file.
Maybe I should stay out of it, or maybe I'm confused. But isn't that what my ZipFileIndex.tsv and ZipFileIndex.xlsx files are? That's the ZIP file name, title from @PSC_Readme*, and description from @PSC_Readme*. There's not much more in those @PSC_Readme* files.
Anyway, getting it all into a well organized Git repository would be nice, I suppose.
Yes, it is what you've done. But to create good looking README.md file requires to add some formatting and insert the image from Data\Pictures directory (still haven't checked the relation of IDs in picture file name).
I can use your files where you extracted all the info (title and description) but this adds another dependency file. My idea is to mount ISOs or copy to separate directories and run the tools to extract data, prepare Git repos and finally to create the repos in centralized Git hosting solution like GitHub.
Some ugly and messy test code for those interested in decryption and extraction process. It will be re-written for the final version. Written in VB.NET (VS2019, targeting .NET Framework 4.8):
VB.NET Code:
Imports System.IO Imports Extensions.Strings Imports ICSharpCode.SharpZipLib.Core Imports ICSharpCode.SharpZipLib.Zip Public Class PSCAnalyzer Public Event OnErrorOccurred(s As String) Private Sub ErrorOccurred(s As String) RaiseEvent OnErrorOccurred(s) End Sub Public Event OnInfoEvent(s As String) Private Sub InfoEvent(s As String) RaiseEvent OnInfoEvent(s) End Sub Public Event OnLogEvent(s As String) Private Sub LogEvent(s As String) RaiseEvent OnLogEvent(s) End Sub Private Enum ZIPHeaderType LocalHeader = 0 CentralDirFileHeader = 1 EndCEntralDirRecord = 2 End Enum Private ZIP_LOCAL_FILE_HEADER As Byte() = {&H50, &H4B, &H3, &H4} Private ZIP_CENTRAL_DIR_FILE_HEADER As Byte() = {&H50, &H4B, &H1, &H2} Private ZIP_END_CENTRAL_DIR_RECORD As Byte() = {&H50, &H4B, &H5, &H6} Private ENCRYPTED_LOCAL_FILE_HEADER As Byte() = {&HAF, &HB4, &HFC, &HFB} Private ENCRYPTED_CENTRAL_DIR_FILE_HEADER As Byte() = {&HAF, &HB4, &HFE, &HFD} Private ENCRYPTED_END_CENTRAL_DIR_RECORD As Byte() = {&HAF, &HB4, &HFA, &HF9} Private _filename As String Private _buff As Byte() Private _buffSize As Integer Private Sub ExtractZipStream(ByVal rdr As Stream, ByVal destDir As String) Try Using zf = New ZipFile(rdr) For Each zipEntry As ZipEntry In zf If Not zipEntry.IsFile Then Continue For Dim zippedFile = zipEntry.Name Dim fullDestName = Path.Combine(destDir, zippedFile) Dim outDirName = Path.GetDirectoryName(fullDestName) If Not outDirName.IsNullOrEmpty Then Directory.CreateDirectory(outDirName) End If Dim buff As Byte() = New Byte(4095) {} Using zs = zf.GetInputStream(zipEntry) Using outfs = File.Create(fullDestName) Try StreamUtils.Copy(zs, outfs, buff) Catch ex As Exception LogEvent($"Error extracting file {zipEntry.Name} from archive {_filename}: {ex.Message}") End Try End Using End Using Next End Using Catch ex As Exception LogEvent($"Error extracting archive {_filename}: {ex.Message}") End Try End Sub Public Sub ExtractZIPFile(ByVal destDir As String) Using ms = New MemoryStream(_buff) ExtractZipStream(ms, destDir) End Using End Sub Private Function BufferEqual(ByVal i As Integer, ByVal arr As Byte()) As Boolean If _buffSize < i + arr.Length Then Return False End If Dim buff = New Byte(arr.Length - 1) {} Array.Copy(_buff, i, buff, 0, arr.Length) Return buff.SequenceEqual(arr) End Function Private Function SectionIsValid(ByVal i As Integer) As Boolean Return _ BufferEqual(i, ENCRYPTED_LOCAL_FILE_HEADER) OrElse BufferEqual(i, ZIP_LOCAL_FILE_HEADER) OrElse BufferEqual(i, ENCRYPTED_CENTRAL_DIR_FILE_HEADER) OrElse BufferEqual(i, ZIP_CENTRAL_DIR_FILE_HEADER) OrElse BufferEqual(i, ENCRYPTED_END_CENTRAL_DIR_RECORD) OrElse BufferEqual(i, ZIP_END_CENTRAL_DIR_RECORD) End Function Private Function SectionEncrypted(ByVal i As Integer) As Boolean Return _ BufferEqual(i, ENCRYPTED_LOCAL_FILE_HEADER) OrElse BufferEqual(i, ENCRYPTED_CENTRAL_DIR_FILE_HEADER) OrElse BufferEqual(i, ENCRYPTED_END_CENTRAL_DIR_RECORD) End Function Private Function IsLocalHeader(ByVal i As Integer, ByVal encrypted As Boolean) As Boolean If encrypted Then Return BufferEqual(i, ENCRYPTED_LOCAL_FILE_HEADER) End If Return BufferEqual(i, ZIP_LOCAL_FILE_HEADER) End Function Private Function IsEndCentralDirHeader(ByVal i As Integer) As Boolean Return BufferEqual(i, ZIP_END_CENTRAL_DIR_RECORD) OrElse BufferEqual(i, ENCRYPTED_END_CENTRAL_DIR_RECORD) End Function Private Sub DecryptBuffer(ByVal startPos As Integer, ByVal len As Integer) For i = 0 To len - 1 _buff(startPos + i) = CByte(_buff(startPos + i) Xor &HFF) Next End Sub Private Function GetBufferWord(ByVal i As Integer) As Integer 'Return _buff(i + 1) * 256 + _buff(i) Dim arr = New Byte(1) {} Array.Copy(_buff, i, arr, 0, 2) Return BitConverter.ToInt16(arr, 0) End Function Private Function GetBufferDword(ByVal i As Integer) As Integer Dim arr = New Byte(3) {} Array.Copy(_buff, i, arr, 0, 4) Return BitConverter.ToInt32(arr, 0) End Function Private Function DecryptHeader(ByVal i As Integer, ByVal isLocal As Boolean, ByVal encrypted As Boolean) As Integer If isLocal Then If encrypted Then DecryptBuffer(i, 30) Return i + 30 Else If encrypted Then DecryptBuffer(i, 46) Return i + 46 End If End Function Private Function GetSectionDataLength(ByVal i As Integer, ByVal isLocal As Boolean) As Integer If isLocal Then Dim dataLen = GetBufferDword(i + 18) + GetBufferWord(i + 26) + GetBufferWord(i + 28) Return dataLen Else 'Dim dataLen = GetBufferDword(i + 20) + GetBufferWord(i + 28) + GetBufferWord(i + 30) + GetBufferWord(i + 32) Dim dataLen = GetBufferWord(i + 28) + GetBufferWord(i + 30) + GetBufferWord(i + 32) Return dataLen End If End Function 'Private Function DecryptSectionData(ByVal startPos As Integer, ByVal len As Integer, ByVal encrypted As Boolean) As Integer ' If encrypted Then DecryptBuffer(startPos, len) ' Return startPos + len 'End Function Private Function DecryptSectionData(ByVal startPos As Integer, ByVal len As Integer, ByVal encrypted As Boolean) As Integer If encrypted Then DecryptBuffer(startPos, len) ElseIf startPos < &H3180 And startPos + len > &H3180 Then DecryptBuffer(&H3180, (startPos + len - &H3180)) End If Return startPos + len End Function Private Function ProcessCentralDirHeader(ByVal i As Integer, ByVal encrypted As Boolean) As Integer If encrypted Then DecryptBuffer(i, 22) Dim dataLen = GetBufferWord(i + 20) If encrypted Then DecryptBuffer(i + 22, dataLen) Return i + 22 + dataLen End Function ' Analyze ZIP section and return last position in file reached (it should be next header) Private Function AnalyzeSection(ByVal i As Integer) As Integer If i < 0 OrElse Not SectionIsValid(i) Then Return Integer.MaxValue End If ' Check header if encrypted or decrypted - local file or central dir file header Dim encrypted = SectionEncrypted(i) ' Edge case - end central directory record. Use own specific procedure If IsEndCentralDirHeader(i) Then Return ProcessCentralDirHeader(i, encrypted) ' Check if header is local file or central directory one Dim isLocal = IsLocalHeader(i, encrypted) ' If encrypted - decrypt header only Dim pos = DecryptHeader(i, isLocal, encrypted) ' Get length of data: file name, compressed data and extra field length Dim dataLen = GetSectionDataLength(i, isLocal) ' If encrypted - decrypt compressed data pos = DecryptSectionData(pos, dataLen, encrypted) ' Return reached position in file to caller Return pos End Function Public Sub ProcessFile() _buff = File.ReadAllBytes(_filename) _buffSize = _buff.Length - 1 Dim i = 0 i = AnalyzeSection(i) While i < _buffSize '_buff.Length - 1 i = AnalyzeSection(i) End While End Sub Public Sub SaveDecryptedFile() Dim destname = $"{_filename}.decrypted.ZIP" File.WriteAllBytes(destname, _buff) End Sub Public Sub New(ByVal filename As String) _filename = filename End Sub End Class
There is no time these days but the creation of README.md is done:
https://www.vbforums.com/images/ieimages/2020/09/1.png
If someone knows the relation between picture names (e.g. pic2000101071382022.jpg ) from /data/pictures/ to the project name, please tell so I will not waste time to check those numbers.
Extracted from all seven CD codes without zip files, i.e. located in the text format in the database in the "Code" table. They contain many elementary codes, consisting of one or several lines. There are VB, JS, HTML and C ++ codes. Plus - the screenshots attached to them.
https://drive.google.com/file/d/1knn...ew?usp=sharing
Hi to all! :)
I read on this topic that sadly PSC is gone (i hope not forever)... :(
I need to download an old shared PSC code from the following link:
http://www.planet-source-code.com/vb...68013&lngWId=1
Any chance to find it in one of repositories that some of you kindly share here? And if yes, please anyone can explain me how to find it?
Thanks in advance ;)
EDIT: Nevermind mates, just found it to myself, thanks to Elroy repository (really THANKS to you man for your hard work!!! ;) )
Now they are all here.