GithubHelp home page GithubHelp logo

justarion / gozippy Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 0.0 70 KB

ZippyShare Direct Link Viewer / Downloader

License: Other

PowerShell 3.30% Shell 2.33% Go 86.41% HTML 7.96%
golang zippyshare zippyshare-downloader zippyshare-parser

gozippy's Introduction

๐Ÿ“ฒ Contact Details

Github Badge Discord Badge Steam Badge Profile Views Badge
Hey, arion here! I'm an avid enjoyer of C#. Feel free to contact me on the above platforms.



Lang Repository Stars Forks Downloads
C# Post Processing+ Stars Forks Downloads
C# Mic Sensitivity Stars Forks Downloads
C# Toggle Mic Icon Stars Forks Downloads
GO Go Zippy Stars Forks Downloads
C# Console Encoding Fix Stars Forks Downloads
C# Toggle UIS tickers Stars Forks Downloads
C# Wing State Saver Stars Forks Downloads
C# Resize Pls Stars Forks Downloads
C# Win11 Tooltip Fix Stars Forks Downloads
C# Death Must Die Mods Stars Forks Downloads
C# Rainmeter Wrapper Stars Forks Downloads

๐Ÿ›  Tech Stack

Back-end

Library/FrameWorks


Terminal Scripts

OS


Tools


gozippy's People

Contributors

justarion avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gozippy's Issues

Thank you

Sorry, it isn't an issue. I am working on a similar project and just want to say explicitly: Thank you a lot for keeping records of algorithm changes and being so active, it's very helpful!

Regex for iteration/case 0 breaks on filename with special characters

Hi, thanks for your work in this. I noticed that the script silently breaks when the filename has special characters like ! inside it. Here is a minimal example

package main

import (
	"fmt"
	"regexp"
)

func main() {
	raw := `document.getElementById('dlbutton').href = "/d/EP04EZxQ/" + (597700 % 51245 + 597700 % 913) + "/!.txt";`
	r := regexp.MustCompile(`document\.getElementById\('dlbutton'\)\.href\s*=\s*"/d/(\w+)/"\s*\+\s*([\d\w\s+\-*/%()]+?)\s*\+\s*"/([/\w%.-]+)";?`)
	m := r.FindStringSubmatch(raw)
	fmt.Println(m)
}

The reason is the last regex [/\w%.-]+ which breaks with a filename of !.txt. ! is a valid identifier in the URLs. So maybe we should just make it .+ instead? This holds for iteration/cases 1 and 3 as well.

I would also like to provide some suggestions to make the code more readable:

  • Use raw string in the regexp so that you don't need to do multiple layers of escaping
  • Inside TryMakeZippyFile, print a message when all iterations fail instead of silently exiting

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.