
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
github.com/gmhafiz/timeline
Display your own timeline history using vis.js.
Features:
It is about time that I learn about standards like RESTful api and data persistence with CRUD. This pet project exposes me with many useful web standards and technologies for my future endeavor as a network programmer and web developer.
There are two ways of obtaining the code.
with go get
go get github.com/gmhafiz/timeline
with git clone
git clone git@github.com:gmhafiz/timeline.git
go run main.go
http://localhost:8080/timeline
to access frontendsudo apt install httpie
for http queriesgulp
for production. Must edit URL
variable firstcontent
and start
are required fields.db/events.db
Event struct {
Id int64 `json:"id"`
Content string `sql:"size:1024" json:"content"`
Start string `json:"start"`
End string `json:"end"`
Type string `json:"type"`
}
/api/event/
Example:
http POST http://localhost:8080/api/nowEvent content="event 1" start=2016-12-11 end=2016-12-12 type=range
Returns
HTTP/1.1 200 OK
Content-Length: 86
Content-Type: application/json; charset=utf-8
Date: Mon, 17 Apr 2017 04:23:39 GMT
X-Powered-By: go-json-rest
{
"content": "event 1",
"start": "2016-12-11",
"end": "2016-12-12",
"id": 1,
"type": "range"
}
Get a specific event by id
/api/event/:id
Example
http GET http://localhost:8080/api/nowEvent/1
Returns
HTTP/1.1 200 OK
Content-Length: 103
Content-Type: application/json; charset=utf-8
Date: Mon, 17 Apr 2017 04:25:33 GMT
X-Powered-By: go-json-rest
{
"content": "event 1",
"start": "2016-12-11",
"end": "2016-12-12",
"id": 1,
"type": "range"
}
Get all events
/api/events
Example:
http GET http://localhost:8080/api/nowEvents
Returns
HTTP/1.1 200 OK
Content-Length: 1402
Content-Type: application/json; charset=utf-8
Date: Mon, 17 Apr 2017 04:26:55 GMT
X-Powered-By: go-json-rest
[
{
"content": "event 1",
"start": "2016-12-11",
"end": "2016-12-12",
"id": 1,
"type": "range"
},
{
"content": "e4",
"end": "2017-04-15",
"id": 2,
"start": "2017-04-14",
"type": "point"
},
{
"content": "e6",
"end": "",
"id": 3,
"start": "2017-04-16",
"type": "point"
}
]
/api/event/:id
Example
http DELETE http://localhost:8080/api/nowEvent/3
Returns
HTTP/1.1 200 OK
Content-Length: 0
Content-Type: application/json; charset=utf-8
Date: Mon, 17 Apr 2017 04:29:04 GMT
X-Powered-By: go-json-rest
/api/event/:id
Example
http PUT http://localhost:8080/api/nowEvent/2 content="e4 updated"
Returns
HTTP/1.1 200 OK
Content-Length: 177
Content-Type: application/json; charset=utf-8
Date: Wed, 24 May 2017 15:05:01 GMT
X-Powered-By: go-json-rest
{
"content": "e4 updated",
"end": "2017-04-15",
"id": 2,
"start": "2017-04-14",
"type": "point"
}
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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.