Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
github.com/kunbetter/gridsearch
real-time grid search engine
go get github.com/KunBetter/GridSearch
$GOPATH/bin/GridSearch
go get github.com/rcrowley/go-metrics
import (
"github.com/KunBetter/GridSearch"
"net/http"
)
func main() {
engine := GridSearch.Engine{}
engine.Start()
go func() {
for {
data := make([]GridSearch.GridData, 1000)
for i := 0; i < 1000; i++ {
data[i].LO = GridSearch.GenRandomLo()
data[i].LA = GridSearch.GenRandomLa()
data[i].ID = GridSearch.GenRandomID()
}
engine.IndexDocs(data)
}
}()
r := http.NewServeMux()
engine.Handler(r)
err := http.ListenAndServe(":8888", r)
if err != nil {
panic(err)
}
}
http://localhost:8888/index?pt=lo,la,id
curl -XPUT http://localhost:8888/index -d pt=lo,la,id
http://localhost:8888/search(random rect)
http://localhost:8888/search?rect=left,top,right,bottom
http://localhost:8888/search?rect=9333748,3517838,9381410,3482092
curl -XPUT http://localhost:8888/search -d rect=left,top,right,bottom
just for china.
Assuming there are 10 layers of the quadtree,the num of the bottom grids is 4^9.
Each data with latitude and longitude is mapped to the bottom grid.
Search when hit the grid at bottom,calculate the corresponding underlying grid array,
return the appropriate result.
1.A real-time search and indexing incremental updates.
2.the first level of the index is designed to save two modes:files, memory.
second model search faster, but consumes memory.
1.Recycling spare segments.
2.If all segments are in use, increase segment num.
3.current segments were Recycled stored in a minimum heap.
4.Adding TTL while improving.for the segment is not used for a long time,
some time to delete.
1.A real-time search space data.
1.go metrics.
1.Spatial data is about 270 million data to about 1G size file,if just store the ID(int32).
1.Infrastructure Optimization
2.the Consistency problem between index merge operation and the real-time search, because
the index merge action will delete the original index files, generate a new index file.
response to real time search request,the engine may open index file that have been removed.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.